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

have_element.rb « matchers « support « spec « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bf74a78a3b5166e0be3863ce5052a2d92ccaa21f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Matchers
  module HaveElement
    RSpec::Matchers.define :have_element do |element, **kwargs|
      match do |page_object|
        page_object.has_element?(element, **kwargs)
      end

      match_when_negated do |page_object|
        page_object.has_no_element?(element, **kwargs)
      end
    end
  end
end