Commit 253781db authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix pipelines feature specs after invalid merge

parent c71a88a7
...@@ -243,7 +243,7 @@ describe 'Pipelines', :feature, :js do ...@@ -243,7 +243,7 @@ describe 'Pipelines', :feature, :js do
end end
end end
context 'mini pipleine graph' do context 'mini pipeline graph' do
let!(:build) do let!(:build) do
create(:ci_build, pipeline: pipeline, create(:ci_build, pipeline: pipeline,
stage: 'build', stage: 'build',
...@@ -252,6 +252,11 @@ describe 'Pipelines', :feature, :js do ...@@ -252,6 +252,11 @@ describe 'Pipelines', :feature, :js do
before { visit_project_pipelines } before { visit_project_pipelines }
it 'should render a mini pipeline graph' do
expect(page).to have_selector('.js-mini-pipeline-graph')
expect(page).to have_selector('.js-builds-dropdown-button')
end
context 'when clicking a graph stage' do context 'when clicking a graph stage' 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')
...@@ -261,8 +266,8 @@ describe 'Pipelines', :feature, :js do ...@@ -261,8 +266,8 @@ describe 'Pipelines', :feature, :js do
it 'should be possible to retry the failed build' do it 'should be possible to retry the failed 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.ci-action-icon-container').trigger('click')
expect(page).not_to have_content('Cancel running') expect(page).not_to have_content('Cancel running')
end end
end end
...@@ -279,15 +284,8 @@ describe 'Pipelines', :feature, :js do ...@@ -279,15 +284,8 @@ describe 'Pipelines', :feature, :js do
context 'for valid commit' do context 'for valid commit' do
before { fill_in('pipeline[ref]', with: 'master') } before { fill_in('pipeline[ref]', with: 'master') }
expect(page).to have_selector('.js-mini-pipeline-graph') context 'with gitlab-ci.yml' do
expect(page).to have_selector(".js-builds-dropdown-button[data-stage-endpoint='#{endpoint}']") before { stub_ci_pipeline_to_return_yaml_file }
end
context 'when clicking a graph stage' do
it 'should open a dropdown' do
find('.js-builds-dropdown-button').trigger('click')
wait_for_ajax
it 'creates a new pipeline' do it 'creates a new pipeline' do
expect { click_on 'Create pipeline' } expect { click_on 'Create pipeline' }
...@@ -298,10 +296,7 @@ describe 'Pipelines', :feature, :js do ...@@ -298,10 +296,7 @@ describe 'Pipelines', :feature, :js do
context 'without gitlab-ci.yml' do context 'without gitlab-ci.yml' do
before { click_on 'Create pipeline' } before { click_on 'Create pipeline' }
wait_for_ajax it { expect(page).to have_content('Missing .gitlab-ci.yml file') }
find('a.js-ci-action-icon').trigger('click')
expect(page).not_to have_content('Cancel running')
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