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
18bc8543
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
repo_file.vue
app/assets/javascripts/repo/repo_file.vue
+1
-1
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;
...
@@ -52,7 +52,7 @@ export default RepoFile;
</td>
</td>
<td
v-if=
"!isMini"
class=
"hidden-xs"
>
<td
v-if=
"!isMini"
class=
"hidden-xs"
>
<span>
{{
timeFormated
(
file
.
lastCommitUpdate
)
}}
</span>
<span
class=
"commit-update"
>
{{
timeFormated
(
file
.
lastCommitUpdate
)
}}
</span>
</td>
</td>
</tr>
</tr>
</
template
>
</
template
>
spec/javascripts/repo/repo_file_spec.js
View file @
18bc8543
...
@@ -2,12 +2,13 @@ import Vue from 'vue';
...
@@ -2,12 +2,13 @@ import Vue from 'vue';
import
repoFile
from
'~/repo/repo_file.vue'
;
import
repoFile
from
'~/repo/repo_file.vue'
;
describe
(
'RepoFile'
,
()
=>
{
describe
(
'RepoFile'
,
()
=>
{
const
updated
=
'updated'
;
const
file
=
{
const
file
=
{
icon
:
'icon'
,
icon
:
'icon'
,
url
:
'url'
,
url
:
'url'
,
name
:
'name'
,
name
:
'name'
,
lastCommitMessage
:
'message'
,
lastCommitMessage
:
'message'
,
lastCommitUpdate
:
'update'
,
lastCommitUpdate
:
Date
.
now
()
,
level
:
10
,
level
:
10
,
};
};
const
activeFile
=
{
const
activeFile
=
{
...
@@ -22,6 +23,10 @@ describe('RepoFile', () => {
...
@@ -22,6 +23,10 @@ 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
vm
=
createComponent
({
file
,
file
,
...
@@ -35,7 +40,7 @@ describe('RepoFile', () => {
...
@@ -35,7 +40,7 @@ describe('RepoFile', () => {
expect
(
name
.
href
).
toMatch
(
`/
${
file
.
url
}
`
);
expect
(
name
.
href
).
toMatch
(
`/
${
file
.
url
}
`
);
expect
(
name
.
textContent
).
toEqual
(
file
.
name
);
expect
(
name
.
textContent
).
toEqual
(
file
.
name
);
expect
(
vm
.
$el
.
querySelector
(
'.commit-message'
).
textContent
).
toBe
(
file
.
lastCommitMessage
);
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'
,
()
=>
{
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