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

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

module QA
  module Page
    module Blame
      class Show < Page::Base
        view 'app/views/projects/blob/_header_content.html.haml' do
          element :file_name_content
        end

        view 'app/views/projects/blame/show.html.haml' do
          element :blame_file_content
        end

        def has_file?(file_name)
          within_element(:file_name_content) { has_text?(file_name) }
        end

        def has_no_file?(file_name)
          within_element(:file_name_content) do
            has_no_text?(file_name)
          end
        end

        def has_file_content?(file_content)
          within_element(:blame_file_content) { has_text?(file_content) }
        end

        def has_no_file_content?(file_content)
          within_element(:blame_file_content) do
            has_no_text?(file_content)
          end
        end
      end
    end
  end
end