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
95b3ff05
Commit
95b3ff05
authored
Jun 05, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed mutations spec
parent
f8d8b63f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
app/assets/javascripts/vue_shared/components/tabs/tab.vue
app/assets/javascripts/vue_shared/components/tabs/tab.vue
+3
-1
spec/javascripts/ide/stores/modules/merge_requests/mutations_spec.js
...ripts/ide/stores/modules/merge_requests/mutations_spec.js
+11
-8
No files found.
app/assets/javascripts/vue_shared/components/tabs/tab.vue
View file @
95b3ff05
...
...
@@ -27,7 +27,9 @@ export default {
this
.
isTab
=
true
;
},
updated
()
{
this
.
$parent
.
$forceUpdate
();
if
(
this
.
$parent
)
{
this
.
$parent
.
$forceUpdate
();
}
},
};
</
script
>
...
...
spec/javascripts/ide/stores/modules/merge_requests/mutations_spec.js
View file @
95b3ff05
...
...
@@ -12,26 +12,29 @@ describe('IDE merge requests mutations', () => {
describe
(
types
.
REQUEST_MERGE_REQUESTS
,
()
=>
{
it
(
'
sets loading to true
'
,
()
=>
{
mutations
[
types
.
REQUEST_MERGE_REQUESTS
](
mockedState
);
mutations
[
types
.
REQUEST_MERGE_REQUESTS
](
mockedState
,
'
created
'
);
expect
(
mockedState
.
isLoading
).
toBe
(
true
);
expect
(
mockedState
.
created
.
isLoading
).
toBe
(
true
);
});
});
describe
(
types
.
RECEIVE_MERGE_REQUESTS_ERROR
,
()
=>
{
it
(
'
sets loading to false
'
,
()
=>
{
mutations
[
types
.
RECEIVE_MERGE_REQUESTS_ERROR
](
mockedState
);
mutations
[
types
.
RECEIVE_MERGE_REQUESTS_ERROR
](
mockedState
,
'
created
'
);
expect
(
mockedState
.
isLoading
).
toBe
(
false
);
expect
(
mockedState
.
created
.
isLoading
).
toBe
(
false
);
});
});
describe
(
types
.
RECEIVE_MERGE_REQUESTS_SUCCESS
,
()
=>
{
it
(
'
sets merge requests
'
,
()
=>
{
gon
.
gitlab_url
=
gl
.
TEST_HOST
;
mutations
[
types
.
RECEIVE_MERGE_REQUESTS_SUCCESS
](
mockedState
,
mergeRequests
);
mutations
[
types
.
RECEIVE_MERGE_REQUESTS_SUCCESS
](
mockedState
,
{
type
:
'
created
'
,
data
:
mergeRequests
,
});
expect
(
mockedState
.
mergeRequests
).
toEqual
([
expect
(
mockedState
.
created
.
mergeRequests
).
toEqual
([
{
id
:
1
,
iid
:
1
,
...
...
@@ -47,9 +50,9 @@ describe('IDE merge requests mutations', () => {
it
(
'
clears merge request array
'
,
()
=>
{
mockedState
.
mergeRequests
=
[
'
test
'
];
mutations
[
types
.
RESET_MERGE_REQUESTS
](
mockedState
);
mutations
[
types
.
RESET_MERGE_REQUESTS
](
mockedState
,
'
created
'
);
expect
(
mockedState
.
mergeRequests
).
toEqual
([]);
expect
(
mockedState
.
created
.
mergeRequests
).
toEqual
([]);
});
});
});
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