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
fe0df34d
Commit
fe0df34d
authored
Sep 22, 2021
by
Jiaan Louw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rule all branches not using monospace font
Changelog: fixed EE: true
parent
b2a333b7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
ee/app/assets/javascripts/approvals/components/rule_branches.vue
...assets/javascripts/approvals/components/rule_branches.vue
+1
-1
ee/spec/frontend/approvals/components/rule_branches_spec.js
ee/spec/frontend/approvals/components/rule_branches_spec.js
+7
-3
No files found.
ee/app/assets/javascripts/approvals/components/rule_branches.vue
View file @
fe0df34d
...
...
@@ -15,7 +15,7 @@ export default {
return
protectedBranch
?.
name
||
__
(
'
All branches
'
);
},
isAllBranches
()
{
return
this
.
rule
.
protectedBranches
?.
length
;
return
!
this
.
rule
.
protectedBranches
?.
length
;
},
},
};
...
...
ee/spec/frontend/approvals/components/rule_branches_spec.js
View file @
fe0df34d
...
...
@@ -22,9 +22,12 @@ describe('Rule Branches', () => {
wrapper
=
null
;
});
const
findBranch
=
()
=>
wrapper
.
find
(
'
div
'
);
it
(
'
displays "All branches" if there are no protected branches
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
text
()).
toContain
(
'
All branches
'
);
expect
(
findBranch
().
text
()).
toContain
(
'
All branches
'
);
expect
(
findBranch
().
classes
(
'
monospace
'
)).
toBe
(
true
);
});
it
(
'
displays the branch name of the first protected branch
'
,
()
=>
{
...
...
@@ -45,7 +48,8 @@ describe('Rule Branches', () => {
rule
,
});
expect
(
wrapper
.
text
()).
toContain
(
'
main
'
);
expect
(
wrapper
.
text
()).
not
.
toContain
(
'
hello
'
);
expect
(
findBranch
().
text
()).
toContain
(
'
main
'
);
expect
(
findBranch
().
text
()).
not
.
toContain
(
'
hello
'
);
expect
(
findBranch
().
classes
(
'
monospace
'
)).
toBe
(
false
);
});
});
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