blob: 10c0ee1f0a96244767a57514f7f1e71a97034ca6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# frozen_string_literal: true
module QA
module Page
module Group
class Menu < Page::Base
include SubMenus::Common
view 'app/views/layouts/nav/sidebar/_group.html.haml' do
element :general_settings_link
element :group_issues_item
element :group_members_item
element :group_milestones_link
element :group_settings_item
end
view 'app/views/groups/sidebar/_packages_settings.html.haml' do
element :group_package_settings_link
end
view 'app/views/layouts/nav/sidebar/_analytics_links.html.haml' do
element :analytics_link
element :analytics_sidebar_submenu
end
def click_group_members_item
within_sidebar do
click_element(:group_members_item)
end
end
def click_settings
within_sidebar do
click_element(:group_settings_item)
end
end
def click_contribution_analytics_item
hover_element(:analytics_link) do
within_submenu(:analytics_sidebar_submenu) do
click_element(:contribution_analytics_link)
end
end
end
def click_group_general_settings_item
hover_element(:group_settings_item) do
within_submenu(:group_sidebar_submenu) do
click_element(:general_settings_link)
end
end
end
def go_to_milestones
hover_issues do
within_submenu do
click_element(:group_milestones_link)
end
end
end
def go_to_package_settings
scroll_to_element(:group_settings_item)
hover_element(:group_settings_item) do
within_submenu(:group_sidebar_submenu) do
click_element(:group_package_settings_link)
end
end
end
private
def hover_issues
within_sidebar do
scroll_to_element(:group_issues_item)
find_element(:group_issues_item).hover
yield
end
end
end
end
end
end
QA::Page::Group::Menu.prepend_if_ee('QA::EE::Page::Group::Menu')
|