diff options
Diffstat (limited to 'spec/features/projects/pipelines/pipeline_spec.rb')
-rw-r--r-- | spec/features/projects/pipelines/pipeline_spec.rb | 67 |
1 files changed, 15 insertions, 52 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index 2ca584ab8f6..f0b4d2e88b2 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -363,66 +363,29 @@ RSpec.describe 'Pipeline', :js do describe 'test tabs' do let(:pipeline) { create(:ci_pipeline, :with_test_reports, :with_report_results, project: project) } - context 'with build_report_summary feature flag disabled' do - before do - stub_feature_flags(build_report_summary: false) - visit_pipeline - wait_for_requests - end - - context 'with test reports' do - it 'shows badge counter in Tests tab' do - expect(pipeline.test_reports.total_count).to eq(4) - expect(page.find('.js-test-report-badge-counter').text).to eq(pipeline.test_reports.total_count.to_s) - end - - it 'does not call test_report.json endpoint by default', :js do - expect(page).to have_selector('.js-no-tests-to-show', visible: :all) - end - - it 'does call test_report.json endpoint when tab is selected', :js do - find('.js-tests-tab-link').click - wait_for_requests - - expect(page).to have_content('Jobs') - expect(page).to have_selector('.js-tests-detail', visible: :all) - end - end - - context 'without test reports' do - let(:pipeline) { create(:ci_pipeline, project: project) } - - it 'shows zero' do - expect(page.find('.js-test-report-badge-counter', visible: :all).text).to eq("0") - end - end + before do + visit_pipeline + wait_for_requests end - context 'with build_report_summary feature flag enabled' do - before do - visit_pipeline - wait_for_requests + context 'with test reports' do + it 'shows badge counter in Tests tab' do + expect(page.find('.js-test-report-badge-counter').text).to eq(pipeline.test_report_summary.total_count.to_s) end - context 'with test reports' do - it 'shows badge counter in Tests tab' do - expect(page.find('.js-test-report-badge-counter').text).to eq(pipeline.test_report_summary.total_count.to_s) - end - - it 'calls summary.json endpoint', :js do - find('.js-tests-tab-link').click + it 'calls summary.json endpoint', :js do + find('.js-tests-tab-link').click - expect(page).to have_content('Jobs') - expect(page).to have_selector('.js-tests-detail', visible: :all) - end + expect(page).to have_content('Jobs') + expect(page).to have_selector('.js-tests-detail', visible: :all) end + end - context 'without test reports' do - let(:pipeline) { create(:ci_pipeline, project: project) } + context 'without test reports' do + let(:pipeline) { create(:ci_pipeline, project: project) } - it 'shows zero' do - expect(page.find('.js-test-report-badge-counter', visible: :all).text).to eq("0") - end + it 'shows zero' do + expect(page.find('.js-test-report-badge-counter', visible: :all).text).to eq("0") end end end |