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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
# frozen_string_literal: true
module QA
module Page
module Group
class Menu < Page::Base
include SubMenus::Common
def click_group_members_item
hover_group_information do
within_submenu do
click_element(:sidebar_menu_item_link, menu_item: 'Members')
end
end
end
def click_subgroup_members_item
hover_subgroup_information do
within_submenu do
click_element(:sidebar_menu_item_link, menu_item: 'Members')
end
end
end
def click_settings
within_sidebar do
click_element(:sidebar_menu_link, menu_item: 'Settings')
end
end
def click_group_general_settings_item
hover_group_settings do
within_submenu do
click_element(:sidebar_menu_item_link, menu_item: 'General')
end
end
end
def go_to_milestones
hover_issues do
within_submenu do
click_element(:sidebar_menu_item_link, menu_item: 'Milestones')
end
end
end
def go_to_package_settings
hover_group_settings do
within_submenu do
click_element(:sidebar_menu_item_link, menu_item: 'Packages and registries')
end
end
end
def go_to_group_packages
hover_group_packages do
within_submenu do
click_element(:sidebar_menu_item_link, menu_item: 'Package Registry')
end
end
end
def go_to_dependency_proxy
hover_group_packages do
within_submenu do
click_element(:sidebar_menu_item_link, menu_item: 'Dependency Proxy')
end
end
end
def go_to_repository_settings
hover_group_settings do
within_submenu do
click_element(:sidebar_menu_item_link, menu_item: 'Repository')
end
end
end
def go_to_access_token_settings
hover_group_settings do
within_submenu do
click_element(:sidebar_menu_item_link, menu_item: 'Access Tokens')
end
end
end
private
def hover_settings
within_sidebar do
scroll_to_element(:sidebar_menu_link, menu_item: 'Settings')
find_element(:sidebar_menu_link, menu_item: 'Settings').hover
yield
end
end
def hover_issues
within_sidebar do
scroll_to_element(:sidebar_menu_link, menu_item: 'Issues')
find_element(:sidebar_menu_link, menu_item: 'Issues').hover
yield
end
end
def hover_group_information
within_sidebar do
find_element(:sidebar_menu_link, menu_item: 'Group information').hover
yield
end
end
def hover_subgroup_information
within_sidebar do
find_element(:sidebar_menu_link, menu_item: 'Subgroup information').hover
yield
end
end
def hover_group_packages
within_sidebar do
scroll_to_element(:sidebar_menu_link, menu_item: 'Packages and registries')
find_element(:sidebar_menu_link, menu_item: 'Packages and registries').hover
yield
end
end
def hover_group_settings
within_sidebar do
scroll_to_element(:sidebar_menu_link, menu_item: 'Settings')
find_element(:sidebar_menu_link, menu_item: 'Settings').hover
yield
end
end
end
end
end
end
QA::Page::Group::Menu.prepend_mod_with('Page::Group::Menu', namespace: QA)
|