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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d7642137
Commit
d7642137
authored
Apr 23, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix eslint
parent
192df7d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
spec/javascripts/vue_shared/components/commit_spec.js
spec/javascripts/vue_shared/components/commit_spec.js
+9
-9
No files found.
spec/javascripts/vue_shared/components/commit_spec.js
View file @
d7642137
...
...
@@ -66,7 +66,7 @@ describe('Commit component', () => {
it
(
'
should render a link to the ref url
'
,
()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.ref-name
'
).
getAttribute
(
'
href
'
)).
toEqual
(
props
.
commitRef
.
ref_url
props
.
commitRef
.
ref_url
,
);
});
...
...
@@ -76,21 +76,21 @@ describe('Commit component', () => {
it
(
'
should render the commit short sha with a link to the commit url
'
,
()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.commit-sha
'
).
getAttribute
(
'
href
'
)).
toEqual
(
props
.
commitUrl
props
.
commitUrl
,
);
expect
(
component
.
$el
.
querySelector
(
'
.commit-sha
'
).
textContent
).
toContain
(
props
.
shortSha
);
});
it
(
'
should render icon for commit
'
,
()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.js-commit-icon use
'
).
getAttribute
(
'
xlink:href
'
)
component
.
$el
.
querySelector
(
'
.js-commit-icon use
'
).
getAttribute
(
'
xlink:href
'
)
,
).
toContain
(
'
commit
'
);
});
describe
(
'
Given commit title and author props
'
,
()
=>
{
it
(
'
should render a link to the author profile
'
,
()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.commit-title .avatar-image-container
'
).
getAttribute
(
'
href
'
)
component
.
$el
.
querySelector
(
'
.commit-title .avatar-image-container
'
).
getAttribute
(
'
href
'
)
,
).
toEqual
(
props
.
author
.
path
);
});
...
...
@@ -98,22 +98,22 @@ describe('Commit component', () => {
expect
(
component
.
$el
.
querySelector
(
'
.commit-title .avatar-image-container img
'
)
.
getAttribute
(
'
data-original-title
'
)
.
getAttribute
(
'
data-original-title
'
)
,
).
toContain
(
props
.
author
.
username
);
expect
(
component
.
$el
.
querySelector
(
'
.commit-title .avatar-image-container img
'
)
.
getAttribute
(
'
alt
'
)
.
getAttribute
(
'
alt
'
)
,
).
toContain
(
`
${
props
.
author
.
username
}
's avatar`
);
});
});
it
(
'
should render the commit title
'
,
()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
a.commit-row-message
'
).
getAttribute
(
'
href
'
)).
toEqual
(
props
.
commitUrl
props
.
commitUrl
,
);
expect
(
component
.
$el
.
querySelector
(
'
a.commit-row-message
'
).
textContent
).
toContain
(
props
.
title
props
.
title
,
);
});
});
...
...
@@ -136,7 +136,7 @@ describe('Commit component', () => {
component
=
mountComponent
(
CommitComponent
,
props
);
expect
(
component
.
$el
.
querySelector
(
'
.commit-title span
'
).
textContent
).
toContain
(
"
Can't find HEAD commit for this branch
"
"
Can't find HEAD commit for this branch
"
,
);
});
});
...
...
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