Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/pipelines')
-rw-r--r--spec/features/projects/pipelines/legacy_pipeline_spec.rb31
-rw-r--r--spec/features/projects/pipelines/legacy_pipelines_spec.rb3
-rw-r--r--spec/features/projects/pipelines/pipeline_spec.rb9
-rw-r--r--spec/features/projects/pipelines/pipelines_spec.rb3
4 files changed, 39 insertions, 7 deletions
diff --git a/spec/features/projects/pipelines/legacy_pipeline_spec.rb b/spec/features/projects/pipelines/legacy_pipeline_spec.rb
index db6feecba03..14f60dfe061 100644
--- a/spec/features/projects/pipelines/legacy_pipeline_spec.rb
+++ b/spec/features/projects/pipelines/legacy_pipeline_spec.rb
@@ -385,6 +385,37 @@ RSpec.describe 'Pipeline', :js do
end
end
+ describe 'test tabs' do
+ let(:pipeline) { create(:ci_pipeline, :with_test_reports, :with_report_results, project: project) }
+
+ before do
+ stub_feature_flags(pipeline_tabs_vue: false)
+ visit_pipeline
+ wait_for_requests
+ 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
+
+ expect(page).to have_content('Jobs')
+ expect(page).to have_selector('[data-testid="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
+ end
+
context 'retrying jobs' do
before do
visit_pipeline
diff --git a/spec/features/projects/pipelines/legacy_pipelines_spec.rb b/spec/features/projects/pipelines/legacy_pipelines_spec.rb
index 15d889933bf..eb8f2de3aba 100644
--- a/spec/features/projects/pipelines/legacy_pipelines_spec.rb
+++ b/spec/features/projects/pipelines/legacy_pipelines_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe 'Pipelines', :js do
include Spec::Support::Helpers::ModalHelpers
let(:project) { create(:project) }
- let(:expected_detached_mr_tag) {'merge request'}
+ let(:expected_detached_mr_tag) { 'merge request' }
context 'when user is logged in' do
let(:user) { create(:user) }
@@ -727,6 +727,7 @@ RSpec.describe 'Pipelines', :js do
end
it { expect(page).to have_content('Missing CI config file') }
+
it 'creates a pipeline after first request failed and a valid gitlab-ci.yml file' \
'is available when trying again' do
stub_ci_pipeline_to_return_yaml_file
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb
index a83d4191f38..cfdd851cb80 100644
--- a/spec/features/projects/pipelines/pipeline_spec.rb
+++ b/spec/features/projects/pipelines/pipeline_spec.rb
@@ -394,7 +394,7 @@ RSpec.describe 'Pipeline', :js do
expect(page).to have_selector('button[aria-label="Cancel downstream pipeline"]')
end
- context 'when canceling' do
+ context 'when canceling', :sidekiq_inline do
before do
find('button[aria-label="Cancel downstream pipeline"]').click
wait_for_requests
@@ -515,18 +515,17 @@ RSpec.describe 'Pipeline', :js do
let(:pipeline) { create(:ci_pipeline, :with_test_reports, :with_report_results, project: project) }
before do
- stub_feature_flags(pipeline_tabs_vue: false)
visit_pipeline
wait_for_requests
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)
+ expect(page.find('[data-testid="tests-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
+ find('.gl-tab-nav-item', text: 'Tests').click
expect(page).to have_content('Jobs')
expect(page).to have_selector('[data-testid="tests-detail"]', visible: :all)
@@ -537,7 +536,7 @@ RSpec.describe 'Pipeline', :js 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")
+ expect(page.find('[data-testid="tests-counter"]', visible: :all).text).to eq("0")
end
end
end
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb
index 785edc69623..bf521971ae0 100644
--- a/spec/features/projects/pipelines/pipelines_spec.rb
+++ b/spec/features/projects/pipelines/pipelines_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe 'Pipelines', :js do
include Spec::Support::Helpers::ModalHelpers
let(:project) { create(:project) }
- let(:expected_detached_mr_tag) {'merge request'}
+ let(:expected_detached_mr_tag) { 'merge request' }
context 'when user is logged in' do
let(:user) { create(:user) }
@@ -710,6 +710,7 @@ RSpec.describe 'Pipelines', :js do
end
it { expect(page).to have_content('Missing CI config file') }
+
it 'creates a pipeline after first request failed and a valid gitlab-ci.yml file is available when trying again' do
stub_ci_pipeline_to_return_yaml_file