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
c6696389
Commit
c6696389
authored
May 10, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed specs
parent
5c8f31eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
spec/javascripts/ide/components/commit_sidebar/actions_spec.js
...javascripts/ide/components/commit_sidebar/actions_spec.js
+1
-7
spec/javascripts/ide/components/commit_sidebar/form_spec.js
spec/javascripts/ide/components/commit_sidebar/form_spec.js
+3
-0
No files found.
spec/javascripts/ide/components/commit_sidebar/actions_spec.js
View file @
c6696389
...
@@ -15,9 +15,7 @@ describe('IDE commit sidebar actions', () => {
...
@@ -15,9 +15,7 @@ describe('IDE commit sidebar actions', () => {
vm
.
$store
.
state
.
currentBranchId
=
'
master
'
;
vm
.
$store
.
state
.
currentBranchId
=
'
master
'
;
vm
.
$store
.
state
.
currentProjectId
=
'
abcproject
'
;
vm
.
$store
.
state
.
currentProjectId
=
'
abcproject
'
;
vm
.
$store
.
state
.
projects
.
abcproject
=
{
Vue
.
set
(
vm
.
$store
.
state
.
projects
,
'
abcproject
'
,
{
...
projectData
});
...
projectData
,
};
vm
.
$mount
();
vm
.
$mount
();
...
@@ -39,12 +37,8 @@ describe('IDE commit sidebar actions', () => {
...
@@ -39,12 +37,8 @@ describe('IDE commit sidebar actions', () => {
});
});
it
(
'
hides merge request option when project merge requests are disabled
'
,
done
=>
{
it
(
'
hides merge request option when project merge requests are disabled
'
,
done
=>
{
vm
.
$destroy
();
vm
.
$store
.
state
.
projects
.
abcproject
.
merge_requests_enabled
=
false
;
vm
.
$store
.
state
.
projects
.
abcproject
.
merge_requests_enabled
=
false
;
vm
.
$mount
();
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
querySelectorAll
(
'
input[type="radio"]
'
).
length
).
toBe
(
2
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
input[type="radio"]
'
).
length
).
toBe
(
2
);
expect
(
vm
.
$el
.
textContent
).
not
.
toContain
(
'
Create a new branch and merge request
'
);
expect
(
vm
.
$el
.
textContent
).
not
.
toContain
(
'
Create a new branch and merge request
'
);
...
...
spec/javascripts/ide/components/commit_sidebar/form_spec.js
View file @
c6696389
...
@@ -4,6 +4,7 @@ import CommitForm from '~/ide/components/commit_sidebar/form.vue';
...
@@ -4,6 +4,7 @@ import CommitForm from '~/ide/components/commit_sidebar/form.vue';
import
{
activityBarViews
}
from
'
~/ide/constants
'
;
import
{
activityBarViews
}
from
'
~/ide/constants
'
;
import
{
createComponentWithStore
}
from
'
spec/helpers/vue_mount_component_helper
'
;
import
{
createComponentWithStore
}
from
'
spec/helpers/vue_mount_component_helper
'
;
import
getSetTimeoutPromise
from
'
spec/helpers/set_timeout_promise_helper
'
;
import
getSetTimeoutPromise
from
'
spec/helpers/set_timeout_promise_helper
'
;
import
{
projectData
}
from
'
spec/ide/mock_data
'
;
import
{
resetStore
}
from
'
../../helpers
'
;
import
{
resetStore
}
from
'
../../helpers
'
;
describe
(
'
IDE commit form
'
,
()
=>
{
describe
(
'
IDE commit form
'
,
()
=>
{
...
@@ -14,6 +15,8 @@ describe('IDE commit form', () => {
...
@@ -14,6 +15,8 @@ describe('IDE commit form', () => {
spyOnProperty
(
window
,
'
innerHeight
'
).
and
.
returnValue
(
800
);
spyOnProperty
(
window
,
'
innerHeight
'
).
and
.
returnValue
(
800
);
store
.
state
.
changedFiles
.
push
(
'
test
'
);
store
.
state
.
changedFiles
.
push
(
'
test
'
);
store
.
state
.
currentProjectId
=
'
abcproject
'
;
Vue
.
set
(
store
.
state
.
projects
,
'
abcproject
'
,
{
...
projectData
});
vm
=
createComponentWithStore
(
Component
,
store
).
$mount
();
vm
=
createComponentWithStore
(
Component
,
store
).
$mount
();
});
});
...
...
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