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
9b2fda53
Commit
9b2fda53
authored
Feb 09, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added specs & fixed specs
parent
566d6ac4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
10 deletions
+49
-10
spec/javascripts/repo/components/changed_file_icon_spec.js
spec/javascripts/repo/components/changed_file_icon_spec.js
+49
-0
spec/javascripts/repo/components/repo_tab_spec.js
spec/javascripts/repo/components/repo_tab_spec.js
+0
-10
No files found.
spec/javascripts/repo/components/changed_file_icon_spec.js
0 → 100644
View file @
9b2fda53
import
Vue
from
'
vue
'
;
import
changedFileIcon
from
'
~/ide/components/changed_file_icon.vue
'
;
import
createComponent
from
'
../../helpers/vue_mount_component_helper
'
;
describe
(
'
IDE changed file icon
'
,
()
=>
{
let
vm
;
beforeEach
(()
=>
{
const
component
=
Vue
.
extend
(
changedFileIcon
);
vm
=
createComponent
(
component
,
{
file
:
{
tempFile
:
false
,
},
});
});
afterEach
(()
=>
{
vm
.
$destroy
();
});
describe
(
'
changedIcon
'
,
()
=>
{
it
(
'
equals file-modified when not a temp file
'
,
()
=>
{
expect
(
vm
.
changedIcon
).
toBe
(
'
file-modified
'
);
});
it
(
'
equals file-addition when a temp file
'
,
()
=>
{
vm
.
file
.
tempFile
=
true
;
expect
(
vm
.
changedIcon
).
toBe
(
'
file-addition
'
);
});
});
describe
(
'
changedIconClass
'
,
()
=>
{
it
(
'
includes multi-file-changed-icon as standard
'
,
()
=>
{
expect
(
vm
.
changedIconClass
).
toContain
(
'
multi-file-changed-icon
'
);
});
it
(
'
includes multi-file-modified when not a temp file
'
,
()
=>
{
expect
(
vm
.
changedIconClass
).
toContain
(
'
multi-file-modified
'
);
});
it
(
'
includes multi-file-addition when a temp file
'
,
()
=>
{
vm
.
file
.
tempFile
=
true
;
expect
(
vm
.
changedIconClass
).
toContain
(
'
multi-file-addition
'
);
});
});
});
spec/javascripts/repo/components/repo_tab_spec.js
View file @
9b2fda53
...
@@ -55,16 +55,6 @@ describe('RepoTab', () => {
...
@@ -55,16 +55,6 @@ describe('RepoTab', () => {
expect
(
vm
.
closeFile
).
toHaveBeenCalledWith
(
vm
.
tab
);
expect
(
vm
.
closeFile
).
toHaveBeenCalledWith
(
vm
.
tab
);
});
});
it
(
'
shows changed icon if tab is changed
'
,
()
=>
{
const
tab
=
file
(
'
changedFile
'
);
tab
.
changed
=
true
;
vm
=
createComponent
({
tab
,
});
expect
(
vm
.
changedIcon
).
toBe
(
'
file-modified
'
);
});
it
(
'
changes icon on hover
'
,
(
done
)
=>
{
it
(
'
changes icon on hover
'
,
(
done
)
=>
{
const
tab
=
file
();
const
tab
=
file
();
tab
.
changed
=
true
;
tab
.
changed
=
true
;
...
...
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