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
Léo-Paul Géneau
gitlab-ce
Commits
e8f14ef8
Commit
e8f14ef8
authored
Oct 05, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature spec for remaining time
parent
aeaa0261
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+3
-0
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+18
-0
No files found.
spec/features/projects/jobs_spec.rb
View file @
e8f14ef8
...
...
@@ -568,9 +568,12 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
end
it
'shows delayed job'
,
:js
do
time_diff
=
[
0
,
job
.
scheduled_at
-
Time
.
now
].
max
expect
(
page
).
to
have_content
(
job
.
detailed_status
(
user
).
illustration
[
:title
])
expect
(
page
).
to
have_content
(
'This is a scheduled to run in'
)
expect
(
page
).
to
have_content
(
"This job will automatically run after it's timer finishes."
)
expect
(
page
).
to
have_content
(
Time
.
at
(
time_diff
).
utc
.
strftime
(
"%H:%M:%S"
))
expect
(
page
).
to
have_link
(
'Unschedule job'
)
end
...
...
spec/features/projects/pipelines/pipelines_spec.rb
View file @
e8f14ef8
...
...
@@ -252,7 +252,25 @@ describe 'Pipelines', :js do
it
"has link to the delayed job's action"
do
find
(
'.js-pipeline-dropdown-manual-actions'
).
click
time_diff
=
[
0
,
delayed_job
.
scheduled_at
-
Time
.
now
].
max
expect
(
page
).
to
have_button
(
'delayed job'
)
expect
(
page
).
to
have_content
(
Time
.
at
(
time_diff
).
utc
.
strftime
(
"%H:%M:%S"
))
end
context
'when delayed job is expired already'
do
let!
(
:delayed_job
)
do
create
(
:ci_build
,
:expired_scheduled
,
pipeline:
pipeline
,
name:
'delayed job'
,
stage:
'test'
,
commands:
'test'
)
end
it
"shows 00:00:00 as the remaining time"
do
find
(
'.js-pipeline-dropdown-manual-actions'
).
click
expect
(
page
).
to
have_content
(
Time
.
at
(
time_diff
).
utc
.
strftime
(
"00:00:00"
))
end
end
context
'when user played a delayed job immediately'
do
...
...
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