blob: 7976e96d43b6eaa8539c276e9c6d105aa93466e3 (
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
|
module QA
module Page
module Project
class New < Page::Base
include Page::Component::Select2
view 'app/views/projects/new.html.haml' do
element :import_project_tab, "Import project"
end
view 'app/views/projects/_new_project_fields.html.haml' do
element :project_namespace_select
element :project_namespace_field, /select :namespace_id.*class: 'select2/
element :project_path, 'text_field :path'
element :project_description, 'text_area :description'
element :project_create_button, "submit 'Create project'"
end
view 'app/views/projects/_import_project_pane.html.haml' do
element :import_github, "icon('github', text: 'GitHub')"
end
def choose_test_namespace
click_element :project_namespace_select
select_item(Runtime::Namespace.path)
end
def go_to_import_project
click_on 'Import project'
end
def choose_name(name)
fill_in 'project_path', with: name
end
def add_description(description)
fill_in 'project_description', with: description
end
def create_new_project
click_on 'Create project'
end
def go_to_github_import
click_link 'GitHub'
end
end
end
end
end
|