summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-04-25 16:54:26 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-05-04 13:52:55 +0200
commit17b25bd263edaae70d5dae5fb035f5c28f9bb0cd (patch)
tree064cf11dafc8f56c40f797e2ccf89af685a7720e /qa
parent82eeb72c8c03727540b902d40e7e657d0a5ecb4c (diff)
downloadgitlab-ce-17b25bd263edaae70d5dae5fb035f5c28f9bb0cd.tar.gz
Make the user dropdown reusable
We will reuse the the dropdown, but exclude some menu items based on permissions. So moving the menu to a partial, and adding checks for each menu item here.
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/menu/main.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/qa/qa/page/menu/main.rb b/qa/qa/page/menu/main.rb
index df93a5fa2d2..d3562effaab 100644
--- a/qa/qa/page/menu/main.rb
+++ b/qa/qa/page/menu/main.rb
@@ -2,12 +2,15 @@ module QA
module Page
module Menu
class Main < Page::Base
+ view 'app/views/layouts/header/_current_user_dropdown.html.haml' do
+ element :user_sign_out_link, 'link_to _("Sign out")'
+ element :settings_link, 'link_to s_("CurrentUser|Settings")'
+ end
+
view 'app/views/layouts/header/_default.html.haml' do
element :navbar
element :user_avatar
element :user_menu, '.dropdown-menu-nav'
- element :user_sign_out_link, 'link_to "Sign out"'
- element :settings_link, 'link_to "Settings"'
end
view 'app/views/layouts/nav/_dashboard.html.haml' do