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

list_rows_helpers.rb « features « helpers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0626415361c2624194366da839eb78f86c03ce49 (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
# frozen_string_literal: true
# These helpers allow you to access rows in the list
#
# Usage:
#   describe "..." do
#   include Spec::Support::Helpers::Features::ListRowsHelpers
#     ...
#
#     expect(first_row.text).to include("John Doe")
#     expect(second_row.text).to include("John Smith")
#
module Spec
  module Support
    module Helpers
      module Features
        module ListRowsHelpers
          def first_row
            page.all('ul.content-list > li')[0]
          end

          def second_row
            page.all('ul.content-list > li')[1]
          end
        end
      end
    end
  end
end