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
Boxiang Sun
gitlab-ce
Commits
705a840d
Commit
705a840d
authored
Sep 29, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Not the Test will also work with other tests before
parent
0647484c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/assets/javascripts/repo/helpers/repo_helper.js
app/assets/javascripts/repo/helpers/repo_helper.js
+1
-1
spec/javascripts/repo/components/repo_file_spec.js
spec/javascripts/repo/components/repo_file_spec.js
+3
-3
No files found.
app/assets/javascripts/repo/helpers/repo_helper.js
View file @
705a840d
...
...
@@ -257,7 +257,7 @@ const RepoHelper = {
history
.
pushState
({
key
:
RepoHelper
.
key
},
''
,
url
);
if
(
title
)
{
document
.
title
=
`
${
title
}
`
;
document
.
title
=
title
;
}
},
...
...
spec/javascripts/repo/components/repo_file_spec.js
View file @
705a840d
...
...
@@ -14,7 +14,7 @@ describe('RepoFile', () => {
level
:
10
,
};
const
activeFile
=
{
url
:
'
u
rl
'
,
url
:
'
activeU
rl
'
,
pageTitle
:
'
pageTitle
'
,
};
...
...
@@ -31,11 +31,11 @@ describe('RepoFile', () => {
});
it
(
'
renders link, icon, name and last commit details
'
,
()
=>
{
RepoStore
.
setActiveFiles
(
activeFile
);
const
vm
=
createComponent
({
file
,
activeFile
,
});
RepoStore
.
setActiveFiles
(
activeFile
);
const
name
=
vm
.
$el
.
querySelector
(
'
.repo-file-name
'
);
const
fileIcon
=
vm
.
$el
.
querySelector
(
'
.file-icon
'
);
...
...
@@ -44,7 +44,7 @@ describe('RepoFile', () => {
expect
(
name
.
title
).
toEqual
(
file
.
url
);
expect
(
name
.
href
).
toMatch
(
`/
${
file
.
url
}
`
);
expect
(
name
.
textContent
.
trim
()).
toEqual
(
file
.
name
);
expect
(
document
.
title
.
trim
()).
toEqual
(
f
ile
.
pageTitle
);
expect
(
document
.
title
.
trim
()).
toEqual
(
activeF
ile
.
pageTitle
);
expect
(
vm
.
$el
.
querySelector
(
'
.commit-message
'
).
textContent
.
trim
()).
toBe
(
file
.
lastCommitMessage
);
expect
(
vm
.
$el
.
querySelector
(
'
.commit-update
'
).
textContent
.
trim
()).
toBe
(
updated
);
expect
(
fileIcon
.
classList
.
contains
(
file
.
icon
)).
toBeTruthy
();
...
...
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