diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-05 22:25:29 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-05 22:25:29 +0100 |
commit | 5bc97cd48388c82a1fab8d16332a7401d11a170d (patch) | |
tree | 5ec8fdea9f57d56a0a68e5d7501089fb8a6beae1 | |
parent | 253781dbfcdd728260a6a1040b784c242d7ec114 (diff) | |
download | gitlab-ce-5bc97cd48388c82a1fab8d16332a7401d11a170d.tar.gz |
Fix pipeline stage graph test example false positive
-rw-r--r-- | spec/features/projects/pipelines/pipelines_spec.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index 3856d5b6b2e..3ba996e2e10 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -245,9 +245,9 @@ describe 'Pipelines', :feature, :js do context 'mini pipeline graph' do let!(:build) do - create(:ci_build, pipeline: pipeline, - stage: 'build', - name: 'build') + create(:ci_build, :pending, pipeline: pipeline, + stage: 'build', + name: 'build') end before { visit_project_pipelines } @@ -257,18 +257,19 @@ describe 'Pipelines', :feature, :js do expect(page).to have_selector('.js-builds-dropdown-button') end - context 'when clicking a graph stage' do + context 'when clicking a stage badge' do it 'should open a dropdown' do find('.js-builds-dropdown-button').trigger('click') expect(page).to have_link build.name end - it 'should be possible to retry the failed build' do + it 'should be possible to cancel pending build' do find('.js-builds-dropdown-button').trigger('click') find('a.js-ci-action-icon').trigger('click') - expect(page).not_to have_content('Cancel running') + expect(page).to have_content('canceled') + expect(build.reload).to be_canceled end end end |