blob: bf1cab510c85772270040cc42daaab5683690493 (
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
|
# frozen_string_literal: true
module QA
module Page
module Group
class Show < Page::Base
include Page::Component::GroupsFilter
include QA::Page::Component::ConfirmModal
view 'app/views/groups/_home_panel.html.haml' do
element 'new-project-button'
element 'new-subgroup-button'
end
def click_subgroup(name)
click_link name
end
def has_new_project_and_new_subgroup_buttons?
has_element?('new_project_button')
has_element?('new-subgroup-button')
end
def has_subgroup?(name)
has_filtered_group?(name)
end
def go_to_new_subgroup
click_element('new-subgroup-button')
end
def go_to_new_project
click_element 'new-project-button'
end
def group_id
find_element('group-id-content').text.delete('Group ID: ').sub(/\n.*/, '')
end
def leave_group
click_element 'groups-projects-more-actions-dropdown'
wait_for_requests
click_element 'leave-group-link'
click_confirmation_ok_button
end
def click_request_access
click_element 'groups-projects-more-actions-dropdown'
wait_for_requests
click_element 'request-access-link'
end
end
end
end
end
|