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
Jérome Perrin
gitlab-ce
Commits
a0d23806
Commit
a0d23806
authored
Oct 03, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed RepoFile Test
parent
25186c7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
spec/javascripts/repo/components/repo_file_spec.js
spec/javascripts/repo/components/repo_file_spec.js
+9
-7
spec/javascripts/repo/components/repo_sidebar_spec.js
spec/javascripts/repo/components/repo_sidebar_spec.js
+2
-2
No files found.
spec/javascripts/repo/components/repo_file_spec.js
View file @
a0d23806
...
...
@@ -29,15 +29,17 @@ describe('RepoFile', () => {
}).
$mount
();
}
beforeEach
(()
=>
{
spyOn
(
repoFile
.
mixins
[
0
].
methods
,
'
timeFormated
'
).
and
.
returnValue
(
updated
);
});
it
(
'
renders link, icon, name and last commit details
'
,
()
=>
{
const
vm
=
createComponent
({
file
,
activeFile
,
const
RepoFile
=
Vue
.
extend
(
repoFile
);
const
vm
=
new
RepoFile
({
propsData
:
{
file
,
activeFile
,
},
});
spyOn
(
vm
,
'
timeFormated
'
).
and
.
returnValue
(
updated
);
vm
.
$mount
();
const
name
=
vm
.
$el
.
querySelector
(
'
.repo-file-name
'
);
const
fileIcon
=
vm
.
$el
.
querySelector
(
'
.file-icon
'
);
...
...
spec/javascripts/repo/components/repo_sidebar_spec.js
View file @
a0d23806
...
...
@@ -80,7 +80,7 @@ describe('RepoSidebar', () => {
};
RepoStore
.
files
=
[
file1
];
RepoStore
.
isRoot
=
true
;
const
vm
=
createComponent
();
vm
=
createComponent
();
vm
.
fileClicked
(
file1
);
...
...
@@ -95,7 +95,7 @@ describe('RepoSidebar', () => {
spyOn
(
Helper
,
'
getFileFromPath
'
).
and
.
returnValue
(
file
);
spyOn
(
RepoStore
,
'
setActiveFiles
'
);
const
vm
=
createComponent
();
vm
=
createComponent
();
vm
.
fileClicked
(
file
);
expect
(
RepoStore
.
setActiveFiles
).
toHaveBeenCalledWith
(
file
);
...
...
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