diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2016-11-25 09:48:04 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2016-11-25 09:48:04 +0000 |
commit | afe90d529c82566886d1f2513dd6bee4fa73ff94 (patch) | |
tree | abce0a1bd9403f9157fbad2875159220ac1a213e /spec/features/projects | |
parent | 90a3b3ab5680d6b62de0aa446da52e01d378f81e (diff) | |
parent | bd3a544ab0417b758cf5e8e5bcd4ae9c0fed1bae (diff) | |
download | gitlab-ce-afe90d529c82566886d1f2513dd6bee4fa73ff94.tar.gz |
Merge branch 'fix-cancelling-pipelines' into 'master'
Improve how we could cancel pipelines:
Improve how we could cancel pipelines:
* Introduce `HasStatus.cancelable` which we might be able to cancel
* Cancel and check upon `cancelable`
* Also cancel on `CommitStatus` rather than just `Ci::Build`
Fixes #23635
Fixes #17845
See merge request !7508
Diffstat (limited to 'spec/features/projects')
-rw-r--r-- | spec/features/projects/pipelines_spec.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/features/projects/pipelines_spec.rb b/spec/features/projects/pipelines_spec.rb index 002c6f6b359..10e5466fc85 100644 --- a/spec/features/projects/pipelines_spec.rb +++ b/spec/features/projects/pipelines_spec.rb @@ -90,13 +90,20 @@ describe "Pipelines" do visit namespace_project_pipelines_path(project.namespace, project) end - it 'is not cancelable' do - expect(page).not_to have_link('Cancel') + it 'is cancelable' do + expect(page).to have_link('Cancel') end it 'has pipeline running' do 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') } + end end context 'when failed' do |