blob: bf8f349cfd58073cdd3f68a43d0d258625e459e1 (
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
|
# frozen_string_literal: true
module QA
module Page
module Project
module Settings
class ProtectedTags < Page::Base
include Page::Component::DropdownFilter
view 'app/views/projects/protected_tags/shared/_dropdown.html.haml' do
element :tags_dropdown
end
view 'app/views/projects/protected_tags/_create_protected_tag.html.haml' do
element :access_levels_content
element :access_levels_dropdown
end
view 'app/views/projects/protected_tags/shared/_create_protected_tag.html.haml' do
element :protect_tag_button
end
def set_tag(tag_name)
click_element :tags_dropdown
filter_and_select(tag_name)
end
def choose_access_level_role(role)
return if find_element(:access_levels_dropdown).text == role
click_element :access_levels_dropdown
within_element(:access_levels_content) do
click_on role
end
end
def click_protect_tag_button
click_element :protect_tag_button
end
end
end
end
end
end
QA::Page::Project::Settings::ProtectedTags.prepend_if_ee('QA::EE::Page::Project::Settings::ProtectedTags')
|