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
...
@@ -574,7 +574,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
expect
(
page
).
to
have_link
(
'Unschedule job'
)
expect
(
page
).
to
have_link
(
'Unschedule job'
)
end
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'
click_link
'Unschedule job'
wait_for_requests
wait_for_requests
...
...
spec/features/projects/pipelines/pipeline_spec.rb
View file @
4741c07f
...
@@ -84,7 +84,7 @@ describe 'Pipeline', :js do
...
@@ -84,7 +84,7 @@ describe 'Pipeline', :js do
end
end
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
find
(
'#ci-badge-deploy .ci-action-icon-container'
).
click
page
.
within
(
'#ci-badge-deploy'
)
do
page
.
within
(
'#ci-badge-deploy'
)
do
...
@@ -112,8 +112,8 @@ describe 'Pipeline', :js do
...
@@ -112,8 +112,8 @@ describe 'Pipeline', :js do
end
end
end
end
context
'when pipeline has
scheduled builds
'
do
context
'when pipeline has
a delayed job
'
do
it
'shows the scheduled icon and a
unschedule action for the scheduled build
'
do
it
'shows the scheduled icon and a
n unschedule action for the delayed job
'
do
page
.
within
(
'#ci-badge-delayed-job'
)
do
page
.
within
(
'#ci-badge-delayed-job'
)
do
expect
(
page
).
to
have_selector
(
'.js-ci-status-icon-scheduled'
)
expect
(
page
).
to
have_selector
(
'.js-ci-status-icon-scheduled'
)
expect
(
page
).
to
have_content
(
'delayed-job'
)
expect
(
page
).
to
have_content
(
'delayed-job'
)
...
@@ -124,10 +124,12 @@ describe 'Pipeline', :js do
...
@@ -124,10 +124,12 @@ describe 'Pipeline', :js do
end
end
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
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
end
end
...
@@ -341,14 +343,16 @@ describe 'Pipeline', :js do
...
@@ -341,14 +343,16 @@ describe 'Pipeline', :js do
it
{
expect
(
build_manual
.
reload
).
to
be_pending
}
it
{
expect
(
build_manual
.
reload
).
to
be_pending
}
end
end
context
'
unscheduling schedul
ed job'
do
context
'
when user unschedules a delay
ed job'
do
before
do
before
do
within
'.pipeline-holder'
do
within
'.pipeline-holder'
do
click_link
(
'Unschedule'
)
click_link
(
'Unschedule'
)
end
end
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
end
context
'failed jobs'
do
context
'failed jobs'
do
...
...
spec/features/projects/pipelines/pipelines_spec.rb
View file @
4741c07f
...
@@ -232,7 +232,7 @@ describe 'Pipelines', :js do
...
@@ -232,7 +232,7 @@ describe 'Pipelines', :js do
end
end
end
end
context
'w
ith
delayed job'
do
context
'w
hen there is a
delayed job'
do
let!
(
:delayed_job
)
do
let!
(
:delayed_job
)
do
create
(
:ci_build
,
:scheduled
,
create
(
:ci_build
,
:scheduled
,
pipeline:
pipeline
,
pipeline:
pipeline
,
...
@@ -245,26 +245,25 @@ describe 'Pipelines', :js do
...
@@ -245,26 +245,25 @@ describe 'Pipelines', :js do
visit_project_pipelines
visit_project_pipelines
end
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'
)
expect
(
page
).
to
have_selector
(
'.dropdown-new.btn.btn-default .icon-play'
)
end
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
find
(
'.js-pipeline-dropdown-manual-actions'
).
click
expect
(
page
).
to
have_button
(
'delayed job'
)
expect
(
page
).
to
have_button
(
'delayed job'
)
end
end
context
'when
scheduled action was played
'
do
context
'when
user played a delayed job immediately
'
do
before
do
before
do
accept_confirm
do
find
(
'.js-pipeline-dropdown-manual-actions'
).
click
find
(
'.js-pipeline-dropdown-manual-actions'
).
click
page
.
accept_confirm
{
click_button
(
'delayed job'
)
}
click_button
(
'delayed job'
)
wait_for_requests
end
end
end
it
'enqueues
scheduled action job'
do
it
'enqueues
the delayed job'
,
:js
do
expect
(
page
).
to
have_selector
(
'.js-pipeline-dropdown-manual-actions:disabled'
)
expect
(
delayed_job
.
reload
).
to
be_pending
end
end
end
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