diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/settings/user_manages_merge_requests_settings_spec.rb | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/spec/features/projects/settings/user_manages_merge_requests_settings_spec.rb b/spec/features/projects/settings/user_manages_merge_requests_settings_spec.rb index b1c2bab08c0..28d52f25f56 100644 --- a/spec/features/projects/settings/user_manages_merge_requests_settings_spec.rb +++ b/spec/features/projects/settings/user_manages_merge_requests_settings_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'Projects > Settings > User manages merge request settings' do @@ -30,16 +31,16 @@ describe 'Projects > Settings > User manages merge request settings' do context 'when Merge Request and Pipelines are initially enabled', :js do context 'when Pipelines are initially enabled' do it 'shows the Merge Requests settings' do - expect(page).to have_content('Only allow merge requests to be merged if the pipeline succeeds') - expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved') + expect(page).to have_content 'Pipelines must succeed' + expect(page).to have_content 'All discussions must be resolved' within('.sharing-permissions-form') do find('.project-feature-controls[data-for="project[project_feature_attributes][merge_requests_access_level]"] .project-feature-toggle').click find('input[value="Save changes"]').send_keys(:return) end - expect(page).not_to have_content('Only allow merge requests to be merged if the pipeline succeeds') - expect(page).not_to have_content('Only allow merge requests to be merged if all discussions are resolved') + expect(page).not_to have_content 'Pipelines must succeed' + expect(page).not_to have_content 'All discussions must be resolved' end end @@ -50,16 +51,16 @@ describe 'Projects > Settings > User manages merge request settings' do end it 'shows the Merge Requests settings that do not depend on Builds feature' do - expect(page).not_to have_content('Only allow merge requests to be merged if the pipeline succeeds') - expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved') + expect(page).not_to have_content 'Pipelines must succeed' + expect(page).to have_content 'All discussions must be resolved' within('.sharing-permissions-form') do find('.project-feature-controls[data-for="project[project_feature_attributes][builds_access_level]"] .project-feature-toggle').click find('input[value="Save changes"]').send_keys(:return) end - expect(page).to have_content('Only allow merge requests to be merged if the pipeline succeeds') - expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved') + expect(page).to have_content 'Pipelines must succeed' + expect(page).to have_content 'All discussions must be resolved' end end end @@ -71,16 +72,16 @@ describe 'Projects > Settings > User manages merge request settings' do end it 'does not show the Merge Requests settings' do - expect(page).not_to have_content('Only allow merge requests to be merged if the pipeline succeeds') - expect(page).not_to have_content('Only allow merge requests to be merged if all discussions are resolved') + expect(page).not_to have_content 'Pipelines must succeed' + expect(page).not_to have_content 'All discussions must be resolved' within('.sharing-permissions-form') do find('.project-feature-controls[data-for="project[project_feature_attributes][merge_requests_access_level]"] .project-feature-toggle').click find('input[value="Save changes"]').send_keys(:return) end - expect(page).to have_content('Only allow merge requests to be merged if the pipeline succeeds') - expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved') + expect(page).to have_content 'Pipelines must succeed' + expect(page).to have_content 'All discussions must be resolved' end end |