Commit 1e79ebf0 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Put all menus under menu module

parent 7945878d
......@@ -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
......
......@@ -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)
......
......@@ -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
......
module QA
module Page
module Admin
class Menu < Page::Base
module Menu
class Admin < Page::Base
def go_to_license
click_link 'License'
end
......
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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment