diff options
Diffstat (limited to 'spec/features/projects/pipelines')
-rw-r--r-- | spec/features/projects/pipelines/pipeline_spec.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index 8d9a397de9a..63c0695fe95 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -359,13 +359,27 @@ describe 'Pipeline', :js do context 'test tabs' do let(:pipeline) { create(:ci_pipeline, :with_test_reports, project: project) } - it 'shows badge counter in Tests tab' do + before do visit_pipeline wait_for_requests + end + 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('Test suites') + expect(page).to have_selector('.js-tests-detail', visible: :all) + end end context 'retrying jobs' do |