From 5bc97cd48388c82a1fab8d16332a7401d11a170d Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 5 Jan 2017 22:25:29 +0100 Subject: Fix pipeline stage graph test example false positive --- spec/features/projects/pipelines/pipelines_spec.rb | 13 +++++++------ 1 file 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 -- cgit v1.2.1