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
7cf4f1e6
Commit
7cf4f1e6
authored
Jun 11, 2020
by
Matthew Nearents
Committed by
Paul Slaughter
Jun 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced gl-deprecated-button with gl-button
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34207
parent
921874f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
ee/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue
...e_merge_request_widget/components/approvals/approvals.vue
+6
-6
ee/spec/javascripts/vue_mr_widget/components/approvals/approvals_spec.js
...ipts/vue_mr_widget/components/approvals/approvals_spec.js
+5
-5
No files found.
ee/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue
View file @
7cf4f1e6
<
script
>
import
{
Gl
Deprecated
Button
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
createFlash
,
{
hideFlash
}
from
'
~/flash
'
;
import
{
s__
}
from
'
~/locale
'
;
import
eventHub
from
'
~/vue_merge_request_widget/event_hub
'
;
...
...
@@ -20,7 +20,7 @@ export default {
ApprovalsSummaryOptional
,
ApprovalsFooter
,
ApprovalsAuth
,
Gl
Deprecated
Button
,
GlButton
,
GlLoadingIcon
,
},
props
:
{
...
...
@@ -89,7 +89,7 @@ export default {
return
{
text
:
this
.
approvalText
,
inverted
,
variant
:
'
primary
'
,
variant
:
'
info
'
,
action
:
()
=>
this
.
approve
(),
};
}
else
if
(
this
.
showUnapprove
)
{
...
...
@@ -207,18 +207,18 @@ export default {
@
approve=
"approveWithAuth"
@
hide=
"clearError"
/>
<gl-
deprecated-
button
<gl-button
v-if=
"action"
:variant=
"action.variant"
:class=
"
{ 'btn-inverted': action.inverted }"
size="sm
"
category="secondary
"
class="mr-3"
data-qa-selector="approve_button"
@click="action.action"
>
<gl-loading-icon
v-if=
"isApproving"
inline
/>
{{
action
.
text
}}
</gl-
deprecated-
button>
</gl-button>
<approvals-summary-optional
v-if=
"isOptional"
:can-approve=
"hasAction"
...
...
ee/spec/javascripts/vue_mr_widget/components/approvals/approvals_spec.js
View file @
7cf4f1e6
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
Gl
Deprecated
Button
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
Approvals
from
'
ee/vue_merge_request_widget/components/approvals/approvals.vue
'
;
import
ApprovalsSummary
from
'
ee/vue_merge_request_widget/components/approvals/approvals_summary.vue
'
;
import
ApprovalsSummaryOptional
from
'
ee/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue
'
;
...
...
@@ -55,7 +55,7 @@ describe('EE MRWidget approvals', () => {
});
};
const
findAction
=
()
=>
wrapper
.
find
(
Gl
Deprecated
Button
);
const
findAction
=
()
=>
wrapper
.
find
(
GlButton
);
const
findActionData
=
()
=>
{
const
action
=
findAction
();
...
...
@@ -184,7 +184,7 @@ describe('EE MRWidget approvals', () => {
it
(
'
approve action is rendered
'
,
()
=>
{
expect
(
findActionData
()).
toEqual
({
variant
:
'
primary
'
,
variant
:
'
info
'
,
text
:
'
Approve
'
,
inverted
:
false
,
});
...
...
@@ -205,7 +205,7 @@ describe('EE MRWidget approvals', () => {
it
(
'
approve action (with inverted) is rendered
'
,
()
=>
{
expect
(
findActionData
()).
toEqual
({
variant
:
'
primary
'
,
variant
:
'
info
'
,
text
:
'
Approve
'
,
inverted
:
true
,
});
...
...
@@ -221,7 +221,7 @@ describe('EE MRWidget approvals', () => {
it
(
'
approve additionally action is rendered
'
,
()
=>
{
expect
(
findActionData
()).
toEqual
({
variant
:
'
primary
'
,
variant
:
'
info
'
,
text
:
'
Approve additionally
'
,
inverted
:
true
,
});
...
...
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