1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/lib/capybara/queries/match_query.rb
2018-09-24 09:43:46 -07:00

26 lines
565 B
Ruby

# frozen_string_literal: true
module Capybara
module Queries
class MatchQuery < Capybara::Queries::SelectorQuery
def visible
options.key?(:visible) ? super : :all
end
private
def assert_valid_keys
invalid_options = @options.keys & COUNT_KEYS
unless invalid_options.empty?
raise ArgumentError, "Match queries don't support quantity options. Invalid keys - #{invalid_options.join(', ')}"
end
super
end
def valid_keys
super - COUNT_KEYS
end
end
end
end