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
8c6f7fe9
Commit
8c6f7fe9
authored
Aug 10, 2020
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert glDeprecatedButton to glButton in empty_rule.vue
parent
1bc59e62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
ee/app/assets/javascripts/approvals/components/empty_rule.vue
...pp/assets/javascripts/approvals/components/empty_rule.vue
+4
-4
ee/spec/frontend/approvals/components/mr_edit/empty_rule_spec.js
.../frontend/approvals/components/mr_edit/empty_rule_spec.js
+4
-4
No files found.
ee/app/assets/javascripts/approvals/components/empty_rule.vue
View file @
8c6f7fe9
<
script
>
import
{
mapActions
}
from
'
vuex
'
;
import
{
Gl
Deprecated
Button
}
from
'
@gitlab/ui
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
RuleInput
from
'
./mr_edit/rule_input.vue
'
;
import
EmptyRuleName
from
'
./empty_rule_name.vue
'
;
import
RuleBranches
from
'
./rule_branches.vue
'
;
...
...
@@ -10,7 +10,7 @@ export default {
RuleInput
,
EmptyRuleName
,
RuleBranches
,
Gl
Deprecated
Button
,
GlButton
,
},
props
:
{
rule
:
{
...
...
@@ -59,14 +59,14 @@ export default {
<rule-input
:rule=
"rule"
:is-mr-edit=
"isMrEdit"
/>
</td>
<td>
<gl-
deprecated-
button
<gl-button
v-if=
"!allowMultiRule && canEdit"
class=
"ml-auto btn-info btn-inverted"
data-qa-selector=
"add_approvers_button"
@
click=
"openCreateModal(null)"
>
{{
__
(
'
Add approval rule
'
)
}}
</gl-
deprecated-
button>
</gl-button>
</td>
</tr>
</
template
>
ee/spec/frontend/approvals/components/mr_edit/empty_rule_spec.js
View file @
8c6f7fe9
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
EmptyRule
from
'
ee/approvals/components/empty_rule.vue
'
;
import
{
Gl
Deprecated
Button
}
from
'
@gitlab/ui
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
describe
(
'
Empty Rule
'
,
()
=>
{
let
wrapper
;
...
...
@@ -25,7 +25,7 @@ describe('Empty Rule', () => {
allowMultiRule
:
true
,
canEdit
:
true
,
});
expect
(
wrapper
.
find
(
Gl
Deprecated
Button
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
(
GlButton
).
exists
()).
toBe
(
false
);
});
});
...
...
@@ -36,7 +36,7 @@ describe('Empty Rule', () => {
canEdit
:
true
,
});
expect
(
wrapper
.
find
(
Gl
Deprecated
Button
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
GlButton
).
exists
()).
toBe
(
true
);
});
it
(
'
does not display "Add approval rule" button if not allowed to edit
'
,
()
=>
{
...
...
@@ -44,7 +44,7 @@ describe('Empty Rule', () => {
allowMultiRule
:
true
,
canEdit
:
false
,
});
expect
(
wrapper
.
find
(
Gl
Deprecated
Button
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
(
GlButton
).
exists
()).
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