diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/features/projects/pipelines | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/features/projects/pipelines')
-rw-r--r-- | spec/features/projects/pipelines/legacy_pipelines_spec.rb | 0 | ||||
-rw-r--r-- | spec/features/projects/pipelines/pipeline_spec.rb | 44 | ||||
-rw-r--r-- | spec/features/projects/pipelines/pipelines_spec.rb | 21 |
3 files changed, 19 insertions, 46 deletions
diff --git a/spec/features/projects/pipelines/legacy_pipelines_spec.rb b/spec/features/projects/pipelines/legacy_pipelines_spec.rb new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/spec/features/projects/pipelines/legacy_pipelines_spec.rb diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index d6067e22952..d5739386a30 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -18,6 +18,8 @@ RSpec.describe 'Pipeline', :js, feature_category: :projects do end shared_context 'pipeline builds' do + let!(:external_stage) { create(:ci_stage, name: 'external', pipeline: pipeline) } + let!(:build_passed) do create(:ci_build, :success, pipeline: pipeline, stage: 'build', stage_idx: 0, name: 'build') @@ -52,7 +54,7 @@ RSpec.describe 'Pipeline', :js, feature_category: :projects do create(:generic_commit_status, status: 'success', pipeline: pipeline, name: 'jenkins', - stage: 'external', + ci_stage: external_stage, ref: 'master', target_url: 'http://gitlab.com/status') end @@ -98,42 +100,16 @@ RSpec.describe 'Pipeline', :js, feature_category: :projects do end end - context 'with pipeline_name feature flag enabled' do - before do - stub_feature_flags(pipeline_name: true) - end - - it 'displays pipeline name instead of commit title' do - visit_pipeline - - within 'h3' do - expect(page).to have_content(pipeline.name) - end - - within '.well-segment[data-testid="commit-row"]' do - expect(page).to have_content(project.commit.title) - expect(page).to have_content(project.commit.short_id) - end - end - end + it 'displays pipeline name instead of commit title' do + visit_pipeline - context 'with pipeline_name feature flag disabled' do - before do - stub_feature_flags(pipeline_name: false) + within 'h3' do + expect(page).to have_content(pipeline.name) end - it 'displays commit title' do - visit_pipeline - - within 'h3' do - expect(page).not_to have_content(pipeline.name) - expect(page).to have_content(project.commit.title) - end - - within '.well-segment[data-testid="commit-row"]' do - expect(page).not_to have_content(project.commit.title) - expect(page).to have_content(project.commit.short_id) - end + within '.well-segment[data-testid="commit-row"]' do + expect(page).to have_content(project.commit.title) + expect(page).to have_content(project.commit.short_id) end end diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index 3bdabd672c7..6a44f421249 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -3,6 +3,7 @@ require 'spec_helper' RSpec.describe 'Pipelines', :js, feature_category: :projects do + include ListboxHelpers include ProjectForksHelper include Spec::Support::Helpers::ModalHelpers @@ -594,7 +595,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :projects do end it 'changes the Pipeline ID column for Pipeline IID' do - page.find('[data-testid="pipeline-key-dropdown"]').click + page.find('[data-testid="pipeline-key-collapsible-box"]').click within '.gl-dropdown-contents' do dropdown_options = page.find_all '.gl-dropdown-item' @@ -618,6 +619,8 @@ RSpec.describe 'Pipelines', :js, feature_category: :projects do user: user) end + let(:external_stage) { create(:ci_stage, name: 'external', pipeline: pipeline) } + before do create_build('build', 0, 'build', :success) create_build('test', 1, 'rspec 0:2', :pending) @@ -627,7 +630,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :projects do create_build('test', 1, 'audit', :created) create_build('deploy', 2, 'production', :created) - create(:generic_commit_status, pipeline: pipeline, stage: 'external', name: 'jenkins', stage_idx: 3, ref: 'master') + create(:generic_commit_status, pipeline: pipeline, ci_stage: external_stage, name: 'jenkins', ref: 'master') visit project_pipeline_path(project, pipeline) wait_for_requests @@ -672,7 +675,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :projects do click_button project.default_branch wait_for_requests - find('p', text: 'master').click + find('.gl-dropdown-item', text: 'master').click wait_for_requests end @@ -776,8 +779,7 @@ RSpec.describe 'Pipelines', :js, feature_category: :projects do describe 'new pipeline page' do it 'has field to add a new pipeline' do - expect(page).to have_selector('[data-testid="ref-select"]') - expect(find('[data-testid="ref-select"]')).to have_content project.default_branch + expect(page).to have_button project.default_branch expect(page).to have_content('Run for') end end @@ -785,14 +787,9 @@ RSpec.describe 'Pipelines', :js, feature_category: :projects do describe 'find pipelines' do it 'shows filtered pipelines', :js do click_button project.default_branch + send_keys('fix') - page.within '[data-testid="ref-select"]' do - find('[data-testid="search-refs"]').native.send_keys('fix') - - page.within '.gl-dropdown-contents' do - expect(page).to have_content('fix') - end - end + expect_listbox_item('fix') end end end |