blob: 8c9741c30863d02ba190a7a177006faf889fa44e (
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
|
# frozen_string_literal: true
module QA
module Page
module Component
module WikiSidebar
extend QA::Page::PageConcern
def self.included(base)
super
base.view 'app/views/shared/wikis/_sidebar.html.haml' do
element 'clone-repository-link'
element 'view-all-pages-button'
end
base.view 'app/views/shared/wikis/_sidebar_wiki_page.html.haml' do
element 'wiki-page-link'
end
base.view 'app/views/shared/wikis/_wiki_directory.html.haml' do
element 'wiki-directory-content'
element 'wiki-dir-page-link'
end
end
def click_clone_repository
click_element('clone-repository-link')
end
def click_view_all_pages
click_element('view-all-pages-button')
end
def click_page_link(page_title)
click_element('wiki-page-link', page_name: page_title)
end
def has_page_listed?(page_title)
has_element?('wiki-page-link', page_name: page_title)
end
def has_directory?(directory)
has_element?('wiki-directory-content', text: directory)
end
def has_dir_page?(dir_page)
has_element?('wiki-dir-page-link', page_name: dir_page)
end
end
end
end
end
|