diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/features/projects/pipelines/pipeline_spec.rb | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/features/projects/pipelines/pipeline_spec.rb')
-rw-r--r-- | spec/features/projects/pipelines/pipeline_spec.rb | 72 |
1 files changed, 18 insertions, 54 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index 2ca584ab8f6..26c46190e7d 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -137,6 +137,7 @@ RSpec.describe 'Pipeline', :js do source_project: project, source_branch: pipeline.ref) end + let!(:merge_request2) do create(:merge_request, source_project: project, @@ -363,66 +364,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 @@ -436,7 +400,7 @@ RSpec.describe 'Pipeline', :js do context 'when retrying' do before do - find('.js-retry-button').click + find('[data-testid="retryButton"]').click end it 'does not show a "Retry" button', :sidekiq_might_not_need_inline do @@ -938,7 +902,7 @@ RSpec.describe 'Pipeline', :js do context 'when retrying' do before do - find('.js-retry-button').click + find('[data-testid="retryButton"]').click end it 'does not show a "Retry" button', :sidekiq_might_not_need_inline do |