diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-13 13:26:31 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-13 13:26:31 +0000 |
commit | b7dfe2ae4054aa40e15182fd3c6cb7dd39f131db (patch) | |
tree | 5ab080ca9cadeb6cd9578bf301e4e9e8810bed9e /qa/qa/page/group/sub_menus/common.rb | |
parent | 25cb337cf12438169f1b14bc5dace8a06a7356e3 (diff) | |
download | gitlab-ce-b7dfe2ae4054aa40e15182fd3c6cb7dd39f131db.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/qa/page/group/sub_menus/common.rb')
-rw-r--r-- | qa/qa/page/group/sub_menus/common.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/qa/qa/page/group/sub_menus/common.rb b/qa/qa/page/group/sub_menus/common.rb new file mode 100644 index 00000000000..a378db80e4b --- /dev/null +++ b/qa/qa/page/group/sub_menus/common.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +module QA + module Page + module Group + module SubMenus + module Common + def self.included(base) + base.class_eval do + view 'app/views/layouts/nav/sidebar/_group.html.haml' do + element :group_sidebar + end + end + end + + def hover_element(element) + within_sidebar do + find_element(element).hover + yield + end + end + + def within_sidebar + within_element(:group_sidebar) do + yield + end + end + + def within_submenu(element) + within_element(element) do + yield + end + end + end + end + end + end +end |