diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-03-12 13:15:33 +0300 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-03-12 13:15:33 +0300 |
commit | 7e9348f3594ee158dfd4aaa9e03e5bb5dd36aead (patch) | |
tree | 74e03ba375331ab619a766d5d2a3c12aaa267095 /spec/features/projects/settings/pipelines_settings_spec.rb | |
parent | db37b5a4c8d408e1bce0843162c609dcb1781188 (diff) |
Enable/disable Auto DevOps at Group level
- Includes instance methods on Group model to detect when a group has
AutoDevOps explicitly/implicitly enabled/disabled.
- Includes migration to add a new column to namespaces table
- Add UI necessary modifications
- Add service and controller to update auto devops
related instances
- Updates project and groups auto devops badges
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52447
Diffstat (limited to 'spec/features/projects/settings/pipelines_settings_spec.rb')
-rw-r--r-- | spec/features/projects/settings/pipelines_settings_spec.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/features/projects/settings/pipelines_settings_spec.rb b/spec/features/projects/settings/pipelines_settings_spec.rb index 4c85abe9971..bf0c0de89b2 100644 --- a/spec/features/projects/settings/pipelines_settings_spec.rb +++ b/spec/features/projects/settings/pipelines_settings_spec.rb @@ -110,6 +110,37 @@ describe "Projects > Settings > Pipelines settings" do expect(page).not_to have_content('instance enabled') end end + + context 'when auto devops is turned on group level' do + before do + project.update!(namespace: create(:group, :auto_devops_enabled)) + end + + it 'renders group enabled badge' do + visit project_settings_ci_cd_path(project) + + page.within '#autodevops-settings' do + expect(page).to have_content('group enabled') + expect(find_field('project_auto_devops_attributes_enabled')).to be_checked + end + end + end + + context 'when auto devops is turned on group parent level', :nested_groups do + before do + group = create(:group, parent: create(:group, :auto_devops_enabled)) + project.update!(namespace: group) + end + + it 'renders group enabled badge' do + visit project_settings_ci_cd_path(project) + + page.within '#autodevops-settings' do + expect(page).to have_content('group enabled') + expect(find_field('project_auto_devops_attributes_enabled')).to be_checked + end + end + end end end |