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
18bc8543
Commit
18bc8543
authored
Jul 26, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix repo_file_spec
parent
0fdcb703
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
app/assets/javascripts/repo/repo_file.vue
app/assets/javascripts/repo/repo_file.vue
+1
-1
spec/javascripts/repo/repo_file_spec.js
spec/javascripts/repo/repo_file_spec.js
+7
-2
No files found.
app/assets/javascripts/repo/repo_file.vue
View file @
18bc8543
...
...
@@ -52,7 +52,7 @@ export default RepoFile;
</td>
<td
v-if=
"!isMini"
class=
"hidden-xs"
>
<span>
{{
timeFormated
(
file
.
lastCommitUpdate
)
}}
</span>
<span
class=
"commit-update"
>
{{
timeFormated
(
file
.
lastCommitUpdate
)
}}
</span>
</td>
</tr>
</
template
>
spec/javascripts/repo/repo_file_spec.js
View file @
18bc8543
...
...
@@ -2,12 +2,13 @@ import Vue from 'vue';
import
repoFile
from
'
~/repo/repo_file.vue
'
;
describe
(
'
RepoFile
'
,
()
=>
{
const
updated
=
'
updated
'
;
const
file
=
{
icon
:
'
icon
'
,
url
:
'
url
'
,
name
:
'
name
'
,
lastCommitMessage
:
'
message
'
,
lastCommitUpdate
:
'
update
'
,
lastCommitUpdate
:
Date
.
now
()
,
level
:
10
,
};
const
activeFile
=
{
...
...
@@ -22,6 +23,10 @@ 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
,
...
...
@@ -35,7 +40,7 @@ describe('RepoFile', () => {
expect
(
name
.
href
).
toMatch
(
`/
${
file
.
url
}
`
);
expect
(
name
.
textContent
).
toEqual
(
file
.
name
);
expect
(
vm
.
$el
.
querySelector
(
'
.commit-message
'
).
textContent
).
toBe
(
file
.
lastCommitMessage
);
expect
(
vm
.
$el
.
querySelector
(
'
.commit-update
'
).
textContent
).
toBe
(
file
.
lastCommitUpdate
);
expect
(
vm
.
$el
.
querySelector
(
'
.commit-update
'
).
textContent
).
toBe
(
updated
);
});
it
(
'
does render if hasFiles is true and is loading tree
'
,
()
=>
{
...
...
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