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
96785e77
Commit
96785e77
authored
May 09, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added specs
parent
cc066314
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
spec/javascripts/ide/lib/common/model_spec.js
spec/javascripts/ide/lib/common/model_spec.js
+4
-0
spec/javascripts/ide/stores/actions/file_spec.js
spec/javascripts/ide/stores/actions/file_spec.js
+16
-0
No files found.
spec/javascripts/ide/lib/common/model_spec.js
View file @
96785e77
...
@@ -28,6 +28,10 @@ describe('Multi-file editor library model', () => {
...
@@ -28,6 +28,10 @@ describe('Multi-file editor library model', () => {
expect
(
model
.
originalModel
).
not
.
toBeNull
();
expect
(
model
.
originalModel
).
not
.
toBeNull
();
expect
(
model
.
model
).
not
.
toBeNull
();
expect
(
model
.
model
).
not
.
toBeNull
();
expect
(
model
.
baseModel
).
not
.
toBeNull
();
expect
(
model
.
baseModel
).
not
.
toBeNull
();
expect
(
model
.
originalModel
.
uri
.
path
).
toBe
(
'
original/path--path
'
);
expect
(
model
.
model
.
uri
.
path
).
toBe
(
'
path--path
'
);
expect
(
model
.
baseModel
.
uri
.
path
).
toBe
(
'
target/path--path
'
);
});
});
it
(
'
creates model with head file to compare against
'
,
()
=>
{
it
(
'
creates model with head file to compare against
'
,
()
=>
{
...
...
spec/javascripts/ide/stores/actions/file_spec.js
View file @
96785e77
...
@@ -569,6 +569,22 @@ describe('IDE store file actions', () => {
...
@@ -569,6 +569,22 @@ describe('IDE store file actions', () => {
.
catch
(
done
.
fail
);
.
catch
(
done
.
fail
);
});
});
it
(
'
returns false when already opened
'
,
done
=>
{
store
.
state
.
openFiles
.
push
({
...
f
,
active
:
true
,
key
:
`pending-
${
f
.
key
}
`
,
});
store
.
dispatch
(
'
openPendingTab
'
,
{
file
:
f
,
keyPrefix
:
'
pending
'
})
.
then
(
added
=>
{
expect
(
added
).
toBe
(
false
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
it
(
'
pushes router URL when added
'
,
done
=>
{
it
(
'
pushes router URL when added
'
,
done
=>
{
store
.
state
.
currentBranchId
=
'
master
'
;
store
.
state
.
currentBranchId
=
'
master
'
;
...
...
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