diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-01-02 22:09:43 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-01-02 22:27:01 +0800 |
commit | 1e79ebf044c26e363587ae5c78999a324da6d8f6 (patch) | |
tree | 5270fa71320e30e055f62d4c43c5c375a59eaaa6 /qa | |
parent | 7945878d45775e74046196bfd40291a1a7747724 (diff) | |
download | gitlab-ce-1e79ebf044c26e363587ae5c78999a324da6d8f6.tar.gz |
Put all menus under menu module
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa.rb | 4 | ||||
-rw-r--r-- | qa/qa/factory/resource/sandbox.rb | 2 | ||||
-rw-r--r-- | qa/qa/factory/settings/hashed_storage.rb | 6 | ||||
-rw-r--r-- | qa/qa/page/menu/admin.rb (renamed from qa/qa/page/admin/menu.rb) | 4 | ||||
-rw-r--r-- | qa/qa/page/menu/main.rb (renamed from qa/qa/page/main/menu.rb) | 4 | ||||
-rw-r--r-- | qa/qa/specs/features/login/standard_spec.rb | 2 | ||||
-rw-r--r-- | qa/qa/specs/features/mattermost/group_create_spec.rb | 2 |
7 files changed, 12 insertions, 12 deletions
@@ -70,12 +70,13 @@ module QA module Main autoload :Login, 'qa/page/main/login' - autoload :Menu, 'qa/page/main/menu' autoload :OAuth, 'qa/page/main/oauth' end module Menu + autoload :Main, 'qa/page/menu/main' autoload :Side, 'qa/page/menu/side' + autoload :Admin, 'qa/page/menu/admin' end module Dashboard @@ -100,7 +101,6 @@ module QA end module Admin - autoload :Menu, 'qa/page/admin/menu' autoload :Settings, 'qa/page/admin/settings' end diff --git a/qa/qa/factory/resource/sandbox.rb b/qa/qa/factory/resource/sandbox.rb index 558da1c973b..ad376988e82 100644 --- a/qa/qa/factory/resource/sandbox.rb +++ b/qa/qa/factory/resource/sandbox.rb @@ -11,7 +11,7 @@ module QA end def fabricate! - Page::Main::Menu.act { go_to_groups } + Page::Menu::Main.act { go_to_groups } Page::Dashboard::Groups.perform do |page| if page.has_group?(@name) diff --git a/qa/qa/factory/settings/hashed_storage.rb b/qa/qa/factory/settings/hashed_storage.rb index eb3b28f2613..13ce2435fe4 100644 --- a/qa/qa/factory/settings/hashed_storage.rb +++ b/qa/qa/factory/settings/hashed_storage.rb @@ -6,15 +6,15 @@ module QA raise ArgumentError unless traits.include?(:enabled) Page::Main::Login.act { sign_in_using_credentials } - Page::Main::Menu.act { go_to_admin_area } - Page::Admin::Menu.act { go_to_settings } + Page::Menu::Main.act { go_to_admin_area } + Page::Menu::Admin.act { go_to_settings } Page::Admin::Settings.act do enable_hashed_storage save_settings end - QA::Page::Main::Menu.act { sign_out } + QA::Page::Menu::Main.act { sign_out } end end end diff --git a/qa/qa/page/admin/menu.rb b/qa/qa/page/menu/admin.rb index dd289ffe269..07fe40fda3a 100644 --- a/qa/qa/page/admin/menu.rb +++ b/qa/qa/page/menu/admin.rb @@ -1,7 +1,7 @@ module QA module Page - module Admin - class Menu < Page::Base + module Menu + class Admin < Page::Base def go_to_license click_link 'License' end diff --git a/qa/qa/page/main/menu.rb b/qa/qa/page/menu/main.rb index bc9c4ec1215..b94c2c6c23d 100644 --- a/qa/qa/page/main/menu.rb +++ b/qa/qa/page/menu/main.rb @@ -1,7 +1,7 @@ module QA module Page - module Main - class Menu < Page::Base + module Menu + class Main < Page::Base def go_to_groups within_top_menu { click_link 'Groups' } end diff --git a/qa/qa/specs/features/login/standard_spec.rb b/qa/qa/specs/features/login/standard_spec.rb index 9eaa2b772e6..141ffa3cfb7 100644 --- a/qa/qa/specs/features/login/standard_spec.rb +++ b/qa/qa/specs/features/login/standard_spec.rb @@ -7,7 +7,7 @@ module QA # TODO, since `Signed in successfully` message was removed # this is the only way to tell if user is signed in correctly. # - Page::Main::Menu.perform do |menu| + Page::Menu::Main.perform do |menu| expect(menu).to have_personal_area end end diff --git a/qa/qa/specs/features/mattermost/group_create_spec.rb b/qa/qa/specs/features/mattermost/group_create_spec.rb index b3dbe44bf6e..2e27a285223 100644 --- a/qa/qa/specs/features/mattermost/group_create_spec.rb +++ b/qa/qa/specs/features/mattermost/group_create_spec.rb @@ -3,7 +3,7 @@ module QA scenario 'creating a group with a mattermost team' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } - Page::Main::Menu.act { go_to_groups } + Page::Menu::Main.act { go_to_groups } Page::Dashboard::Groups.perform do |page| page.go_to_new_group |