diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-28 09:09:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-28 09:09:59 +0300 |
commit | 99f384810fcb98be5dc45c22552eb80a76021387 (patch) | |
tree | 21429d96a861d76467f32bc010a4b4b86ddf20db /qa | |
parent | 40a8d9a482e10a5f337b19c07d2f93bd8f90851b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/group/menu.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/group/sub_menus/common.rb | 30 | ||||
-rw-r--r-- | qa/qa/page/main/login.rb | 14 | ||||
-rw-r--r-- | qa/qa/page/project/sub_menus/common.rb | 9 | ||||
-rw-r--r-- | qa/qa/page/sub_menus/common.rb | 16 | ||||
-rw-r--r-- | qa/qa/vendor/saml_idp/page/login.rb | 6 |
6 files changed, 14 insertions, 63 deletions
diff --git a/qa/qa/page/group/menu.rb b/qa/qa/page/group/menu.rb index c166023a620..c8f826b20e7 100644 --- a/qa/qa/page/group/menu.rb +++ b/qa/qa/page/group/menu.rb @@ -4,7 +4,7 @@ module QA module Page module Group class Menu < Page::Base - include SubMenus::Common + include QA::Page::SubMenus::Common if Runtime::Env.super_sidebar_enabled? prepend Page::SubMenus::SuperSidebar::Manage diff --git a/qa/qa/page/group/sub_menus/common.rb b/qa/qa/page/group/sub_menus/common.rb deleted file mode 100644 index 6369306da3f..00000000000 --- a/qa/qa/page/group/sub_menus/common.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -module QA - module Page - module Group - module SubMenus - module Common - extend QA::Page::PageConcern - include QA::Page::SubMenus::Common - - def self.included(base) - super - - base.class_eval do - view 'app/views/shared/nav/_sidebar.html.haml' do - element :group_sidebar, 'testid: sidebar_qa_selector(sidebar.container)' # rubocop:disable QA/ElementWithPattern - end - end - end - - private - - def sidebar_element - QA::Runtime::Env.super_sidebar_enabled? ? :navbar : :group_sidebar - end - end - end - end - end -end diff --git a/qa/qa/page/main/login.rb b/qa/qa/page/main/login.rb index 8812c792554..47e50c4a8a3 100644 --- a/qa/qa/page/main/login.rb +++ b/qa/qa/page/main/login.rb @@ -103,12 +103,6 @@ module QA click_element :sign_in_button end - if Runtime::Env.super_sidebar_enabled? - Page::Main::Menu.perform(&:enable_new_navigation) - else - Page::Main::Menu.perform(&:disable_new_navigation) - end - Page::Main::Menu.perform(&:signed_in?) end @@ -269,14 +263,6 @@ module QA wait_for_gitlab_to_respond - if Runtime::Env.super_sidebar_enabled? - Page::Main::Menu.perform(&:enable_new_navigation) - else - Page::Main::Menu.perform(&:disable_new_navigation) - end - - wait_for_gitlab_to_respond - Page::Main::Menu.validate_elements_present! unless skip_page_validation end diff --git a/qa/qa/page/project/sub_menus/common.rb b/qa/qa/page/project/sub_menus/common.rb index e8952f9e064..280d28a697d 100644 --- a/qa/qa/page/project/sub_menus/common.rb +++ b/qa/qa/page/project/sub_menus/common.rb @@ -6,12 +6,13 @@ module QA module SubMenus module Common extend QA::Page::PageConcern - include QA::Page::SubMenus::Common def self.included(base) super base.class_eval do + include QA::Page::SubMenus::Common + view 'app/views/shared/nav/_sidebar_menu_item.html.haml' do element :sidebar_menu_item_link end @@ -25,12 +26,6 @@ module QA end end end - - private - - def sidebar_element - QA::Runtime::Env.super_sidebar_enabled? ? :navbar : :project_sidebar - end end end end diff --git a/qa/qa/page/sub_menus/common.rb b/qa/qa/page/sub_menus/common.rb index 28b4cb37333..b48165725a7 100644 --- a/qa/qa/page/sub_menus/common.rb +++ b/qa/qa/page/sub_menus/common.rb @@ -6,6 +6,16 @@ module QA module Common prepend Mobile::Page::SubMenus::Common if QA::Runtime::Env.mobile_layout? + def self.included(base) + super + + base.class_eval do + view 'app/assets/javascripts/super_sidebar/components/super_sidebar.vue' do + element :navbar + end + end + end + def hover_element(element) within_sidebar do find_element(element).hover @@ -16,7 +26,7 @@ module QA def within_sidebar(&block) wait_for_requests - within_element(sidebar_element, &block) + within_element(:navbar, &block) end def within_submenu(element = nil, &block) @@ -58,10 +68,6 @@ module QA def within_submenu_without_element(&block) has_css?('.fly-out-list') ? within('.fly-out-list', &block) : yield end - - def sidebar_element - raise NotImplementedError - end end end end diff --git a/qa/qa/vendor/saml_idp/page/login.rb b/qa/qa/vendor/saml_idp/page/login.rb index 9b4fbe15366..dda9cd3758f 100644 --- a/qa/qa/vendor/saml_idp/page/login.rb +++ b/qa/qa/vendor/saml_idp/page/login.rb @@ -11,12 +11,6 @@ module QA fill_in 'username', with: username fill_in 'password', with: password click_on 'Login' - - if Runtime::Env.super_sidebar_enabled? - QA::Page::Main::Menu.perform(&:enable_new_navigation) - else - QA::Page::Main::Menu.perform(&:disable_new_navigation) - end end def login_if_required(username, password) |