diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-10-03 16:11:08 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-10-03 16:11:08 +0900 |
commit | 9621bbb94cde3d33fce3c2c25fb98748f7a1824a (patch) | |
tree | 06d33f40872a646d2fce8141ef8a50770260e6d0 /spec/features/projects/pipelines/pipelines_spec.rb | |
parent | 1da4ae719a704125738f2be2544ba134ebfec385 (diff) | |
download | gitlab-ce-9621bbb94cde3d33fce3c2c25fb98748f7a1824a.tar.gz |
Add feature spec
Diffstat (limited to 'spec/features/projects/pipelines/pipelines_spec.rb')
-rw-r--r-- | spec/features/projects/pipelines/pipelines_spec.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index 41822babbc9..43f9608e8e3 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -232,6 +232,43 @@ describe 'Pipelines', :js do end end + context 'with delayed job' do + let!(:delayed_job) do + create(:ci_build, :scheduled, + pipeline: pipeline, + name: 'delayed job', + stage: 'test', + commands: 'test') + end + + before do + visit_project_pipelines + end + + it 'has a dropdown with play button' do + expect(page).to have_selector('.dropdown-new.btn.btn-default .icon-play') + end + + it 'has link to the scheduled action' do + find('.js-pipeline-dropdown-manual-actions').click + + expect(page).to have_button('delayed job') + end + + context 'when scheduled action was played' do + before do + accept_confirm do + find('.js-pipeline-dropdown-manual-actions').click + click_button('delayed job') + end + end + + it 'enqueues scheduled action job' do + expect(page).to have_selector('.js-pipeline-dropdown-manual-actions:disabled') + end + end + end + context 'for generic statuses' do context 'when running' do let!(:running) do |