summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-05 15:14:06 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-05 15:14:06 +0100
commit0d15c8b3d489e27fe410f266456c5325e416730c (patch)
tree3f4834fc99a862cda42785d52b125ff93123d799
parentb5dfd03efc1769240b20f0e53ff92e2b2319cbc7 (diff)
downloadgitlab-ce-0d15c8b3d489e27fe410f266456c5325e416730c.tar.gz
Combine some tests in pipelines specs to speed it up
-rw-r--r--spec/features/projects/pipelines/pipelines_spec.rb32
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