blob: ff822a6b11743637d605e57f7936fd3c3d536fa0 (
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
|
# frozen_string_literal: true
module QA
module Page
module Dashboard
class Projects < Page::Base
view 'app/views/shared/projects/_search_form.html.haml' do
element 'project-filter-form-container', required: true
end
view 'app/views/shared/projects/_project.html.haml' do
element 'project-content'
element 'user-role-content'
end
view 'app/views/dashboard/_projects_head.html.haml' do
element 'new-project-button'
end
view 'app/views/dashboard/projects/_blank_state_welcome.html.haml' do
element 'new-project-button'
end
view 'app/views/dashboard/projects/_blank_state_admin_welcome.html.haml' do
element 'new-project-button'
end
def has_project_with_access_role?(project_name, access_role)
within_element('project-content', text: project_name) do
has_element?('user-role-content', text: access_role)
end
end
def filter_by_name(name)
within_element('project-filter-form-container') do
fill_in :name, with: name
end
end
def go_to_project(name)
filter_by_name(name)
find_link(text: name).click
end
def click_new_project_button
click_element('new-project-button', Page::Project::New)
end
def self.path
'/'
end
def clear_project_filter
fill_element('project-filter-form-container', "")
end
end
end
end
end
QA::Page::Dashboard::Projects.prepend_mod_with('Page::Dashboard::Projects', namespace: QA)
|