BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4f2f02bf
Unverified
Commit
4f2f02bf
authored
May 02, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed specs
parent
65871813
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
45 deletions
+6
-45
form_spec.js
spec/javascripts/ide/components/commit_sidebar/form_spec.js
+6
-1
file_spec.js
spec/javascripts/ide/stores/actions/file_spec.js
+0
-14
actions_spec.js
spec/javascripts/ide/stores/modules/commit/actions_spec.js
+0
-30
No files found.
spec/javascripts/ide/components/commit_sidebar/form_spec.js
View file @
4f2f02bf
...
@@ -13,6 +13,8 @@ describe('IDE commit form', () => {
...
@@ -13,6 +13,8 @@ describe('IDE commit form', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
spyOnProperty
(
window
,
'innerHeight'
).
and
.
returnValue
(
800
);
spyOnProperty
(
window
,
'innerHeight'
).
and
.
returnValue
(
800
);
store
.
state
.
changedFiles
.
push
(
'test'
);
vm
=
createComponentWithStore
(
Component
,
store
).
$mount
();
vm
=
createComponentWithStore
(
Component
,
store
).
$mount
();
});
});
...
@@ -22,6 +24,10 @@ describe('IDE commit form', () => {
...
@@ -22,6 +24,10 @@ describe('IDE commit form', () => {
resetStore
(
vm
.
$store
);
resetStore
(
vm
.
$store
);
});
});
it
(
'enables button when has changes'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'[disabled]'
)).
toBe
(
null
);
});
describe
(
'compact'
,
()
=>
{
describe
(
'compact'
,
()
=>
{
it
(
'renders commit button in compact mode'
,
()
=>
{
it
(
'renders commit button in compact mode'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.btn-primary'
)).
not
.
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'.btn-primary'
)).
not
.
toBeNull
();
...
@@ -33,7 +39,6 @@ describe('IDE commit form', () => {
...
@@ -33,7 +39,6 @@ describe('IDE commit form', () => {
});
});
it
(
'renders overview text'
,
done
=>
{
it
(
'renders overview text'
,
done
=>
{
vm
.
$store
.
state
.
changedFiles
.
push
(
'test'
);
vm
.
$store
.
state
.
stagedFiles
.
push
(
'test'
);
vm
.
$store
.
state
.
stagedFiles
.
push
(
'test'
);
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
...
...
spec/javascripts/ide/stores/actions/file_spec.js
View file @
4f2f02bf
...
@@ -575,20 +575,6 @@ describe('IDE store file actions', () => {
...
@@ -575,20 +575,6 @@ describe('IDE store file actions', () => {
.
then
(
done
)
.
then
(
done
)
.
catch
(
done
.
fail
);
.
catch
(
done
.
fail
);
});
});
it
(
'returns false when passed in file is active & viewer is diff'
,
done
=>
{
f
.
active
=
true
;
store
.
state
.
openFiles
.
push
(
f
);
store
.
state
.
viewer
=
'diff'
;
store
.
dispatch
(
'openPendingTab'
,
{
file
:
f
,
keyPrefix
:
'pending'
})
.
then
(
added
=>
{
expect
(
added
).
toBe
(
false
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
});
});
describe
(
'removePendingTab'
,
()
=>
{
describe
(
'removePendingTab'
,
()
=>
{
...
...
spec/javascripts/ide/stores/modules/commit/actions_spec.js
View file @
4f2f02bf
...
@@ -289,21 +289,6 @@ describe('IDE commit module actions', () => {
...
@@ -289,21 +289,6 @@ describe('IDE commit module actions', () => {
.
then
(
done
)
.
then
(
done
)
.
catch
(
done
.
fail
);
.
catch
(
done
.
fail
);
});
});
it
(
'pushes route to new branch if commitAction is new branch'
,
done
=>
{
store
.
state
.
commit
.
commitAction
=
consts
.
COMMIT_TO_NEW_BRANCH
;
store
.
dispatch
(
'commit/updateFilesAfterCommit'
,
{
data
,
branch
,
})
.
then
(()
=>
{
expect
(
router
.
push
).
toHaveBeenCalledWith
(
`/project/abcproject/blob/master/
${
f
.
path
}
`
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
});
});
describe
(
'commitChanges'
,
()
=>
{
describe
(
'commitChanges'
,
()
=>
{
...
@@ -391,21 +376,6 @@ describe('IDE commit module actions', () => {
...
@@ -391,21 +376,6 @@ describe('IDE commit module actions', () => {
.
catch
(
done
.
fail
);
.
catch
(
done
.
fail
);
});
});
it
(
'pushes router to new route'
,
done
=>
{
store
.
dispatch
(
'commit/commitChanges'
)
.
then
(()
=>
{
expect
(
router
.
push
).
toHaveBeenCalledWith
(
`/project/
${
store
.
state
.
currentProjectId
}
/blob/
${
store
.
getters
[
'commit/newBranchName'
]
}
/changed`
,
);
done
();
})
.
catch
(
done
.
fail
);
});
it
(
'sets last Commit Msg'
,
done
=>
{
it
(
'sets last Commit Msg'
,
done
=>
{
store
store
.
dispatch
(
'commit/commitChanges'
)
.
dispatch
(
'commit/commitChanges'
)
...
...
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