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 ...@@ -70,12 +70,13 @@ module QA
module Main module Main
autoload :Login, 'qa/page/main/login' autoload :Login, 'qa/page/main/login'
autoload :Menu, 'qa/page/main/menu'
autoload :OAuth, 'qa/page/main/oauth' autoload :OAuth, 'qa/page/main/oauth'
end end
module Menu module Menu
autoload :Main, 'qa/page/menu/main'
autoload :Side, 'qa/page/menu/side' autoload :Side, 'qa/page/menu/side'
autoload :Admin, 'qa/page/menu/admin'
end end
module Dashboard module Dashboard
...@@ -100,7 +101,6 @@ module QA ...@@ -100,7 +101,6 @@ module QA
end end
module Admin module Admin
autoload :Menu, 'qa/page/admin/menu'
autoload :Settings, 'qa/page/admin/settings' autoload :Settings, 'qa/page/admin/settings'
end end
......
...@@ -11,7 +11,7 @@ module QA ...@@ -11,7 +11,7 @@ module QA
end end
def fabricate! def fabricate!
Page::Main::Menu.act { go_to_groups } Page::Menu::Main.act { go_to_groups }
Page::Dashboard::Groups.perform do |page| Page::Dashboard::Groups.perform do |page|
if page.has_group?(@name) if page.has_group?(@name)
......
...@@ -6,15 +6,15 @@ module QA ...@@ -6,15 +6,15 @@ module QA
raise ArgumentError unless traits.include?(:enabled) raise ArgumentError unless traits.include?(:enabled)
Page::Main::Login.act { sign_in_using_credentials } Page::Main::Login.act { sign_in_using_credentials }
Page::Main::Menu.act { go_to_admin_area } Page::Menu::Main.act { go_to_admin_area }
Page::Admin::Menu.act { go_to_settings } Page::Menu::Admin.act { go_to_settings }
Page::Admin::Settings.act do Page::Admin::Settings.act do
enable_hashed_storage enable_hashed_storage
save_settings save_settings
end end
QA::Page::Main::Menu.act { sign_out } QA::Page::Menu::Main.act { sign_out }
end end
end end
end end
......
module QA module QA
module Page module Page
module Admin module Menu
class Menu < Page::Base class Admin < Page::Base
def go_to_license def go_to_license
click_link 'License' click_link 'License'
end end
......
module QA module QA
module Page module Page
module Main module Menu
class Menu < Page::Base class Main < Page::Base
def go_to_groups def go_to_groups
within_top_menu { click_link 'Groups' } within_top_menu { click_link 'Groups' }
end end
......
...@@ -7,7 +7,7 @@ module QA ...@@ -7,7 +7,7 @@ module QA
# TODO, since `Signed in successfully` message was removed # TODO, since `Signed in successfully` message was removed
# this is the only way to tell if user is signed in correctly. # 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 expect(menu).to have_personal_area
end end
end end
......
...@@ -3,7 +3,7 @@ module QA ...@@ -3,7 +3,7 @@ module QA
scenario 'creating a group with a mattermost team' do scenario 'creating a group with a mattermost team' do
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials } 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::Dashboard::Groups.perform do |page|
page.go_to_new_group 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