diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-02 15:09:08 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-02 15:09:08 +0000 |
commit | 840d5ecdbbf8da3e03a7f0b8b465a89d1519807c (patch) | |
tree | 4e197815c026a947057f7b5cbcb5e3cf106cc22f /qa | |
parent | b0107e8756bf3287f8a6221252c800209a9c46f6 (diff) | |
download | gitlab-ce-840d5ecdbbf8da3e03a7f0b8b465a89d1519807c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa.rb | 1 | ||||
-rw-r--r-- | qa/qa/page/component/project_selector.rb | 28 | ||||
-rw-r--r-- | qa/qa/page/main/menu.rb | 9 | ||||
-rw-r--r-- | qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb | 4 |
4 files changed, 39 insertions, 3 deletions
@@ -448,6 +448,7 @@ module QA autoload :ConfirmModal, 'qa/page/component/confirm_modal' autoload :CustomMetric, 'qa/page/component/custom_metric' autoload :DesignManagement, 'qa/page/component/design_management' + autoload :ProjectSelector, 'qa/page/component/project_selector' module Issuable autoload :Common, 'qa/page/component/issuable/common' diff --git a/qa/qa/page/component/project_selector.rb b/qa/qa/page/component/project_selector.rb new file mode 100644 index 00000000000..80ed6b8e53b --- /dev/null +++ b/qa/qa/page/component/project_selector.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module QA + module Page + module Component + module ProjectSelector + extend QA::Page::PageConcern + + def self.included(base) + super + + base.view 'app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue' do + element :project_search_field + element :project_list_item + end + end + + def fill_project_search_input(project_name) + fill_element :project_search_field, project_name + end + + def select_project + click_element :project_list_item + end + end + end + end +end diff --git a/qa/qa/page/main/menu.rb b/qa/qa/page/main/menu.rb index 6af18cb1d2b..416946f44f0 100644 --- a/qa/qa/page/main/menu.rb +++ b/qa/qa/page/main/menu.rb @@ -22,6 +22,9 @@ module QA element :groups_dropdown, required: true element :more_dropdown element :snippets_link + element :groups_link + element :activity_link + element :milestones_link end view 'app/views/layouts/nav/projects_dropdown/_show.html.haml' do @@ -53,10 +56,10 @@ module QA end end - def go_to_snippets + def go_to_more_dropdown_option(option_name) within_top_menu do click_element :more_dropdown - click_element :snippets_link + click_element option_name end end @@ -148,3 +151,5 @@ module QA end end end + +QA::Page::Main::Menu.prepend_if_ee('QA::EE::Page::Main::Menu') diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb index 451a7847f8b..b7e9be8e326 100644 --- a/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb @@ -6,7 +6,9 @@ module QA it 'User creates a personal snippet' do Flow::Login.sign_in - Page::Main::Menu.perform(&:go_to_snippets) + Page::Main::Menu.perform do |menu| + menu.go_to_more_dropdown_option(:snippets_link) + end Resource::Snippet.fabricate_via_browser_ui! do |snippet| snippet.title = 'Snippet title' |