summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/settings/ci_cd.rb
diff options
context:
space:
mode:
authorddavison <ddavison@gitlab.com>2019-07-18 14:35:04 -0700
committerddavison <ddavison@gitlab.com>2019-07-18 14:35:04 -0700
commit17dfb40669e24959a4cd830605edc6ca3e20677c (patch)
treeb8ade2fae7c31b1673812aeef671fc2261cde0d2 /qa/qa/page/project/settings/ci_cd.rb
parent5db5e50927e9c90c4a353897edb17eeda1f1f10f (diff)
downloadgitlab-ce-17dfb40669e24959a4cd830605edc6ca3e20677c.tar.gz
Refactor elements used by ci_variable and ::CICDqa-refactor-cicd-pages-1
Many elements defined in the QA framework in ci_variable.rb call elements and methods that are not framework specific. Fix these issues, as well as use data-qa-selector s
Diffstat (limited to 'qa/qa/page/project/settings/ci_cd.rb')
-rw-r--r--qa/qa/page/project/settings/ci_cd.rb21
1 files changed, 10 insertions, 11 deletions
diff --git a/qa/qa/page/project/settings/ci_cd.rb b/qa/qa/page/project/settings/ci_cd.rb
index b8c5c563da6..ae826fb3a32 100644
--- a/qa/qa/page/project/settings/ci_cd.rb
+++ b/qa/qa/page/project/settings/ci_cd.rb
@@ -8,33 +8,32 @@ module QA
include Common
view 'app/views/projects/settings/ci_cd/show.html.haml' do
- element :autodevops_settings
- element :runners_settings
- element :variables_settings
+ element :autodevops_settings_content
+ element :runners_settings_content
+ element :variables_settings_content
end
view 'app/views/projects/settings/ci_cd/_autodevops_form.html.haml' do
- element :enable_auto_devops_field, 'check_box :enabled' # rubocop:disable QA/ElementWithPattern
- element :enable_auto_devops_button, "%strong= s_('CICD|Default to Auto DevOps pipeline')" # rubocop:disable QA/ElementWithPattern
- element :save_changes_button, "submit _('Save changes')" # rubocop:disable QA/ElementWithPattern
+ element :enable_autodevops_checkbox
+ element :save_changes_button
end
def expand_runners_settings(&block)
- expand_section(:runners_settings) do
+ expand_section(:runners_settings_content) do
Settings::Runners.perform(&block)
end
end
def expand_ci_variables(&block)
- expand_section(:variables_settings) do
+ expand_section(:variables_settings_content) do
Settings::CiVariables.perform(&block)
end
end
def enable_auto_devops
- expand_section(:autodevops_settings) do
- check 'Default to Auto DevOps pipeline'
- click_on 'Save changes'
+ expand_section(:autodevops_settings_content) do
+ check_element :enable_autodevops_checkbox
+ click_element :save_changes_button
end
end
end