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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
d3198c60
Commit
d3198c60
authored
May 22, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get new data after inline edit save
[ci skip]
parent
3f996024
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+5
-0
spec/javascripts/issue_show/components/app_spec.js
spec/javascripts/issue_show/components/app_spec.js
+24
-0
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
d3198c60
...
@@ -111,6 +111,11 @@ export default {
...
@@ -111,6 +111,11 @@ export default {
gl
.
utils
.
visitUrl
(
location
.
pathname
);
gl
.
utils
.
visitUrl
(
location
.
pathname
);
}
}
return
this
.
service
.
getData
();
})
.
then
(
res
=>
res
.
json
())
.
then
((
data
)
=>
{
this
.
store
.
updateState
(
data
);
eventHub
.
$emit
(
'
close.form
'
);
eventHub
.
$emit
(
'
close.form
'
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
...
...
spec/javascripts/issue_show/components/app_spec.js
View file @
d3198c60
...
@@ -109,6 +109,30 @@ describe('Issuable output', () => {
...
@@ -109,6 +109,30 @@ describe('Issuable output', () => {
});
});
describe
(
'
updateIssuable
'
,
()
=>
{
describe
(
'
updateIssuable
'
,
()
=>
{
it
(
'
fetches new data after update
'
,
(
done
)
=>
{
spyOn
(
vm
.
service
,
'
getData
'
);
spyOn
(
vm
.
service
,
'
updateIssuable
'
).
and
.
callFake
(()
=>
new
Promise
((
resolve
)
=>
{
resolve
({
json
()
{
return
{
confidential
:
false
,
path
:
location
.
pathname
,
};
},
});
}));
vm
.
updateIssuable
();
setTimeout
(()
=>
{
expect
(
vm
.
service
.
getData
,
).
toHaveBeenCalled
();
done
();
});
});
it
(
'
reloads the page if the confidential status has changed
'
,
(
done
)
=>
{
it
(
'
reloads the page if the confidential status has changed
'
,
(
done
)
=>
{
spyOn
(
gl
.
utils
,
'
visitUrl
'
);
spyOn
(
gl
.
utils
,
'
visitUrl
'
);
spyOn
(
vm
.
service
,
'
updateIssuable
'
).
and
.
callFake
(()
=>
new
Promise
((
resolve
)
=>
{
spyOn
(
vm
.
service
,
'
updateIssuable
'
).
and
.
callFake
(()
=>
new
Promise
((
resolve
)
=>
{
...
...
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