Commit 5bc97cd4 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix pipeline stage graph test example false positive

parent 253781db
...@@ -245,9 +245,9 @@ describe 'Pipelines', :feature, :js do ...@@ -245,9 +245,9 @@ describe 'Pipelines', :feature, :js do
context 'mini pipeline graph' do context 'mini pipeline graph' do
let!(:build) do let!(:build) do
create(:ci_build, pipeline: pipeline, create(:ci_build, :pending, pipeline: pipeline,
stage: 'build', stage: 'build',
name: 'build') name: 'build')
end end
before { visit_project_pipelines } before { visit_project_pipelines }
...@@ -257,18 +257,19 @@ describe 'Pipelines', :feature, :js do ...@@ -257,18 +257,19 @@ describe 'Pipelines', :feature, :js do
expect(page).to have_selector('.js-builds-dropdown-button') expect(page).to have_selector('.js-builds-dropdown-button')
end end
context 'when clicking a graph stage' do context 'when clicking a stage badge' do
it 'should open a dropdown' do it 'should open a dropdown' do
find('.js-builds-dropdown-button').trigger('click') find('.js-builds-dropdown-button').trigger('click')
expect(page).to have_link build.name expect(page).to have_link build.name
end 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('.js-builds-dropdown-button').trigger('click')
find('a.js-ci-action-icon').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 end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment