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
4741c07f
Commit
4741c07f
authored
Oct 04, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Groomed specs
parent
e4ed981f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
18 deletions
+21
-18
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+1
-1
spec/features/projects/pipelines/pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+11
-7
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+9
-10
No files found.
spec/features/projects/jobs_spec.rb
View file @
4741c07f
...
...
@@ -574,7 +574,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
expect
(
page
).
to
have_link
(
'Unschedule job'
)
end
it
'unschedule delayed job and shows manual action'
,
:js
do
it
'unschedule
s
delayed job and shows manual action'
,
:js
do
click_link
'Unschedule job'
wait_for_requests
...
...
spec/features/projects/pipelines/pipeline_spec.rb
View file @
4741c07f
...
...
@@ -84,7 +84,7 @@ describe 'Pipeline', :js do
end
end
it
'
should be possible to cancel the running build
'
do
it
'
cancels the running build and shows retry button
'
do
find
(
'#ci-badge-deploy .ci-action-icon-container'
).
click
page
.
within
(
'#ci-badge-deploy'
)
do
...
...
@@ -112,8 +112,8 @@ describe 'Pipeline', :js do
end
end
context
'when pipeline has
scheduled builds
'
do
it
'shows the scheduled icon and a
unschedule action for the scheduled build
'
do
context
'when pipeline has
a delayed job
'
do
it
'shows the scheduled icon and a
n unschedule action for the delayed job
'
do
page
.
within
(
'#ci-badge-delayed-job'
)
do
expect
(
page
).
to
have_selector
(
'.js-ci-status-icon-scheduled'
)
expect
(
page
).
to
have_content
(
'delayed-job'
)
...
...
@@ -124,10 +124,12 @@ describe 'Pipeline', :js do
end
end
it
'
should be possible to unschedule the scheduled
job'
do
it
'
unschedules the delayed job and shows play button as a manual
job'
do
find
(
'#ci-badge-delayed-job .ci-action-icon-container'
).
click
expect
(
page
).
not_to
have_content
(
'Unschedule job'
)
page
.
within
(
'#ci-badge-delayed-job'
)
do
expect
(
page
).
to
have_css
(
'.js-icon-play'
)
end
end
end
...
...
@@ -341,14 +343,16 @@ describe 'Pipeline', :js do
it
{
expect
(
build_manual
.
reload
).
to
be_pending
}
end
context
'
unscheduling schedul
ed job'
do
context
'
when user unschedules a delay
ed job'
do
before
do
within
'.pipeline-holder'
do
click_link
(
'Unschedule'
)
end
end
it
{
expect
(
build_scheduled
.
reload
).
to
be_manual
}
it
'unschedules the delayed job and shows play button as a manual job'
do
expect
(
page
).
to
have_content
(
'Trigger this manual action'
)
end
end
context
'failed jobs'
do
...
...
spec/features/projects/pipelines/pipelines_spec.rb
View file @
4741c07f
...
...
@@ -232,7 +232,7 @@ describe 'Pipelines', :js do
end
end
context
'w
ith
delayed job'
do
context
'w
hen there is a
delayed job'
do
let!
(
:delayed_job
)
do
create
(
:ci_build
,
:scheduled
,
pipeline:
pipeline
,
...
...
@@ -245,26 +245,25 @@ describe 'Pipelines', :js do
visit_project_pipelines
end
it
'has a dropdown
with play button
'
do
it
'has a dropdown
for actionable jobs
'
do
expect
(
page
).
to
have_selector
(
'.dropdown-new.btn.btn-default .icon-play'
)
end
it
'has link to the scheduled action'
do
it
"has link to the delayed job's action"
do
find
(
'.js-pipeline-dropdown-manual-actions'
).
click
expect
(
page
).
to
have_button
(
'delayed job'
)
end
context
'when
scheduled action was played
'
do
context
'when
user played a delayed job immediately
'
do
before
do
accept_confirm
do
find
(
'.js-pipeline-dropdown-manual-actions'
).
click
click_button
(
'delayed job'
)
end
find
(
'.js-pipeline-dropdown-manual-actions'
).
click
page
.
accept_confirm
{
click_button
(
'delayed job'
)
}
wait_for_requests
end
it
'enqueues
scheduled action job'
do
expect
(
page
).
to
have_selector
(
'.js-pipeline-dropdown-manual-actions:disabled'
)
it
'enqueues
the delayed job'
,
:js
do
expect
(
delayed_job
.
reload
).
to
be_pending
end
end
end
...
...
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