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
859fdf49
Commit
859fdf49
authored
Dec 16, 2020
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate to GlButton in approvals footer
parent
776d0068
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
ee/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals_footer.vue
..._request_widget/components/approvals/approvals_footer.vue
+5
-6
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_footer_spec.js
...e_mr_widget/components/approvals/approvals_footer_spec.js
+3
-3
No files found.
ee/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals_footer.vue
View file @
859fdf49
<
script
>
import
{
GlButton
,
GlDeprecatedButton
}
from
'
@gitlab/ui
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
__
}
from
'
~/locale
'
;
import
UserAvatarList
from
'
~/vue_shared/components/user_avatar/user_avatar_list.vue
'
;
import
ApprovalsList
from
'
./approvals_list.vue
'
;
...
...
@@ -7,7 +7,6 @@ import ApprovalsList from './approvals_list.vue';
export
default
{
components
:
{
GlButton
,
GlDeprecatedButton
,
UserAvatarList
,
ApprovalsList
,
},
...
...
@@ -81,14 +80,14 @@ export default {
/>
<template
v-if=
"isCollapsed"
>
<user-avatar-list
:items=
"suggestedApproversTrimmed"
:breakpoint=
"0"
empty-text=
""
/>
<gl-
deprecated-button
variant=
"link"
@
click=
"toggle"
>
{{
<gl-
button
data-testid=
"approvers-expand-button"
variant=
"link"
@
click=
"toggle"
>
{{
__
(
'
View eligible approvers
'
)
}}
</gl-
deprecated-
button>
}}
</gl-button>
</
template
>
<
template
v-else
>
<gl-
deprecated-button
variant=
"link"
@
click=
"toggle"
>
{{
<gl-
button
data-testid=
"approvers-collapse-button"
variant=
"link"
@
click=
"toggle"
>
{{
__
(
'
Collapse
'
)
}}
</gl-
deprecated-
button>
}}
</gl-button>
</
template
>
</div>
<div
v-if=
"!isCollapsed && approvalRules.length"
class=
"border-top"
>
...
...
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_footer_spec.js
View file @
859fdf49
import
{
Gl
DeprecatedButton
,
Gl
Button
,
GlLoadingIcon
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlLoadingIcon
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
ApprovalsFooter
from
'
ee/vue_merge_request_widget/components/approvals/approvals_footer.vue
'
;
import
ApprovalsList
from
'
ee/vue_merge_request_widget/components/approvals/approvals_list.vue
'
;
...
...
@@ -28,8 +28,8 @@ describe('EE MRWidget approvals footer', () => {
const
findToggle
=
()
=>
wrapper
.
find
(
GlButton
);
const
findToggleIcon
=
()
=>
findToggle
().
find
(
GlIcon
);
const
findToggleLoadingIcon
=
()
=>
findToggle
().
find
(
GlLoadingIcon
);
const
findExpandButton
=
()
=>
wrapper
.
find
(
GlDeprecatedButton
);
const
findCollapseButton
=
()
=>
wrapper
.
find
(
GlDeprecatedButton
);
const
findExpandButton
=
()
=>
wrapper
.
find
(
'
[data-testid="approvers-expand-button"]
'
);
const
findCollapseButton
=
()
=>
wrapper
.
find
(
'
[data-testid="approvers-collapse-button"]
'
);
const
findList
=
()
=>
wrapper
.
find
(
ApprovalsList
);
const
findAvatars
=
()
=>
wrapper
.
find
(
UserAvatarList
);
...
...
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