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
c27afc3e
Commit
c27afc3e
authored
Sep 24, 2019
by
Illya Klymov
Committed by
Clement Ho
Sep 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing flash import
parent
ff7c8d34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue
...rge_request_widget/components/states/work_in_progress.vue
+4
-2
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js
...pts/vue_mr_widget/components/states/mr_widget_wip_spec.js
+2
-5
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue
View file @
c27afc3e
<
script
>
<
script
>
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
{
__
}
from
'
~/locale
'
;
import
createFlash
from
'
~/flash
'
;
import
statusIcon
from
'
../mr_widget_status_icon.vue
'
;
import
statusIcon
from
'
../mr_widget_status_icon.vue
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
import
eventHub
from
'
../../event_hub
'
;
import
eventHub
from
'
../../event_hub
'
;
...
@@ -29,12 +31,12 @@ export default {
...
@@ -29,12 +31,12 @@ export default {
.
then
(
res
=>
res
.
data
)
.
then
(
res
=>
res
.
data
)
.
then
(
data
=>
{
.
then
(
data
=>
{
eventHub
.
$emit
(
'
UpdateWidgetData
'
,
data
);
eventHub
.
$emit
(
'
UpdateWidgetData
'
,
data
);
new
window
.
Flash
(
'
The merge request can now be merged.
'
,
'
notice
'
);
// eslint-disable-line
createFlash
(
__
(
'
The merge request can now be merged.
'
),
'
notice
'
);
$
(
'
.merge-request .detail-page-description .title
'
).
text
(
this
.
mr
.
title
);
$
(
'
.merge-request .detail-page-description .title
'
).
text
(
this
.
mr
.
title
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
isMakingRequest
=
false
;
this
.
isMakingRequest
=
false
;
new
window
.
Flash
(
'
Something went wrong. Please try again.
'
);
// eslint-disable-line
createFlash
(
__
(
'
Something went wrong. Please try again.
'
));
});
});
},
},
},
},
...
...
locale/gitlab.pot
View file @
c27afc3e
...
@@ -15527,6 +15527,9 @@ msgstr ""
...
@@ -15527,6 +15527,9 @@ msgstr ""
msgid "The merge conflicts for this merge request have already been resolved. Please return to the merge request."
msgid "The merge conflicts for this merge request have already been resolved. Please return to the merge request."
msgstr ""
msgstr ""
msgid "The merge request can now be merged."
msgstr ""
msgid "The name %{entryName} is already taken in this directory."
msgid "The name %{entryName} is already taken in this directory."
msgstr ""
msgstr ""
...
...
spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js
View file @
c27afc3e
...
@@ -47,7 +47,7 @@ describe('Wip', () => {
...
@@ -47,7 +47,7 @@ describe('Wip', () => {
it
(
'
should make a request to service and handle response
'
,
done
=>
{
it
(
'
should make a request to service and handle response
'
,
done
=>
{
const
vm
=
createComponent
();
const
vm
=
createComponent
();
spyOn
(
window
,
'
Flash
'
).
and
.
returnValue
(
true
);
const
flashSpy
=
spyOnDependency
(
WorkInProgress
,
'
create
Flash
'
).
and
.
returnValue
(
true
);
spyOn
(
eventHub
,
'
$emit
'
);
spyOn
(
eventHub
,
'
$emit
'
);
spyOn
(
vm
.
service
,
'
removeWIP
'
).
and
.
returnValue
(
spyOn
(
vm
.
service
,
'
removeWIP
'
).
and
.
returnValue
(
new
Promise
(
resolve
=>
{
new
Promise
(
resolve
=>
{
...
@@ -61,10 +61,7 @@ describe('Wip', () => {
...
@@ -61,10 +61,7 @@ describe('Wip', () => {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
expect
(
vm
.
isMakingRequest
).
toBeTruthy
();
expect
(
vm
.
isMakingRequest
).
toBeTruthy
();
expect
(
eventHub
.
$emit
).
toHaveBeenCalledWith
(
'
UpdateWidgetData
'
,
mrObj
);
expect
(
eventHub
.
$emit
).
toHaveBeenCalledWith
(
'
UpdateWidgetData
'
,
mrObj
);
expect
(
window
.
Flash
).
toHaveBeenCalledWith
(
expect
(
flashSpy
).
toHaveBeenCalledWith
(
'
The merge request can now be merged.
'
,
'
notice
'
);
'
The merge request can now be merged.
'
,
'
notice
'
,
);
done
();
done
();
},
333
);
},
333
);
});
});
...
...
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