blob: 704698dc9d8e7365b8c19951eb3120ec0ec08d03 (
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
|
# frozen_string_literal: true
module QA
module Page
module Project
module Snippet
class Index < Page::Base
include Page::Component::Snippet
include Page::Component::BlobContent
view 'app/views/shared/snippets/_snippet.html.haml' do
element :snippet_link
end
def has_project_snippet?(title)
has_element?(:snippet_link, snippet_title: title)
end
def click_snippet_link(title)
within_element(:snippet_link, text: title) do
click_link(title)
end
end
end
end
end
end
end
QA::Page::Project::Snippet::Index.prepend_mod_with('Page::Project::Snippet::Index', namespace: QA)
|