summaryrefslogtreecommitdiff
path: root/spec/features/projects/pipelines/pipeline_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/pipelines/pipeline_spec.rb')
-rw-r--r--spec/features/projects/pipelines/pipeline_spec.rb44
1 files changed, 10 insertions, 34 deletions
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