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
Léo-Paul Géneau
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
Show 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', () => {
...
@@ -29,15 +29,17 @@ describe('RepoFile', () => {
}).
$mount
();
}).
$mount
();
}
}
beforeEach
(()
=>
{
spyOn
(
repoFile
.
mixins
[
0
].
methods
,
'
timeFormated
'
).
and
.
returnValue
(
updated
);
});
it
(
'
renders link, icon, name and last commit details
'
,
()
=>
{
it
(
'
renders link, icon, name and last commit details
'
,
()
=>
{
const
vm
=
createComponent
({
const
RepoFile
=
Vue
.
extend
(
repoFile
);
const
vm
=
new
RepoFile
({
propsData
:
{
file
,
file
,
activeFile
,
activeFile
,
},
});
});
spyOn
(
vm
,
'
timeFormated
'
).
and
.
returnValue
(
updated
);
vm
.
$mount
();
const
name
=
vm
.
$el
.
querySelector
(
'
.repo-file-name
'
);
const
name
=
vm
.
$el
.
querySelector
(
'
.repo-file-name
'
);
const
fileIcon
=
vm
.
$el
.
querySelector
(
'
.file-icon
'
);
const
fileIcon
=
vm
.
$el
.
querySelector
(
'
.file-icon
'
);
...
...
spec/javascripts/repo/components/repo_sidebar_spec.js
View file @
a0d23806
...
@@ -80,7 +80,7 @@ describe('RepoSidebar', () => {
...
@@ -80,7 +80,7 @@ describe('RepoSidebar', () => {
};
};
RepoStore
.
files
=
[
file1
];
RepoStore
.
files
=
[
file1
];
RepoStore
.
isRoot
=
true
;
RepoStore
.
isRoot
=
true
;
const
vm
=
createComponent
();
vm
=
createComponent
();
vm
.
fileClicked
(
file1
);
vm
.
fileClicked
(
file1
);
...
@@ -95,7 +95,7 @@ describe('RepoSidebar', () => {
...
@@ -95,7 +95,7 @@ describe('RepoSidebar', () => {
spyOn
(
Helper
,
'
getFileFromPath
'
).
and
.
returnValue
(
file
);
spyOn
(
Helper
,
'
getFileFromPath
'
).
and
.
returnValue
(
file
);
spyOn
(
RepoStore
,
'
setActiveFiles
'
);
spyOn
(
RepoStore
,
'
setActiveFiles
'
);
const
vm
=
createComponent
();
vm
=
createComponent
();
vm
.
fileClicked
(
file
);
vm
.
fileClicked
(
file
);
expect
(
RepoStore
.
setActiveFiles
).
toHaveBeenCalledWith
(
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