diff options
author | Sanad Liaquat <sliaquat@gitlab.com> | 2019-03-22 16:36:39 +0500 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-04-11 18:30:23 +0100 |
commit | e690fccb78beeed7f02af932f6e4a35559257af6 (patch) | |
tree | 7a6678c14da21d36b92c048f0dc7daa4eed1afd7 /qa | |
parent | b7f7638310e8a0069ad5f5038ba82b7aeddc2b07 (diff) | |
download | gitlab-ce-e690fccb78beeed7f02af932f6e4a35559257af6.tar.gz |
Update project settings qa selectors
Additionally fixes geo rename test.
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/project/settings/advanced.rb | 20 | ||||
-rw-r--r-- | qa/qa/page/project/settings/common.rb | 8 | ||||
-rw-r--r-- | qa/qa/page/project/settings/main.rb | 18 |
3 files changed, 25 insertions, 21 deletions
diff --git a/qa/qa/page/project/settings/advanced.rb b/qa/qa/page/project/settings/advanced.rb index 578f097e2dc..6dffbac5694 100644 --- a/qa/qa/page/project/settings/advanced.rb +++ b/qa/qa/page/project/settings/advanced.rb @@ -4,27 +4,21 @@ module QA module Settings class Advanced < Page::Base view 'app/views/projects/edit.html.haml' do - element :project_path_field, 'text_field :path' # rubocop:disable QA/ElementWithPattern - element :project_name_field, 'text_field :name' # rubocop:disable QA/ElementWithPattern - element :rename_project_button, "submit 'Rename project'" # rubocop:disable QA/ElementWithPattern + element :project_path_field + element :change_path_button end - def rename_to(path) - fill_project_name(path) + def update_project_path_to(path) fill_project_path(path) - rename_project! + click_change_path_button end def fill_project_path(path) - fill_in :project_path, with: path + fill_element :project_path_field, path end - def fill_project_name(name) - fill_in :project_name, with: name - end - - def rename_project! - click_on 'Rename project' + def click_change_path_button + click_element :change_path_button end end end diff --git a/qa/qa/page/project/settings/common.rb b/qa/qa/page/project/settings/common.rb index f3b217677f2..233e681e0df 100644 --- a/qa/qa/page/project/settings/common.rb +++ b/qa/qa/page/project/settings/common.rb @@ -4,14 +4,6 @@ module QA module Settings module Common include QA::Page::Settings::Common - - def self.included(base) - base.class_eval do - view 'app/views/projects/edit.html.haml' do - element :advanced_settings_expand, "= expanded ? 'Collapse' : 'Expand'" # rubocop:disable QA/ElementWithPattern - end - end - end end end end diff --git a/qa/qa/page/project/settings/main.rb b/qa/qa/page/project/settings/main.rb index d8cf1d49dd2..cf464e25ca5 100644 --- a/qa/qa/page/project/settings/main.rb +++ b/qa/qa/page/project/settings/main.rb @@ -9,6 +9,24 @@ module QA element :advanced_settings end + view 'app/views/projects/settings/_general.html.haml' do + element :project_name_field + element :save_naming_topics_avatar_button + end + + def rename_project_to(name) + fill_project_name(name) + click_save_changes + end + + def fill_project_name(name) + fill_element :project_name_field, name + end + + def click_save_changes + click_element :save_naming_topics_avatar_button + end + def expand_advanced_settings(&block) expand_section(:advanced_settings) do Advanced.perform(&block) |