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
d34e937b
Commit
d34e937b
authored
Feb 28, 2018
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for frontend changes
parent
1b0b8b9c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
spec/javascripts/jobs/mock_data.js
spec/javascripts/jobs/mock_data.js
+4
-0
spec/javascripts/jobs/sidebar_detail_row_spec.js
spec/javascripts/jobs/sidebar_detail_row_spec.js
+17
-0
spec/javascripts/jobs/sidebar_details_block_spec.js
spec/javascripts/jobs/sidebar_details_block_spec.js
+6
-0
No files found.
spec/javascripts/jobs/mock_data.js
View file @
d34e937b
...
@@ -115,6 +115,10 @@ export default {
...
@@ -115,6 +115,10 @@ export default {
commit_path
:
'
/root/ci-mock/commit/c58647773a6b5faf066d4ad6ff2c9fbba5f180f6
'
,
commit_path
:
'
/root/ci-mock/commit/c58647773a6b5faf066d4ad6ff2c9fbba5f180f6
'
,
},
},
},
},
timeout
:
{
value
:
'
1m 40s
'
,
source
:
'
runner
'
,
},
merge_request
:
{
merge_request
:
{
iid
:
2
,
iid
:
2
,
path
:
'
/root/ci-mock/merge_requests/2
'
,
path
:
'
/root/ci-mock/merge_requests/2
'
,
...
...
spec/javascripts/jobs/sidebar_detail_row_spec.js
View file @
d34e937b
...
@@ -37,4 +37,21 @@ describe('Sidebar detail row', () => {
...
@@ -37,4 +37,21 @@ describe('Sidebar detail row', () => {
vm
.
$el
.
textContent
.
replace
(
/
\s
+/g
,
'
'
).
trim
(),
vm
.
$el
.
textContent
.
replace
(
/
\s
+/g
,
'
'
).
trim
(),
).
toEqual
(
'
this is the title: this is the value
'
);
).
toEqual
(
'
this is the title: this is the value
'
);
});
});
it
(
'
should not render help when helpUrl not provided
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.help-button
'
)).
toBeUndefined
();
});
beforeEach
(()
=>
{
vm
=
new
SidebarDetailRow
({
propsData
:
{
helpUrl
:
'
help url
'
,
},
}).
$mount
();
});
it
(
'
should render help when helpUrl is provided
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.help-button a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
'
help url
'
);
});
});
});
spec/javascripts/jobs/sidebar_details_block_spec.js
View file @
d34e937b
...
@@ -96,6 +96,12 @@ describe('Sidebar details block', () => {
...
@@ -96,6 +96,12 @@ describe('Sidebar details block', () => {
).
toEqual
(
'
Runner: #1
'
);
).
toEqual
(
'
Runner: #1
'
);
});
});
it
(
'
should render timeout information
'
,
()
=>
{
expect
(
trimWhitespace
(
vm
.
$el
.
querySelector
(
'
.js-job-timeout
'
)),
).
toEqual
(
'
Timeout: 1m 40s (from runner)
'
);
});
it
(
'
should render coverage
'
,
()
=>
{
it
(
'
should render coverage
'
,
()
=>
{
expect
(
expect
(
trimWhitespace
(
vm
.
$el
.
querySelector
(
'
.js-job-coverage
'
)),
trimWhitespace
(
vm
.
$el
.
querySelector
(
'
.js-job-coverage
'
)),
...
...
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