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
>
<
script
>
import
{
Gl
Deprecated
Button
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
createFlash
,
{
hideFlash
}
from
'
~/flash
'
;
import
createFlash
,
{
hideFlash
}
from
'
~/flash
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
import
eventHub
from
'
~/vue_merge_request_widget/event_hub
'
;
import
eventHub
from
'
~/vue_merge_request_widget/event_hub
'
;
...
@@ -20,7 +20,7 @@ export default {
...
@@ -20,7 +20,7 @@ export default {
ApprovalsSummaryOptional
,
ApprovalsSummaryOptional
,
ApprovalsFooter
,
ApprovalsFooter
,
ApprovalsAuth
,
ApprovalsAuth
,
Gl
Deprecated
Button
,
GlButton
,
GlLoadingIcon
,
GlLoadingIcon
,
},
},
props
:
{
props
:
{
...
@@ -89,7 +89,7 @@ export default {
...
@@ -89,7 +89,7 @@ export default {
return
{
return
{
text
:
this
.
approvalText
,
text
:
this
.
approvalText
,
inverted
,
inverted
,
variant
:
'
primary
'
,
variant
:
'
info
'
,
action
:
()
=>
this
.
approve
(),
action
:
()
=>
this
.
approve
(),
};
};
}
else
if
(
this
.
showUnapprove
)
{
}
else
if
(
this
.
showUnapprove
)
{
...
@@ -207,18 +207,18 @@ export default {
...
@@ -207,18 +207,18 @@ export default {
@
approve=
"approveWithAuth"
@
approve=
"approveWithAuth"
@
hide=
"clearError"
@
hide=
"clearError"
/>
/>
<gl-
deprecated-
button
<gl-button
v-if=
"action"
v-if=
"action"
:variant=
"action.variant"
:variant=
"action.variant"
:class=
"
{ 'btn-inverted': action.inverted }"
:class=
"
{ 'btn-inverted': action.inverted }"
size="sm
"
category="secondary
"
class="mr-3"
class="mr-3"
data-qa-selector="approve_button"
data-qa-selector="approve_button"
@click="action.action"
@click="action.action"
>
>
<gl-loading-icon
v-if=
"isApproving"
inline
/>
<gl-loading-icon
v-if=
"isApproving"
inline
/>
{{
action
.
text
}}
{{
action
.
text
}}
</gl-
deprecated-
button>
</gl-button>
<approvals-summary-optional
<approvals-summary-optional
v-if=
"isOptional"
v-if=
"isOptional"
:can-approve=
"hasAction"
: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
{
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
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
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
'
;
import
ApprovalsSummaryOptional
from
'
ee/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue
'
;
...
@@ -55,7 +55,7 @@ describe('EE MRWidget approvals', () => {
...
@@ -55,7 +55,7 @@ describe('EE MRWidget approvals', () => {
});
});
};
};
const
findAction
=
()
=>
wrapper
.
find
(
Gl
Deprecated
Button
);
const
findAction
=
()
=>
wrapper
.
find
(
GlButton
);
const
findActionData
=
()
=>
{
const
findActionData
=
()
=>
{
const
action
=
findAction
();
const
action
=
findAction
();
...
@@ -184,7 +184,7 @@ describe('EE MRWidget approvals', () => {
...
@@ -184,7 +184,7 @@ describe('EE MRWidget approvals', () => {
it
(
'
approve action is rendered
'
,
()
=>
{
it
(
'
approve action is rendered
'
,
()
=>
{
expect
(
findActionData
()).
toEqual
({
expect
(
findActionData
()).
toEqual
({
variant
:
'
primary
'
,
variant
:
'
info
'
,
text
:
'
Approve
'
,
text
:
'
Approve
'
,
inverted
:
false
,
inverted
:
false
,
});
});
...
@@ -205,7 +205,7 @@ describe('EE MRWidget approvals', () => {
...
@@ -205,7 +205,7 @@ describe('EE MRWidget approvals', () => {
it
(
'
approve action (with inverted) is rendered
'
,
()
=>
{
it
(
'
approve action (with inverted) is rendered
'
,
()
=>
{
expect
(
findActionData
()).
toEqual
({
expect
(
findActionData
()).
toEqual
({
variant
:
'
primary
'
,
variant
:
'
info
'
,
text
:
'
Approve
'
,
text
:
'
Approve
'
,
inverted
:
true
,
inverted
:
true
,
});
});
...
@@ -221,7 +221,7 @@ describe('EE MRWidget approvals', () => {
...
@@ -221,7 +221,7 @@ describe('EE MRWidget approvals', () => {
it
(
'
approve additionally action is rendered
'
,
()
=>
{
it
(
'
approve additionally action is rendered
'
,
()
=>
{
expect
(
findActionData
()).
toEqual
({
expect
(
findActionData
()).
toEqual
({
variant
:
'
primary
'
,
variant
:
'
info
'
,
text
:
'
Approve additionally
'
,
text
:
'
Approve additionally
'
,
inverted
:
true
,
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