blob: 0c95f72208094b3e7c66aedc24cb92359c5b9e9d (
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
|
# frozen_string_literal: true
module QA
module Page
module Issuable
class New < Page::Base
view 'app/views/shared/issuable/form/_title.html.haml' do
element :issuable_form_title
end
view 'app/views/shared/issuable/form/_metadata.html.haml' do
element :issuable_milestone_dropdown
end
view 'app/views/shared/form_elements/_description.html.haml' do
element :issuable_form_description_field
end
view 'app/views/shared/issuable/_milestone_dropdown.html.haml' do
element :issuable_dropdown_menu_milestone
end
view 'app/views/shared/issuable/_label_dropdown.html.haml' do
element :issuable_label
end
view 'app/views/shared/issuable/form/_metadata_issuable_assignee.html.haml' do
element :assign_to_me_link
end
view 'app/views/shared/issuable/form/_template_selector.html.haml' do
element :template_dropdown
end
def fill_title(title)
fill_element :issuable_form_title, title
end
def fill_description(description)
fill_element :issuable_form_description_field, description
end
def choose_milestone(milestone)
click_element :issuable_milestone_dropdown
within_element(:issuable_dropdown_menu_milestone) do
click_on milestone.title
end
end
def choose_template(template_name)
click_element :template_dropdown
within_element(:template_dropdown) do
click_on template_name
end
end
def select_label(label)
click_element :issuable_label
click_link label.title
click_element :issuable_label # So that the dropdown goes away(click away action)
end
def assign_to_me
click_element :assign_to_me_link
end
end
end
end
end
|