diff options
Diffstat (limited to 'spec/features/projects/pipelines/pipeline_spec.rb')
-rw-r--r-- | spec/features/projects/pipelines/pipeline_spec.rb | 112 |
1 files changed, 4 insertions, 108 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index 01c942aec4c..6b9dfdf3a7b 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -477,7 +477,7 @@ RSpec.describe 'Pipeline', :js do it 'redirects to pipeline overview page', :sidekiq_inline do expect(page).to have_content('The pipeline has been deleted') - expect(current_path).to eq(project_pipelines_path(project)) + expect(page).to have_current_path(project_pipelines_path(project), ignore_query: true) end end @@ -916,111 +916,7 @@ RSpec.describe 'Pipeline', :js do end end - describe 'GET /:project/-/pipelines/:id/builds with jobs_tab_vue feature flag turned off' do - include_context 'pipeline builds' - - let_it_be(:project) { create(:project, :repository) } - - let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: project.commit.id) } - - before do - stub_feature_flags(jobs_tab_vue: false) - visit builds_project_pipeline_path(project, pipeline) - end - - it 'shows a list of jobs' do - expect(page).to have_content('Test') - expect(page).to have_content(build_passed.id) - expect(page).to have_content('Deploy') - expect(page).to have_content(build_failed.id) - expect(page).to have_content(build_running.id) - expect(page).to have_content(build_external.id) - expect(page).to have_content('Retry') - expect(page).to have_content('Cancel running') - expect(page).to have_link('Play') - end - - it 'shows jobs tab pane as active' do - expect(page).to have_css('#js-tab-builds.active') - end - - context 'page tabs' do - it 'shows Pipeline, Jobs and DAG tabs with link' do - expect(page).to have_link('Pipeline') - expect(page).to have_link('Jobs') - expect(page).to have_link('Needs') - end - - it 'shows counter in Jobs tab' do - expect(page.find('.js-builds-counter').text).to eq(pipeline.total_size.to_s) - end - - it 'shows Jobs tab as active' do - expect(page).to have_css('li.js-builds-tab-link .active') - end - end - - context 'retrying jobs' do - it { expect(page).not_to have_content('retried') } - - context 'when retrying' do - before do - find('[data-testid="retryPipeline"]').click - end - - it 'does not show a "Retry" button', :sidekiq_might_not_need_inline do - expect(page).not_to have_content('Retry') - end - end - end - - context 'canceling jobs' do - it { expect(page).not_to have_selector('.ci-canceled') } - - context 'when canceling' do - before do - click_on 'Cancel running' - end - - it 'does not show a "Cancel running" button', :sidekiq_might_not_need_inline do - expect(page).not_to have_content('Cancel running') - end - end - end - - context 'playing manual job' do - before do - within '.pipeline-holder' do - click_link('Play') - end - end - - it { expect(build_manual.reload).to be_pending } - end - - context 'when user unschedules a delayed job' do - before do - within '.pipeline-holder' do - click_link('Unschedule') - end - end - - it 'unschedules the delayed job and shows play button as a manual job' do - expect(page).to have_content('Trigger this manual action') - end - end - - context 'failed jobs' do - it 'displays a tooltip with the failure reason' do - page.within('.ci-table') do - failed_job_link = page.find('.ci-failed') - expect(failed_job_link[:title]).to eq('Failed - (unknown failure)') - end - end - end - end - - describe 'GET /:project/-/pipelines/:id/builds with jobs_tab_vue feature flag turned on' do + describe 'GET /:project/-/pipelines/:id/builds' do include_context 'pipeline builds' let_it_be(:project) { create(:project, :repository) } @@ -1228,7 +1124,7 @@ RSpec.describe 'Pipeline', :js do it 'displays the pipeline graph' do subject - expect(current_path).to eq(pipeline_path(pipeline)) + expect(page).to have_current_path(pipeline_path(pipeline), ignore_query: true) expect(page).not_to have_content('Failed Jobs') expect(page).to have_selector('.js-pipeline-graph') end @@ -1413,7 +1309,7 @@ RSpec.describe 'Pipeline', :js do it 'contains badge that indicates detached merge request pipeline' do page.within(all('.well-segment')[1]) do - expect(page).to have_content 'detached' + expect(page).to have_content 'merge request' end end end |