Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
47478e05
Commit
47478e05
authored
May 27, 2021
by
jerasmus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve approvers text
Improved the improvers text if approvers not visible Changelog: changed EE: true
parent
cb611101
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
ee/app/assets/javascripts/approvals/components/mr_edit/mr_rules.vue
...ets/javascripts/approvals/components/mr_edit/mr_rules.vue
+5
-1
ee/spec/frontend/approvals/components/mr_edit/mr_rules_spec.js
...ec/frontend/approvals/components/mr_edit/mr_rules_spec.js
+9
-2
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/assets/javascripts/approvals/components/mr_edit/mr_rules.vue
View file @
47478e05
...
...
@@ -134,7 +134,11 @@ export default {
<div
ref=
"indicator"
class=
"text-muted"
>
{{
indicatorText
(
rule
)
}}
</div>
</td>
<td
class=
"js-members"
:class=
"settings.allowMultiRule ? 'd-none d-sm-table-cell' : null"
>
<user-avatar-list
:items=
"rule.approvers"
:img-size=
"24"
/>
<user-avatar-list
:items=
"rule.approvers"
:img-size=
"24"
:empty-text=
"__('Approvers from private group(s) not shown')"
/>
</td>
<td
class=
"js-approvals-required"
>
<rule-input
:rule=
"rule"
/>
...
...
ee/spec/frontend/approvals/components/mr_edit/mr_rules_spec.js
View file @
47478e05
...
...
@@ -33,7 +33,7 @@ describe('EE Approvals MRRules', () => {
const
findHeaders
=
()
=>
wrapper
.
findAll
(
'
thead th
'
).
wrappers
.
map
((
x
)
=>
x
.
text
());
const
findRuleName
=
()
=>
wrapper
.
find
(
'
.js-name
'
);
const
findRuleIndicator
=
()
=>
wrapper
.
find
({
ref
:
'
indicator
'
});
const
find
RuleMembers
=
()
=>
wrapper
.
find
(
'
td.js-members
'
).
find
(
UserAvatarList
).
props
(
'
items
'
);
const
find
AvatarList
=
()
=>
wrapper
.
find
(
UserAvatarList
);
const
findRuleControls
=
()
=>
wrapper
.
find
(
'
td.js-controls
'
).
find
(
RuleControls
);
const
callTargetBranchHandler
=
(
MutationObserverSpy
)
=>
{
const
onTargetBranchMutationHandler
=
MutationObserverSpy
.
mock
.
calls
[
0
][
0
];
...
...
@@ -176,6 +176,13 @@ describe('EE Approvals MRRules', () => {
expect
(
findHeaders
()).
toEqual
([
HEADERS
.
members
,
''
,
HEADERS
.
approvalsRequired
,
''
]);
});
it
(
'
shows message if no approvers are visible
'
,
()
=>
{
store
.
modules
.
approvals
.
state
.
rules
=
[
createMRRule
()];
factory
();
expect
(
findAvatarList
().
props
(
'
emptyText
'
)).
toBe
(
'
Approvers from private group(s) not shown
'
);
});
it
(
'
renders headers when there is a single named rule
'
,
()
=>
{
store
.
modules
.
approvals
.
state
.
rules
=
[
createMRRule
()];
factory
();
...
...
@@ -197,7 +204,7 @@ describe('EE Approvals MRRules', () => {
});
it
(
'
shows members
'
,
()
=>
{
expect
(
find
RuleMembers
(
)).
toEqual
(
expected
.
approvers
);
expect
(
find
AvatarList
().
props
(
'
items
'
)).
toEqual
(
expected
.
approvers
);
});
});
...
...
locale/gitlab.pot
View file @
47478e05
...
...
@@ -4184,6 +4184,9 @@ msgstr ""
msgid "Approvers"
msgstr ""
msgid "Approvers from private group(s) not shown"
msgstr ""
msgid "Apr"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment