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
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
repo_file_spec.js
spec/javascripts/repo/components/repo_file_spec.js
+9
-7
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