Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.rb « snippet « project « page « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a221abc4196174d35858d39f36fe10b6e200ba2c (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
# frozen_string_literal: true

module QA
  module Page
    module Project
      module Snippet
        class Index < Page::Base
          include Page::Component::Snippet

          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_if_ee('QA::EE::Page::Project::Snippet::Index')