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
16756d86
Commit
16756d86
authored
Feb 25, 2020
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update "Resolve WIP Status" button
parent
4248cb0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
22 deletions
+24
-22
app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue
...rge_request_widget/components/states/work_in_progress.vue
+22
-20
spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js
...pts/vue_mr_widget/components/states/mr_widget_wip_spec.js
+2
-2
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue
View file @
16756d86
<
script
>
import
$
from
'
jquery
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
__
,
s__
}
from
'
~/locale
'
;
import
createFlash
from
'
~/flash
'
;
import
s
tatusIcon
from
'
../mr_widget_status_icon.vue
'
;
import
S
tatusIcon
from
'
../mr_widget_status_icon.vue
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
import
eventHub
from
'
../../event_hub
'
;
export
default
{
name
:
'
WorkInProgress
'
,
components
:
{
statusIcon
,
StatusIcon
,
GlButton
,
},
directives
:
{
tooltip
,
...
...
@@ -23,8 +25,15 @@ export default {
isMakingRequest
:
false
,
};
},
computed
:
{
wipInfoTooltip
()
{
return
s__
(
'
mrWidget|When this merge request is ready, remove the WIP: prefix from the title to allow it to be merged
'
,
);
},
},
methods
:
{
r
emoveWIP
()
{
handleR
emoveWIP
()
{
this
.
isMakingRequest
=
true
;
this
.
service
.
removeWIP
()
...
...
@@ -52,29 +61,22 @@ export default {
<i
v-tooltip
class=
"fa fa-question-circle"
:title=
"
s__(
'mrWidget|When this merge request is ready, remove the WIP: prefix from the title to allow it to be merged',
)
"
:aria-label=
"
s__(
'mrWidget|When this merge request is ready, remove the WIP: prefix from the title to allow it to be merged',
)
"
:title=
"wipInfoTooltip"
:aria-label=
"wipInfoTooltip"
>
</i>
</span>
<button
<
gl-
button
v-if=
"mr.removeWIPPath"
size=
"sm"
variant=
"default"
:disabled=
"isMakingRequest"
type=
"button
"
class=
"
btn btn-default btn-sm
js-remove-wip"
@
click=
"
r
emoveWIP"
:loading=
"isMakingRequest
"
class=
"js-remove-wip"
@
click=
"
handleR
emoveWIP"
>
<i
v-if=
"isMakingRequest"
class=
"fa fa-spinner fa-spin"
aria-hidden=
"true"
>
</i>
{{
s__
(
'
mrWidget|Resolve WIP status
'
)
}}
</button>
</
gl-
button>
</div>
</div>
</
template
>
spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js
View file @
16756d86
...
...
@@ -43,7 +43,7 @@ describe('Wip', () => {
is_new_mr_data
:
true
,
};
describe
(
'
r
emoveWIP
'
,
()
=>
{
describe
(
'
handleR
emoveWIP
'
,
()
=>
{
it
(
'
should make a request to service and handle response
'
,
done
=>
{
const
vm
=
createComponent
();
...
...
@@ -57,7 +57,7 @@ describe('Wip', () => {
}),
);
vm
.
r
emoveWIP
();
vm
.
handleR
emoveWIP
();
setTimeout
(()
=>
{
expect
(
vm
.
isMakingRequest
).
toBeTruthy
();
expect
(
eventHub
.
$emit
).
toHaveBeenCalledWith
(
'
UpdateWidgetData
'
,
mrObj
);
...
...
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