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
699e1180
Commit
699e1180
authored
6 years ago
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes race condition in delayed job spec
parent
5a7a221f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
18 deletions
+6
-18
spec/javascripts/pipelines/graph/job_item_spec.js
spec/javascripts/pipelines/graph/job_item_spec.js
+6
-18
No files found.
spec/javascripts/pipelines/graph/job_item_spec.js
View file @
699e1180
...
@@ -140,28 +140,16 @@ describe('pipeline graph job item', () => {
...
@@ -140,28 +140,16 @@ describe('pipeline graph job item', () => {
});
});
describe
(
'
for delayed job
'
,
()
=>
{
describe
(
'
for delayed job
'
,
()
=>
{
beforeEach
(()
=>
{
it
(
'
displays remaining time in tooltip
'
,
()
=>
{
const
fifteenMinutesInMilliseconds
=
900000
;
spyOn
(
Date
,
'
now
'
).
and
.
callFake
(
()
=>
new
Date
(
delayedJobFixture
.
scheduled_at
).
getTime
()
-
fifteenMinutesInMilliseconds
,
);
});
it
(
'
displays remaining time in tooltip
'
,
done
=>
{
component
=
mountComponent
(
JobComponent
,
{
component
=
mountComponent
(
JobComponent
,
{
job
:
delayedJobFixture
,
job
:
delayedJobFixture
,
});
});
Vue
.
nextTick
()
.
then
(()
=>
{
expect
(
expect
(
component
.
$el
component
.
$el
.
querySelector
(
'
.js-pipeline-graph-job-link
'
)
.
querySelector
(
'
.js-pipeline-graph-job-link
'
)
.
getAttribute
(
'
data-original-title
'
),
.
getAttribute
(
'
data-original-title
'
),
).
toEqual
(
'
delayed job - delayed manual action (00:15:00)
'
);
).
toEqual
(
`delayed job - delayed manual action (
${
component
.
remainingTime
}
)`
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
});
});
});
});
});
This diff is collapsed.
Click to expand it.
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