diff options
Diffstat (limited to 'qa/qa/page/main/menu.rb')
-rw-r--r-- | qa/qa/page/main/menu.rb | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/qa/qa/page/main/menu.rb b/qa/qa/page/main/menu.rb index f0df901a8f0..f796f4c9475 100644 --- a/qa/qa/page/main/menu.rb +++ b/qa/qa/page/main/menu.rb @@ -35,17 +35,24 @@ module QA element :your_projects_link end + view 'app/views/layouts/nav/groups_dropdown/_show.html.haml' do + element :create_group_link + element :import_group_link + end + view 'app/views/layouts/_search.html.haml' do element :search_term_field end def go_to_groups - within_top_menu do - click_element :groups_dropdown + within_groups_menu do + click_element :your_groups_link end + end - page.within('.qa-groups-dropdown-sidebar') do - click_element :your_groups_link + def go_to_import_group + within_groups_menu do + click_element :import_group_link end end @@ -125,6 +132,12 @@ module QA end end + def click_user_profile_link + within_user_menu do + click_element(:user_profile_link) + end + end + def search_for(term) fill_element :search_term_field, "#{term}\n" end @@ -167,6 +180,14 @@ module QA end end + def within_groups_menu(&block) + within_top_menu do + click_element :groups_dropdown + end + + page.within('.qa-groups-dropdown-sidebar', &block) + end + def click_admin_area within_top_menu { click_element :admin_area_link } end @@ -175,4 +196,4 @@ module QA end end -QA::Page::Main::Menu.prepend_if_ee('QA::EE::Page::Main::Menu') +QA::Page::Main::Menu.prepend_mod_with('Page::Main::Menu', namespace: QA) |