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
d255fd4f
Commit
d255fd4f
authored
Jun 28, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed error_message_spec
parent
8b687e07
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
spec/javascripts/ide/components/error_message_spec.js
spec/javascripts/ide/components/error_message_spec.js
+7
-5
No files found.
spec/javascripts/ide/components/error_message_spec.js
View file @
d255fd4f
...
...
@@ -36,13 +36,15 @@ describe('IDE error message component', () => {
});
describe
(
'
with action
'
,
()
=>
{
let
actionSpy
;
beforeEach
(
done
=>
{
vm
.
message
.
action
=
'
testAction
'
;
actionSpy
=
jasmine
.
createSpy
(
'
action
'
).
and
.
returnValue
(
Promise
.
resolve
());
vm
.
message
.
action
=
actionSpy
;
vm
.
message
.
actionText
=
'
test action
'
;
vm
.
message
.
actionPayload
=
'
testActionPayload
'
;
spyOn
(
vm
.
$store
,
'
dispatch
'
).
and
.
returnValue
(
Promise
.
resolve
());
vm
.
$nextTick
(
done
);
});
...
...
@@ -63,7 +65,7 @@ describe('IDE error message component', () => {
vm
.
$el
.
querySelector
(
'
.flash-action
'
).
click
();
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$store
.
dispatch
).
toHaveBeenCalledWith
(
'
testAction
'
,
'
testActionPayload
'
);
expect
(
actionSpy
).
toHaveBeenCalledWith
(
'
testActionPayload
'
);
done
();
});
...
...
@@ -74,7 +76,7 @@ describe('IDE error message component', () => {
vm
.
$el
.
querySelector
(
'
.flash-action
'
).
click
();
expect
(
vm
.
$store
.
dispatch
).
not
.
toHaveBeenCalledWith
();
expect
(
actionSpy
).
not
.
toHaveBeenCalledWith
();
});
it
(
'
resets isLoading after click
'
,
done
=>
{
...
...
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