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
6dd2b4b9
Commit
6dd2b4b9
authored
May 16, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added spec for window reload
[ci skip]
parent
468afcaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
spec/javascripts/issue_show/components/app_spec.js
spec/javascripts/issue_show/components/app_spec.js
+23
-12
No files found.
spec/javascripts/issue_show/components/app_spec.js
View file @
6dd2b4b9
...
@@ -76,18 +76,6 @@ describe('Issuable output', () => {
...
@@ -76,18 +76,6 @@ describe('Issuable output', () => {
});
});
});
});
it
(
'
changes element for `form` when open
'
,
(
done
)
=>
{
vm
.
showForm
=
true
;
Vue
.
nextTick
(()
=>
{
expect
(
vm
.
$el
.
tagName
,
).
toBe
(
'
FORM
'
);
done
();
});
});
it
(
'
does not show actions if permissions are incorrect
'
,
(
done
)
=>
{
it
(
'
does not show actions if permissions are incorrect
'
,
(
done
)
=>
{
vm
.
showForm
=
true
;
vm
.
showForm
=
true
;
vm
.
canUpdate
=
false
;
vm
.
canUpdate
=
false
;
...
@@ -121,6 +109,29 @@ describe('Issuable output', () => {
...
@@ -121,6 +109,29 @@ describe('Issuable output', () => {
});
});
});
});
it
(
'
reloads the page if the confidential status has changed
'
,
(
done
)
=>
{
spyOn
(
window
.
location
,
'
reload
'
);
spyOn
(
vm
.
service
,
'
updateIssuable
'
).
and
.
callFake
(()
=>
new
Promise
((
resolve
)
=>
{
resolve
({
json
()
{
return
{
confidential
:
true
,
};
},
});
}));
vm
.
updateIssuable
();
setTimeout
(()
=>
{
expect
(
window
.
location
.
reload
,
).
toHaveBeenCalled
();
done
();
});
});
it
(
'
closes form on error
'
,
(
done
)
=>
{
it
(
'
closes form on error
'
,
(
done
)
=>
{
spyOn
(
window
,
'
Flash
'
).
and
.
callThrough
();
spyOn
(
window
,
'
Flash
'
).
and
.
callThrough
();
spyOn
(
vm
.
service
,
'
updateIssuable
'
).
and
.
callFake
(()
=>
new
Promise
((
resolve
,
reject
)
=>
{
spyOn
(
vm
.
service
,
'
updateIssuable
'
).
and
.
callFake
(()
=>
new
Promise
((
resolve
,
reject
)
=>
{
...
...
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