diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-28 15:08:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-28 15:08:39 +0300 |
commit | aaff41e10e8c03e545af9ba157e79f67686972a0 (patch) | |
tree | dbfc8ba40f533bd62bd1ffae500ebb43bceb5878 /spec/features | |
parent | c00c766f13d6e0291831a25434eb54057708cc47 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb b/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb index 8c4dbf5ebfd..f92fbbc0caa 100644 --- a/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb +++ b/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb @@ -34,6 +34,16 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', sign_in(user) end + # rubocop:disable RSpec/AvoidConditionalStatements + def mr_widget_title + if Gitlab.ee? + 'to be merged automatically when all merge checks pass' + else + 'to be merged automatically when the pipeline succeeds' + end + end + # rubocop:enable RSpec/AvoidConditionalStatements + context 'when a user created a merge request in the parent project' do let!(:merge_request) do create( @@ -163,7 +173,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', context 'when detached merge request pipeline is pending' do it 'waits the head pipeline' do - expect(page).to have_content('to be merged automatically when the pipeline succeeds') + expect(page).to have_content mr_widget_title expect(page).to have_button('Cancel auto-merge') end end @@ -177,7 +187,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', end it 'waits the head pipeline' do - expect(page).to have_content('to be merged automatically when the pipeline succeeds') + expect(page).to have_content mr_widget_title expect(page).to have_button('Cancel auto-merge') end end @@ -388,7 +398,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', context 'when detached merge request pipeline is pending' do it 'waits the head pipeline' do - expect(page).to have_content('to be merged automatically when the pipeline succeeds') + expect(page).to have_content mr_widget_title expect(page).to have_button('Cancel auto-merge') end end @@ -397,7 +407,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', before do detached_merge_request_pipeline.reload.succeed! - wait_for_requests + refresh end it 'merges the merge request' do @@ -414,7 +424,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', end it 'waits the head pipeline' do - expect(page).to have_content('to be merged automatically when the pipeline succeeds') + expect(page).to have_content mr_widget_title expect(page).to have_button('Cancel auto-merge') end end |