diff options
Diffstat (limited to 'spec/features/projects/settings/pipelines_settings_spec.rb')
-rw-r--r-- | spec/features/projects/settings/pipelines_settings_spec.rb | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/spec/features/projects/settings/pipelines_settings_spec.rb b/spec/features/projects/settings/pipelines_settings_spec.rb index d9020333f28..e875a88a52b 100644 --- a/spec/features/projects/settings/pipelines_settings_spec.rb +++ b/spec/features/projects/settings/pipelines_settings_spec.rb @@ -8,6 +8,7 @@ describe "Projects > Settings > Pipelines settings" do before do sign_in(user) project.add_role(user, role) + create(:project_auto_devops, project: project) end context 'for developer' do @@ -27,10 +28,17 @@ describe "Projects > Settings > Pipelines settings" do visit project_settings_ci_cd_path(project) fill_in('Test coverage parsing', with: 'coverage_regex') - click_on 'Save changes' + + page.within '#js-general-pipeline-settings' do + click_on 'Save changes' + end expect(page.status_code).to eq(200) - expect(page).to have_button('Save changes', disabled: false) + + page.within '#js-general-pipeline-settings' do + expect(page).to have_button('Save changes', disabled: false) + end + expect(page).to have_field('Test coverage parsing', with: 'coverage_regex') end @@ -38,10 +46,15 @@ describe "Projects > Settings > Pipelines settings" do visit project_settings_ci_cd_path(project) page.check('Auto-cancel redundant, pending pipelines') - click_on 'Save changes' + page.within '#js-general-pipeline-settings' do + click_on 'Save changes' + end expect(page.status_code).to eq(200) - expect(page).to have_button('Save changes', disabled: false) + + page.within '#js-general-pipeline-settings' do + expect(page).to have_button('Save changes', disabled: false) + end checkbox = find_field('project_auto_cancel_pending_pipelines') expect(checkbox).to be_checked @@ -51,13 +64,16 @@ describe "Projects > Settings > Pipelines settings" do it 'update auto devops settings' do visit project_settings_ci_cd_path(project) - fill_in('project_auto_devops_attributes_domain', with: 'test.com') - page.choose('project_auto_devops_attributes_enabled_false') - click_on 'Save changes' + page.within '#autodevops-settings' do + fill_in('project_auto_devops_attributes_domain', with: 'test.com') + page.choose('project_auto_devops_attributes_enabled_false') + click_on 'Save changes' + end expect(page.status_code).to eq(200) expect(project.auto_devops).to be_present expect(project.auto_devops).not_to be_enabled + expect(project.auto_devops.domain).to eq('test.com') end end end |