diff options
| author | Filipa Lacerda <filipa@gitlab.com> | 2017-03-17 17:30:32 +0000 |
|---|---|---|
| committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-03-17 17:30:32 +0000 |
| commit | b0f2cbceb3b881854de8c36be848d43a5b32a484 (patch) | |
| tree | 184671810abcf4df609500dab030a5f514b532ab /spec/features/projects | |
| parent | bb1620aaf712c22c61fda098260f481ad79a05e2 (diff) | |
| download | gitlab-ce-b0f2cbceb3b881854de8c36be848d43a5b32a484.tar.gz | |
Remove UJS actions from pipelines tables
Diffstat (limited to 'spec/features/projects')
| -rw-r--r-- | spec/features/projects/pipelines/pipelines_spec.rb | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index 22bf1bfbdf0..162056671e0 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -99,15 +99,18 @@ describe 'Pipelines', :feature, :js do end it 'indicates that pipeline can be canceled' do - expect(page).to have_link('Cancel') + expect(page).to have_selector('.js-pipelines-cancel-button') expect(page).to have_selector('.ci-running') end context 'when canceling' do - before { click_link('Cancel') } + before do + find('.js-pipelines-cancel-button').click + wait_for_vue_resource + end it 'indicated that pipelines was canceled' do - expect(page).not_to have_link('Cancel') + expect(page).not_to have_selector('.js-pipelines-cancel-button') expect(page).to have_selector('.ci-canceled') end end @@ -126,15 +129,18 @@ describe 'Pipelines', :feature, :js do end it 'indicates that pipeline can be retried' do - expect(page).to have_link('Retry') + expect(page).to have_selector('.js-pipelines-retry-button') expect(page).to have_selector('.ci-failed') end context 'when retrying' do - before { click_link('Retry') } + before do + find('.js-pipelines-retry-button').click + wait_for_vue_resource + end it 'shows running pipeline that is not retryable' do - expect(page).not_to have_link('Retry') + expect(page).not_to have_selector('.js-pipelines-retry-button') expect(page).to have_selector('.ci-running') end end @@ -176,17 +182,17 @@ describe 'Pipelines', :feature, :js do it 'has link to the manual action' do find('.js-pipeline-dropdown-manual-actions').click - expect(page).to have_link('manual build') + expect(page).to have_button('manual build') end context 'when manual action was played' do before do find('.js-pipeline-dropdown-manual-actions').click - click_link('manual build') + click_button('manual build') end it 'enqueues manual action job' do - expect(manual.reload).to be_pending + expect(page).to have_selector('.js-pipeline-dropdown-manual-actions:disabled') end end end @@ -203,7 +209,7 @@ describe 'Pipelines', :feature, :js do before { visit_project_pipelines } it 'is cancelable' do - expect(page).to have_link('Cancel') + expect(page).to have_selector('.js-pipelines-cancel-button') end it 'has pipeline running' do @@ -211,10 +217,10 @@ describe 'Pipelines', :feature, :js do end context 'when canceling' do - before { click_link('Cancel') } + before { find('.js-pipelines-cancel-button').trigger('click') } it 'indicates that pipeline was canceled' do - expect(page).not_to have_link('Cancel') + expect(page).not_to have_selector('.js-pipelines-cancel-button') expect(page).to have_selector('.ci-canceled') end end @@ -233,7 +239,7 @@ describe 'Pipelines', :feature, :js do end it 'is not retryable' do - expect(page).not_to have_link('Retry') + expect(page).not_to have_selector('.js-pipelines-retry-button') end it 'has failed pipeline' do |
