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
b678e07e
Commit
b678e07e
authored
Nov 02, 2018
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run yarn prettier-all-save
parent
7b846c67
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
app/assets/javascripts/jobs/components/job_container_item.vue
...assets/javascripts/jobs/components/job_container_item.vue
+1
-1
spec/javascripts/jobs/components/job_app_spec.js
spec/javascripts/jobs/components/job_app_spec.js
+6
-4
spec/javascripts/jobs/components/job_container_item_spec.js
spec/javascripts/jobs/components/job_container_item_spec.js
+3
-5
No files found.
app/assets/javascripts/jobs/components/job_container_item.vue
View file @
b678e07e
...
...
@@ -31,7 +31,7 @@ export default {
const
text
=
`
${
name
}
-
${
status
.
tooltip
}
`
;
if
(
this
.
isDelayedJob
)
{
return
sprintf
(
text
,
{
remainingTime
:
this
.
remainingTime
})
return
sprintf
(
text
,
{
remainingTime
:
this
.
remainingTime
})
;
}
return
text
;
...
...
spec/javascripts/jobs/components/job_app_spec.js
View file @
b678e07e
...
...
@@ -422,17 +422,19 @@ describe('Job App ', () => {
},
0
);
});
it
(
'
displays remaining time for a delayed job
'
,
(
done
)
=>
{
it
(
'
displays remaining time for a delayed job
'
,
done
=>
{
const
oneHourInMilliseconds
=
3600000
;
spyOn
(
Date
,
'
now
'
).
and
.
callFake
(()
=>
new
Date
(
delayedJobFixture
.
scheduled_at
).
getTime
()
-
oneHourInMilliseconds
);
mock
.
onGet
(
props
.
endpoint
).
replyOnce
(
200
,
{
...
delayedJobFixture
});
spyOn
(
Date
,
'
now
'
).
and
.
callFake
(
()
=>
new
Date
(
delayedJobFixture
.
scheduled_at
).
getTime
()
-
oneHourInMilliseconds
,
);
mock
.
onGet
(
props
.
endpoint
).
replyOnce
(
200
,
{
...
delayedJobFixture
});
vm
=
mountComponentWithStore
(
Component
,
{
props
,
store
,
});
store
.
subscribeAction
(
(
action
)
=>
{
store
.
subscribeAction
(
action
=>
{
if
(
action
.
type
!==
'
receiveJobSuccess
'
)
{
return
;
}
...
...
spec/javascripts/jobs/components/job_container_item_spec.js
View file @
b678e07e
...
...
@@ -88,11 +88,9 @@ describe('JobContainerItem', () => {
Vue
.
nextTick
()
.
then
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.js-job-link
'
)
.
getAttribute
(
'
data-original-title
'
),
).
toEqual
(
'
delayed job - delayed manual action (00:22:17)
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-job-link
'
).
getAttribute
(
'
data-original-title
'
)).
toEqual
(
'
delayed job - delayed manual action (00:22:17)
'
,
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
...
...
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