diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-05 15:14:06 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-05 15:14:06 +0100 |
commit | 0d15c8b3d489e27fe410f266456c5325e416730c (patch) | |
tree | 3f4834fc99a862cda42785d52b125ff93123d799 | |
parent | b5dfd03efc1769240b20f0e53ff92e2b2319cbc7 (diff) | |
download | gitlab-ce-0d15c8b3d489e27fe410f266456c5325e416730c.tar.gz |
Combine some tests in pipelines specs to speed it up
-rw-r--r-- | spec/features/projects/pipelines/pipelines_spec.rb | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index 05c546a2f18..97b91e74c85 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -1,5 +1,4 @@ require 'spec_helper' -require 'rails_helper' describe 'Pipelines', :feature, :js do include WaitForVueResource @@ -51,15 +50,18 @@ describe 'Pipelines', :feature, :js do visit_project_pipelines end - it { expect(page).to have_link('Cancel') } - - it { expect(page).to have_selector('.ci-running') } + it 'indicates that pipeline can be canceled' do + expect(page).to have_link('Cancel') + expect(page).to have_selector('.ci-running') + end context 'when canceling' do before { click_link('Cancel') } - it { expect(page).not_to have_link('Cancel') } - it { expect(page).to have_selector('.ci-canceled') } + it 'indicated that pipelines was canceled' do + expect(page).not_to have_link('Cancel') + expect(page).to have_selector('.ci-canceled') + end end end @@ -75,14 +77,18 @@ describe 'Pipelines', :feature, :js do visit_project_pipelines end - it { expect(page).to have_link('Retry') } - it { expect(page).to have_selector('.ci-failed') } + it 'indicates that pipeline can be retried' do + expect(page).to have_link('Retry') + expect(page).to have_selector('.ci-failed') + end context 'when retrying' do before { click_link('Retry') } - it { expect(page).not_to have_link('Retry') } - it { expect(page).to have_selector('.ci-running') } + it 'shows running pipeline that is not retryable' do + expect(page).not_to have_link('Retry') + expect(page).to have_selector('.ci-running') + end end end @@ -159,8 +165,10 @@ describe 'Pipelines', :feature, :js do context 'when canceling' do before { click_link('Cancel') } - it { expect(page).not_to have_link('Cancel') } - it { expect(page).to have_selector('.ci-canceled') } + it 'indicates that pipeline was canceled' do + expect(page).not_to have_link('Cancel') + expect(page).to have_selector('.ci-canceled') + end end end |