diff options
author | Dan Davison <ddavison@gitlab.com> | 2019-07-26 18:07:51 +0000 |
---|---|---|
committer | Tanya Pazitny <tpazitny@gitlab.com> | 2019-07-26 18:07:51 +0000 |
commit | 9bf08867ddece5fec67807631de7d4fb9a0bd6a6 (patch) | |
tree | 7f961572d360c14c79bfbb2983c92da5d51cd63b /qa | |
parent | 51a54cfc76de1c482e246619f0ae75d1ee419a72 (diff) | |
download | gitlab-ce-9bf08867ddece5fec67807631de7d4fb9a0bd6a6.tar.gz |
Refactor elements used by ci_variable and ::CICD
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')
-rw-r--r-- | qa/qa/page/project/settings/ci_cd.rb | 21 | ||||
-rw-r--r-- | qa/qa/page/project/sub_menus/project.rb | 4 |
2 files changed, 12 insertions, 13 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 diff --git a/qa/qa/page/project/sub_menus/project.rb b/qa/qa/page/project/sub_menus/project.rb index 5e0ee3c274a..6f1bc131f84 100644 --- a/qa/qa/page/project/sub_menus/project.rb +++ b/qa/qa/page/project/sub_menus/project.rb @@ -10,7 +10,7 @@ module QA def self.included(base) base.class_eval do view 'app/views/layouts/nav/sidebar/_project.html.haml' do - element :link_project + element :project_link end end end @@ -18,7 +18,7 @@ module QA def click_project retry_on_exception do within_sidebar do - click_element(:link_project) + click_element(:project_link) end end end |