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
Boxiang Sun
gitlab-ce
Commits
d5dae8e5
Commit
d5dae8e5
authored
Jun 11, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed specs
parent
7469b58e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
18 deletions
+29
-18
spec/javascripts/ide/stores/modules/merge_requests/actions_spec.js
...scripts/ide/stores/modules/merge_requests/actions_spec.js
+29
-18
No files found.
spec/javascripts/ide/stores/modules/merge_requests/actions_spec.js
View file @
d5dae8e5
...
...
@@ -199,28 +199,39 @@ describe('IDE merge requests actions', () => {
});
it
(
'
commits reset mutations and actions
'
,
done
=>
{
testAction
(
openMergeRequest
,
{
projectPath
:
'
gitlab-org/gitlab-ce
'
,
id
:
'
1
'
},
mockedState
,
[
{
type
:
'
CLEAR_PROJECTS
'
},
{
type
:
'
SET_CURRENT_MERGE_REQUEST
'
,
payload
:
'
1
'
},
{
type
:
'
RESET_OPEN_FILES
'
},
],
[
{
type
:
'
pipelines/stopPipelinePolling
'
},
{
type
:
'
pipelines/clearEtagPoll
'
},
{
type
:
'
pipelines/resetLatestPipeline
'
},
{
type
:
'
setCurrentBranchId
'
,
payload
:
''
},
],
done
,
);
const
commit
=
jasmine
.
createSpy
();
const
dispatch
=
jasmine
.
createSpy
().
and
.
returnValue
(
Promise
.
resolve
());
openMergeRequest
({
commit
,
dispatch
},
{
projectPath
:
'
gitlab-org/gitlab-ce
'
,
id
:
'
1
'
});
setTimeout
(()
=>
{
expect
(
commit
.
calls
.
argsFor
(
0
)).
toEqual
([
'
CLEAR_PROJECTS
'
,
null
,
{
root
:
true
}]);
expect
(
commit
.
calls
.
argsFor
(
1
)).
toEqual
([
'
SET_CURRENT_MERGE_REQUEST
'
,
'
1
'
,
{
root
:
true
}]);
expect
(
commit
.
calls
.
argsFor
(
2
)).
toEqual
([
'
RESET_OPEN_FILES
'
,
null
,
{
root
:
true
}]);
expect
(
dispatch
.
calls
.
argsFor
(
0
)).
toEqual
([
'
pipelines/resetLatestPipeline
'
,
null
,
{
root
:
true
},
]);
expect
(
dispatch
.
calls
.
argsFor
(
1
)).
toEqual
([
'
setCurrentBranchId
'
,
''
,
{
root
:
true
}]);
expect
(
dispatch
.
calls
.
argsFor
(
2
)).
toEqual
([
'
pipelines/stopPipelinePolling
'
,
null
,
{
root
:
true
},
]);
expect
(
dispatch
.
calls
.
argsFor
(
3
)).
toEqual
([
'
pipelines/clearEtagPoll
'
,
null
,
{
root
:
true
},
]);
done
();
});
});
it
(
'
pushes new route
'
,
()
=>
{
openMergeRequest
(
{
commit
()
{},
dispatch
()
{}
},
{
commit
()
{},
dispatch
:
()
=>
Promise
.
resolve
()
},
{
projectPath
:
'
gitlab-org/gitlab-ce
'
,
id
:
'
1
'
},
);
...
...
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