diff options
author | Walmyr <walmyr@gitlab.com> | 2019-03-28 14:19:32 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-03-28 14:19:32 +0000 |
commit | 2ace53feac2aa9e41bda61d8cb452923b54d5ab8 (patch) | |
tree | cfb9cec9a9c180a3f63531059a3176901fe5690b /qa | |
parent | a85fd76f524802a02957ccdcca7674f618a9e069 (diff) | |
download | gitlab-ce-2ace53feac2aa9e41bda61d8cb452923b54d5ab8.tar.gz |
Standardize usage of `click_` and `go_to` on GUI tests
This MR addresses the following issue:
https://gitlab.com/gitlab-org/gitlab-ce/issues/57043
Based on the following comment:
https://gitlab.com/gitlab-org/gitlab-ce/issues/57043#note_136663994
Diffstat (limited to 'qa')
55 files changed, 84 insertions, 90 deletions
diff --git a/qa/qa/page/dashboard/groups.rb b/qa/qa/page/dashboard/groups.rb index 7a07515de62..52853376f17 100644 --- a/qa/qa/page/dashboard/groups.rb +++ b/qa/qa/page/dashboard/groups.rb @@ -19,11 +19,13 @@ module QA has_filtered_group?(name) end - def go_to_group(name) + def click_group(name) + raise "Group with name #{name} not found!" unless has_group?(name) + click_link name end - def go_to_new_group + def click_new_group click_on 'New group' end end diff --git a/qa/qa/page/dashboard/snippet/new.rb b/qa/qa/page/dashboard/snippet/new.rb index a637b869d2f..4a8e65e20af 100644 --- a/qa/qa/page/dashboard/snippet/new.rb +++ b/qa/qa/page/dashboard/snippet/new.rb @@ -37,7 +37,7 @@ module QA text_area.set content end - def create_snippet + def click_create_snippet_button click_element :create_snippet_button end diff --git a/qa/qa/page/group/show.rb b/qa/qa/page/group/show.rb index 41716326685..d4c4be0d6ca 100644 --- a/qa/qa/page/group/show.rb +++ b/qa/qa/page/group/show.rb @@ -18,7 +18,7 @@ module QA element :no_result_text, 'No groups or projects matched your search' # rubocop:disable QA/ElementWithPattern end - def go_to_subgroup(name) + def click_subgroup(name) click_link name end diff --git a/qa/qa/page/label/index.rb b/qa/qa/page/label/index.rb index de0cfa9f293..e73d40b37ac 100644 --- a/qa/qa/page/label/index.rb +++ b/qa/qa/page/label/index.rb @@ -18,7 +18,7 @@ module QA element :label_svg end - def go_to_new_label + def click_new_label_button # The 'labels.svg' takes a fraction of a second to load after which the "New label" button shifts up a bit # This can cause webdriver to miss the hit so we wait for the svg to load (implicitly with has_element?) # before clicking the button. diff --git a/qa/qa/page/label/new.rb b/qa/qa/page/label/new.rb index b5422dc9400..9c8cf5f07e6 100644 --- a/qa/qa/page/label/new.rb +++ b/qa/qa/page/label/new.rb @@ -9,7 +9,7 @@ module QA element :label_create_button end - def create_label + def click_label_create_button click_element :label_create_button end diff --git a/qa/qa/page/main/menu.rb b/qa/qa/page/main/menu.rb index 1b3445b0064..e98d531c86e 100644 --- a/qa/qa/page/main/menu.rb +++ b/qa/qa/page/main/menu.rb @@ -47,7 +47,7 @@ module QA end end - def go_to_admin_area + def click_admin_area within_top_menu { click_element :admin_area_link } end @@ -57,7 +57,7 @@ module QA end end - def go_to_profile_settings + def click_settings_link retry_until(reload: false) do within_user_menu do click_link 'Settings' @@ -67,7 +67,7 @@ module QA end end - def go_to_snippets + def click_snippets_link click_element :snippets_link end diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb index c0411db6505..5aef868a805 100644 --- a/qa/qa/page/merge_request/show.rb +++ b/qa/qa/page/merge_request/show.rb @@ -145,11 +145,11 @@ module QA click_element :squash_checkbox end - def go_to_discussions_tab + def click_discussions_tab click_element :notes_tab end - def go_to_diffs_tab + def click_diffs_tab click_element :diffs_tab end diff --git a/qa/qa/page/profile/personal_access_tokens.rb b/qa/qa/page/profile/personal_access_tokens.rb index 8c12eff5cf1..c9a5a1b3ca0 100644 --- a/qa/qa/page/profile/personal_access_tokens.rb +++ b/qa/qa/page/profile/personal_access_tokens.rb @@ -26,7 +26,7 @@ module QA check_element(:api_radio) end - def create_token + def click_create_token_button click_element(:create_token_button) end diff --git a/qa/qa/page/project/issue/index.rb b/qa/qa/page/project/issue/index.rb index 1035bf74a43..e987d279e21 100644 --- a/qa/qa/page/project/issue/index.rb +++ b/qa/qa/page/project/issue/index.rb @@ -7,7 +7,7 @@ module QA element :issue_link, 'link_to issue.title' # rubocop:disable QA/ElementWithPattern end - def go_to_issue(title) + def click_issue_link(title) click_link(title) end end diff --git a/qa/qa/page/project/milestone/new.rb b/qa/qa/page/project/milestone/new.rb index 992ef89004b..0db8d2cf766 100644 --- a/qa/qa/page/project/milestone/new.rb +++ b/qa/qa/page/project/milestone/new.rb @@ -17,7 +17,7 @@ module QA fill_element :milestone_description, description end - def create_new_milestone + def click_milestone_create_button click_element :milestone_create_button end end diff --git a/qa/qa/page/project/new.rb b/qa/qa/page/project/new.rb index 552b2293115..f841afbbffd 100644 --- a/qa/qa/page/project/new.rb +++ b/qa/qa/page/project/new.rb @@ -35,7 +35,7 @@ module QA end end - def go_to_import_project + def click_import_project click_on 'Import project' end @@ -51,7 +51,7 @@ module QA click_on 'Create project' end - def go_to_create_from_template + def click_create_from_template_tab click_element(:project_create_from_template_tab) end @@ -59,7 +59,7 @@ module QA choose visibility end - def go_to_github_import + def click_github_link click_link 'GitHub' end end diff --git a/qa/qa/page/project/operations/environments/index.rb b/qa/qa/page/project/operations/environments/index.rb index 63965a57edd..610a34385b1 100644 --- a/qa/qa/page/project/operations/environments/index.rb +++ b/qa/qa/page/project/operations/environments/index.rb @@ -10,7 +10,7 @@ module QA element :environment_link end - def go_to_environment(environment_name) + def click_environment_link(environment_name) wait(reload: false) do find(element_selector_css(:environment_link), text: environment_name).click end diff --git a/qa/qa/page/project/pipeline/index.rb b/qa/qa/page/project/pipeline/index.rb index 19d83ecc4f4..0373a12f597 100644 --- a/qa/qa/page/project/pipeline/index.rb +++ b/qa/qa/page/project/pipeline/index.rb @@ -5,7 +5,7 @@ module QA::Page element :pipeline_link, 'class="js-pipeline-url-link"' # rubocop:disable QA/ElementWithPattern end - def go_to_latest_pipeline + def click_on_latest_pipeline css = '.js-pipeline-url-link' link = wait(reload: false) do diff --git a/qa/qa/page/project/pipeline/show.rb b/qa/qa/page/project/pipeline/show.rb index 6f8a66bf527..9c0b55b1c4c 100644 --- a/qa/qa/page/project/pipeline/show.rb +++ b/qa/qa/page/project/pipeline/show.rb @@ -42,11 +42,11 @@ module QA::Page end end - def go_to_job(job_name) + def click_job(job_name) find_element(:job_link, text: job_name).click end - def go_to_first_job + def click_on_first_job css = '.js-pipeline-graph-job-link' wait(reload: false) do diff --git a/qa/qa/page/project/settings/protected_branches.rb b/qa/qa/page/project/settings/protected_branches.rb index 76591a4e3fe..399a49d2420 100644 --- a/qa/qa/page/project/settings/protected_branches.rb +++ b/qa/qa/page/project/settings/protected_branches.rb @@ -32,22 +32,22 @@ module QA end def allow_no_one_to_push - click_allow(:push, 'No one') + go_to_allow(:push, 'No one') end def allow_devs_and_maintainers_to_push - click_allow(:push, 'Developers + Maintainers') + go_to_allow(:push, 'Developers + Maintainers') end # @deprecated alias_method :allow_devs_and_masters_to_push, :allow_devs_and_maintainers_to_push def allow_no_one_to_merge - click_allow(:merge, 'No one') + go_to_allow(:merge, 'No one') end def allow_devs_and_maintainers_to_merge - click_allow(:merge, 'Developers + Maintainers') + go_to_allow(:merge, 'Developers + Maintainers') end # @deprecated @@ -59,7 +59,7 @@ module QA private - def click_allow(action, text) + def go_to_allow(action, text) click_element :"allowed_to_#{action}_select" within_element(:"allowed_to_#{action}_dropdown") do diff --git a/qa/qa/page/project/show.rb b/qa/qa/page/project/show.rb index 9c21d9ddbfa..1a9a2fd413f 100644 --- a/qa/qa/page/project/show.rb +++ b/qa/qa/page/project/show.rb @@ -76,13 +76,13 @@ module QA click_on 'Fork' end - def go_to_file(filename) + def click_file(filename) within_element(:file_tree) do click_on filename end end - def go_to_commit(commit_msg) + def click_commit(commit_msg) within_element(:file_tree) do click_on commit_msg end diff --git a/qa/qa/page/project/sub_menus/operations.rb b/qa/qa/page/project/sub_menus/operations.rb index cf9fc453565..24a99a9464c 100644 --- a/qa/qa/page/project/sub_menus/operations.rb +++ b/qa/qa/page/project/sub_menus/operations.rb @@ -14,7 +14,7 @@ module QA end end - def click_operations_environments + def go_to_operations_environments hover_operations do within_submenu do click_element(:operations_environments_link) @@ -22,7 +22,7 @@ module QA end end - def click_operations_kubernetes + def go_to_operations_kubernetes hover_operations do within_submenu do click_link('Kubernetes') diff --git a/qa/qa/page/project/sub_menus/repository.rb b/qa/qa/page/project/sub_menus/repository.rb index 29eaa9a74de..4cc73a6b25a 100644 --- a/qa/qa/page/project/sub_menus/repository.rb +++ b/qa/qa/page/project/sub_menus/repository.rb @@ -20,7 +20,7 @@ module QA end end - def click_repository_branches + def go_to_repository_branches hover_repository do within_submenu do click_element(:branches_link) diff --git a/qa/qa/page/project/sub_menus/settings.rb b/qa/qa/page/project/sub_menus/settings.rb index 62c594c0210..22743ebd0a1 100644 --- a/qa/qa/page/project/sub_menus/settings.rb +++ b/qa/qa/page/project/sub_menus/settings.rb @@ -14,7 +14,7 @@ module QA end end - def click_ci_cd_settings + def go_to_ci_cd_settings hover_settings do within_submenu do click_link('CI / CD') @@ -22,7 +22,7 @@ module QA end end - def click_members_settings + def go_to_members_settings hover_settings do within_submenu do click_element :link_members_settings @@ -30,7 +30,7 @@ module QA end end - def click_repository_settings + def go_to_repository_settings hover_settings do within_submenu do click_link('Repository') @@ -38,7 +38,7 @@ module QA end end - def go_to_settings + def click_settings within_sidebar do click_on 'Settings' end diff --git a/qa/qa/page/project/wiki/edit.rb b/qa/qa/page/project/wiki/edit.rb index 8d0eafa1818..1ccd67349c3 100644 --- a/qa/qa/page/project/wiki/edit.rb +++ b/qa/qa/page/project/wiki/edit.rb @@ -9,15 +9,7 @@ module QA element :edit_page_link, 'Edit' # rubocop:disable QA/ElementWithPattern end - def go_to_new_page - click_on 'New page' - end - - def got_to_view_history_page - click_on 'Page history' - end - - def go_to_edit_page + def click_edit click_on 'Edit' end end diff --git a/qa/qa/page/project/wiki/new.rb b/qa/qa/page/project/wiki/new.rb index b90e03be36a..792eba4bab7 100644 --- a/qa/qa/page/project/wiki/new.rb +++ b/qa/qa/page/project/wiki/new.rb @@ -23,7 +23,7 @@ module QA element :svg_content end - def go_to_create_first_page + def click_create_your_first_page_button # The svg takes a fraction of a second to load after which the # "Create your first page" button shifts up a bit. This can cause # webdriver to miss the hit so we wait for the svg to load before diff --git a/qa/qa/page/project/wiki/show.rb b/qa/qa/page/project/wiki/show.rb index dffbc5d60a2..f79ad510084 100644 --- a/qa/qa/page/project/wiki/show.rb +++ b/qa/qa/page/project/wiki/show.rb @@ -11,7 +11,7 @@ module QA element :clone_repository_link, 'Clone repository' # rubocop:disable QA/ElementWithPattern end - def go_to_clone_repository + def click_clone_repository click_on 'Clone repository' end end diff --git a/qa/qa/resource/branch.rb b/qa/qa/resource/branch.rb index bd52c4abe02..a45dd030625 100644 --- a/qa/qa/resource/branch.rb +++ b/qa/qa/resource/branch.rb @@ -46,7 +46,7 @@ module QA # to `allow_to_push` variable. return branch unless @protected - Page::Project::Menu.perform(&:click_repository_settings) + Page::Project::Menu.perform(&:go_to_repository_settings) Page::Project::Settings::Repository.perform do |setting| setting.expand_protected_branches do |page| diff --git a/qa/qa/resource/ci_variable.rb b/qa/qa/resource/ci_variable.rb index 0570c47d41c..d82de4cb816 100644 --- a/qa/qa/resource/ci_variable.rb +++ b/qa/qa/resource/ci_variable.rb @@ -15,7 +15,7 @@ module QA def fabricate! project.visit! - Page::Project::Menu.perform(&:click_ci_cd_settings) + Page::Project::Menu.perform(&:go_to_ci_cd_settings) Page::Project::Settings::CICD.perform do |setting| setting.expand_ci_variables do |page| diff --git a/qa/qa/resource/deploy_key.rb b/qa/qa/resource/deploy_key.rb index 9565598efb0..869e2a71e47 100644 --- a/qa/qa/resource/deploy_key.rb +++ b/qa/qa/resource/deploy_key.rb @@ -23,7 +23,7 @@ module QA def fabricate! project.visit! - Page::Project::Menu.perform(&:click_repository_settings) + Page::Project::Menu.perform(&:go_to_repository_settings) Page::Project::Settings::Repository.perform do |setting| setting.expand_deploy_keys do |page| diff --git a/qa/qa/resource/deploy_token.rb b/qa/qa/resource/deploy_token.rb index cee4422f6b4..fca5ed83c87 100644 --- a/qa/qa/resource/deploy_token.rb +++ b/qa/qa/resource/deploy_token.rb @@ -32,7 +32,7 @@ module QA project.visit! Page::Project::Menu.act do - click_repository_settings + go_to_repository_settings end Page::Project::Settings::Repository.perform do |setting| diff --git a/qa/qa/resource/group.rb b/qa/qa/resource/group.rb index d7f9ec6a836..0b567a474c8 100644 --- a/qa/qa/resource/group.rb +++ b/qa/qa/resource/group.rb @@ -21,7 +21,7 @@ module QA Page::Group::Show.perform do |group_show| if group_show.has_subgroup?(path) - group_show.go_to_subgroup(path) + group_show.click_subgroup(path) else group_show.go_to_new_subgroup diff --git a/qa/qa/resource/kubernetes_cluster.rb b/qa/qa/resource/kubernetes_cluster.rb index 93a06be6818..27ab7b60211 100644 --- a/qa/qa/resource/kubernetes_cluster.rb +++ b/qa/qa/resource/kubernetes_cluster.rb @@ -16,7 +16,7 @@ module QA @project.visit! Page::Project::Menu.perform( - &:click_operations_kubernetes) + &:go_to_operations_kubernetes) Page::Project::Operations::Kubernetes::Index.perform( &:add_kubernetes_cluster) diff --git a/qa/qa/resource/label.rb b/qa/qa/resource/label.rb index c0869cb1f2a..7c899db31f3 100644 --- a/qa/qa/resource/label.rb +++ b/qa/qa/resource/label.rb @@ -25,13 +25,13 @@ module QA project.visit! Page::Project::Menu.perform(&:go_to_labels) - Page::Label::Index.perform(&:go_to_new_label) + Page::Label::Index.perform(&:click_new_label_button) Page::Label::New.perform do |page| page.fill_title(@title) page.fill_description(@description) page.fill_color(@color) - page.create_label + page.click_label_create_button end end end diff --git a/qa/qa/resource/personal_access_token.rb b/qa/qa/resource/personal_access_token.rb index b8dd0a3562f..f5c632cd8d2 100644 --- a/qa/qa/resource/personal_access_token.rb +++ b/qa/qa/resource/personal_access_token.rb @@ -13,13 +13,13 @@ module QA end def fabricate! - Page::Main::Menu.perform(&:go_to_profile_settings) + Page::Main::Menu.perform(&:click_settings_link) Page::Profile::Menu.perform(&:click_access_tokens) Page::Profile::PersonalAccessTokens.perform do |page| page.fill_token_name(name || 'api-test-token') page.check_api - page.create_token + page.click_create_token_button end end end diff --git a/qa/qa/resource/project_imported_from_github.rb b/qa/qa/resource/project_imported_from_github.rb index 0d25e7dd842..a160cdb3273 100644 --- a/qa/qa/resource/project_imported_from_github.rb +++ b/qa/qa/resource/project_imported_from_github.rb @@ -18,11 +18,11 @@ module QA Page::Group::Show.perform(&:go_to_new_project) Page::Project::New.perform do |page| - page.go_to_import_project + page.click_import_project end Page::Project::New.perform do |page| - page.go_to_github_import + page.click_github_link end Page::Project::Import::Github.perform do |page| diff --git a/qa/qa/resource/project_milestone.rb b/qa/qa/resource/project_milestone.rb index a4d6657caff..8ace75f695a 100644 --- a/qa/qa/resource/project_milestone.rb +++ b/qa/qa/resource/project_milestone.rb @@ -28,7 +28,7 @@ module QA Page::Project::Milestone::New.perform do |milestone_new| milestone_new.set_title(@title) milestone_new.set_description(@description) - milestone_new.create_new_milestone + milestone_new.click_milestone_create_button end end end diff --git a/qa/qa/resource/repository/wiki_push.rb b/qa/qa/resource/repository/wiki_push.rb index 77c4c8a514d..95712300854 100644 --- a/qa/qa/resource/repository/wiki_push.rb +++ b/qa/qa/resource/repository/wiki_push.rb @@ -24,7 +24,7 @@ module QA @repository_http_uri ||= begin wiki.visit! Page::Project::Wiki::Show.act do - go_to_clone_repository + click_clone_repository choose_repository_clone_http repository_location.uri end diff --git a/qa/qa/resource/runner.rb b/qa/qa/resource/runner.rb index 08ae3f22117..3344ad3360a 100644 --- a/qa/qa/resource/runner.rb +++ b/qa/qa/resource/runner.rb @@ -29,7 +29,7 @@ module QA def fabricate! project.visit! - Page::Project::Menu.perform(&:click_ci_cd_settings) + Page::Project::Menu.perform(&:go_to_ci_cd_settings) Service::Runner.new(name).tap do |runner| Page::Project::Settings::CICD.perform do |settings| diff --git a/qa/qa/resource/sandbox.rb b/qa/qa/resource/sandbox.rb index 41ce857a8b8..942eea5cc40 100644 --- a/qa/qa/resource/sandbox.rb +++ b/qa/qa/resource/sandbox.rb @@ -20,9 +20,9 @@ module QA Page::Dashboard::Groups.perform do |page| if page.has_group?(path) - page.go_to_group(path) + page.click_group(path) else - page.go_to_new_group + page.click_new_group Page::Group::New.perform do |group| group.set_path(path) diff --git a/qa/qa/resource/settings/hashed_storage.rb b/qa/qa/resource/settings/hashed_storage.rb index 40c06768ffe..08bb95cfd4b 100644 --- a/qa/qa/resource/settings/hashed_storage.rb +++ b/qa/qa/resource/settings/hashed_storage.rb @@ -8,7 +8,7 @@ module QA raise ArgumentError unless traits.include?(:enabled) Page::Main::Login.perform(&:sign_in_using_credentials) - Page::Main::Menu.perform(&:go_to_admin_area) + Page::Main::Menu.perform(&:click_admin_area) Page::Admin::Menu.perform(&:go_to_repository_settings) Page::Admin::Settings::Repository.perform do |setting| diff --git a/qa/qa/resource/snippet.rb b/qa/qa/resource/snippet.rb index 1478f197570..f58d7b5113f 100644 --- a/qa/qa/resource/snippet.rb +++ b/qa/qa/resource/snippet.rb @@ -22,7 +22,7 @@ module QA page.set_visibility(@visibility) page.fill_file_name(@file_name) page.fill_file_content(@file_content) - page.create_snippet + page.click_create_snippet_button end end end diff --git a/qa/qa/resource/ssh_key.rb b/qa/qa/resource/ssh_key.rb index c6c97c8532f..4e399ae730e 100644 --- a/qa/qa/resource/ssh_key.rb +++ b/qa/qa/resource/ssh_key.rb @@ -14,7 +14,7 @@ module QA end def fabricate! - Page::Main::Menu.perform(&:go_to_profile_settings) + Page::Main::Menu.perform(&:click_settings_link) Page::Profile::Menu.perform(&:click_ssh_keys) Page::Profile::SSHKeys.perform do |page| diff --git a/qa/qa/resource/wiki.rb b/qa/qa/resource/wiki.rb index e942e9718a0..0a776f22e25 100644 --- a/qa/qa/resource/wiki.rb +++ b/qa/qa/resource/wiki.rb @@ -18,7 +18,7 @@ module QA Page::Project::Menu.perform { |menu_side| menu_side.click_wiki } Page::Project::Wiki::New.perform do |wiki_new| - wiki_new.go_to_create_first_page + wiki_new.click_create_your_first_page_button wiki_new.set_title(@title) wiki_new.set_content(@content) wiki_new.set_message(@message) diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb index d8609aa037a..d1747280227 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb @@ -14,7 +14,7 @@ module QA end project.visit! - Page::Project::Menu.perform(&:click_members_settings) + Page::Project::Menu.perform(&:go_to_members_settings) Page::Project::Settings::Members.perform do |page| page.add_member(user.username) end diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb index 3fbcd77dac6..7a36f9ea420 100644 --- a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb @@ -12,7 +12,7 @@ module QA end project.visit! - Page::Project::Menu.perform(&:go_to_settings) + Page::Project::Menu.perform(&:click_settings) Page::Project::Settings::MergeRequest.perform(&:enable_ff_only) merge_request = Resource::MergeRequest.fabricate! do |merge_request| diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb index 8e181eb28c6..daeee665c93 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb @@ -57,7 +57,7 @@ module QA end it 'branches are correctly listed after CRUD operations' do - Page::Project::Menu.perform(&:click_repository_branches) + Page::Project::Menu.perform(&:go_to_repository_branches) expect(page).to have_content(master_branch) expect(page).to have_content(second_branch) diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb index ff879fdeb16..f41240b7605 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb @@ -16,7 +16,7 @@ module QA expect(page).to have_content("Title: #{key_title}") expect(page).to have_content(key.fingerprint) - Page::Main::Menu.act { go_to_profile_settings } + Page::Main::Menu.act { click_settings_link } Page::Profile::Menu.act { click_ssh_keys } Page::Profile::SSHKeys.perform do |ssh_keys| diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb index eb59b54e9ab..dc42191b448 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb @@ -31,7 +31,7 @@ module QA # Remove the SSH key login - Page::Main::Menu.perform(&:go_to_profile_settings) + Page::Main::Menu.perform(&:click_settings_link) Page::Profile::Menu.perform(&:click_ssh_keys) Page::Profile::SSHKeys.perform do |ssh_keys| ssh_keys.remove_key(key_title) diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb index 99601e3d230..23008a58af8 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb @@ -21,7 +21,7 @@ module QA end source_project_push.project.visit! - Page::Project::Menu.perform(&:click_repository_settings) + Page::Project::Menu.perform(&:go_to_repository_settings) Page::Project::Settings::Repository.perform do |settings| settings.expand_mirroring_repositories do |mirror_settings| # Configure the source project to push to the target project diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb index 243f0b83b77..b121e3bf689 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb @@ -45,7 +45,7 @@ module QA end def set_file_size_limit(limit) - Page::Main::Menu.perform(&:go_to_admin_area) + Page::Main::Menu.perform(&:click_admin_area) Page::Admin::Menu.perform(&:go_to_general_settings) Page::Admin::Settings::General.perform do |setting| diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb index 7223831d96f..a0251e1c385 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb @@ -28,7 +28,7 @@ module QA expect(page).to have_content('README.md') expect(page).to have_content('Test Use SSH Key') - Page::Main::Menu.perform(&:go_to_profile_settings) + Page::Main::Menu.perform(&:click_settings_link) Page::Profile::Menu.perform(&:click_ssh_keys) Page::Profile::SSHKeys.perform do |ssh_keys| diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb index b862a7bd1ed..b7400cdca97 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb @@ -33,7 +33,7 @@ module QA def view_commit @project.visit! Page::Project::Show.perform do |page| - page.go_to_commit(@commit_message) + page.click_commit(@commit_message) end end diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb index ab53dff464e..b643468a664 100644 --- a/qa/qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb @@ -7,7 +7,7 @@ module QA Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.perform(&:sign_in_using_credentials) - Page::Main::Menu.perform(&:go_to_snippets) + Page::Main::Menu.perform(&:click_snippets_link) Resource::Snippet.fabricate_via_browser_ui! do |snippet| snippet.title = 'Snippet title' diff --git a/qa/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb b/qa/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb index 29589ec870a..309ae6cd986 100644 --- a/qa/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb @@ -20,7 +20,7 @@ module QA validate_content('My First Wiki Content') - Page::Project::Wiki::Edit.perform(&:go_to_edit_page) + Page::Project::Wiki::Edit.perform(&:click_edit) Page::Project::Wiki::New.perform do |page| page.set_content("My Second Wiki Content") page.save_changes diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb index 2238d6c382e..7c1d4489c47 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb @@ -70,7 +70,7 @@ module QA puts 'Waiting for the runner to process the pipeline' sleep 15 # Runner should process all jobs within 15 seconds. - Page::Project::Pipeline::Index.perform(&:go_to_latest_pipeline) + Page::Project::Pipeline::Index.perform(&:click_on_latest_pipeline) Page::Project::Pipeline::Show.perform do |pipeline| expect(pipeline).to be_running diff --git a/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb b/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb index 3f65eabc756..609155da855 100644 --- a/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb +++ b/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb @@ -91,8 +91,8 @@ module QA sha1sum = Digest::SHA1.hexdigest(gitlab_ci) Page::Project::Menu.perform(&:click_ci_cd_pipelines) - Page::Project::Pipeline::Index.perform(&:go_to_latest_pipeline) - Page::Project::Pipeline::Show.perform(&:go_to_first_job) + Page::Project::Pipeline::Index.perform(&:click_on_latest_pipeline) + Page::Project::Pipeline::Show.perform(&:click_on_first_job) Page::Project::Job::Show.perform do |job| expect(job).to be_successful diff --git a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb index ceb888bb4ef..e9e0b69d7b8 100644 --- a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb +++ b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb @@ -63,10 +63,10 @@ module QA end Page::Project::Menu.perform(&:click_ci_cd_pipelines) - Page::Project::Pipeline::Index.perform(&:go_to_latest_pipeline) + Page::Project::Pipeline::Index.perform(&:click_on_latest_pipeline) Page::Project::Pipeline::Show.perform do |pipeline| - pipeline.go_to_job('build') + pipeline.click_job('build') end Page::Project::Job::Show.perform do |job| expect(job).to be_successful(timeout: 600) @@ -75,7 +75,7 @@ module QA end Page::Project::Pipeline::Show.perform do |pipeline| - pipeline.go_to_job('test') + pipeline.click_job('test') end Page::Project::Job::Show.perform do |job| expect(job).to be_successful(timeout: 600) @@ -84,7 +84,7 @@ module QA end Page::Project::Pipeline::Show.perform do |pipeline| - pipeline.go_to_job('production') + pipeline.click_job('production') end Page::Project::Job::Show.perform do |job| expect(job).to be_successful(timeout: 1200) @@ -92,9 +92,9 @@ module QA job.click_element(:pipeline_path) end - Page::Project::Menu.perform(&:click_operations_environments) + Page::Project::Menu.perform(&:go_to_operations_environments) Page::Project::Operations::Environments::Index.perform do |index| - index.go_to_environment('production') + index.click_environment_linkindex.go_to_environment('production') end Page::Project::Operations::Environments::Show.perform do |show| show.view_deployment do @@ -125,7 +125,7 @@ module QA end Page::Project::Menu.perform(&:click_ci_cd_pipelines) - Page::Project::Pipeline::Index.perform(&:go_to_latest_pipeline) + Page::Project::Pipeline::Index.perform(&:click_on_latest_pipeline) Page::Project::Pipeline::Show.perform do |pipeline| expect(pipeline).to have_tag('Auto DevOps') diff --git a/qa/qa/specs/features/browser_ui/7_configure/mattermost/create_group_with_mattermost_team_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/mattermost/create_group_with_mattermost_team_spec.rb index 7096864e011..8383dcdb983 100644 --- a/qa/qa/specs/features/browser_ui/7_configure/mattermost/create_group_with_mattermost_team_spec.rb +++ b/qa/qa/specs/features/browser_ui/7_configure/mattermost/create_group_with_mattermost_team_spec.rb @@ -9,7 +9,7 @@ module QA Page::Main::Menu.act { go_to_groups } Page::Dashboard::Groups.perform do |page| - page.go_to_new_group + page.click_new_group expect(page).to have_content( /Create a Mattermost team for this group/ diff --git a/qa/qa/tools/revoke_all_personal_access_tokens.rb b/qa/qa/tools/revoke_all_personal_access_tokens.rb index 7484b633bf6..8a74f52324d 100644 --- a/qa/qa/tools/revoke_all_personal_access_tokens.rb +++ b/qa/qa/tools/revoke_all_personal_access_tokens.rb @@ -27,7 +27,7 @@ module QA Runtime::Browser.visit(ENV['GITLAB_ADDRESS'], Page::Main::Login) Page::Main::Login.perform(&:sign_in_using_credentials) - Page::Main::Menu.perform(&:go_to_profile_settings) + Page::Main::Menu.perform(&:click_settings_link) Page::Profile::Menu.perform(&:click_access_tokens) token_name = 'api-test-token' |