mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
DRY
This commit is contained in:
parent
6dac198811
commit
87e8b105be
1 changed files with 2 additions and 3 deletions
|
@ -4,7 +4,7 @@ module Capybara
|
||||||
class SelectorQuery < Queries::BaseQuery
|
class SelectorQuery < Queries::BaseQuery
|
||||||
attr_accessor :selector, :locator, :options, :expression, :find, :negative
|
attr_accessor :selector, :locator, :options, :expression, :find, :negative
|
||||||
|
|
||||||
VALID_KEYS = [:text, :visible, :between, :count, :maximum, :minimum, :exact, :match, :wait, :filter_set]
|
VALID_KEYS = COUNT_KEYS + [:text, :visible, :exact, :match, :wait, :filter_set]
|
||||||
VALID_MATCH = [:first, :smart, :prefer_exact, :one]
|
VALID_MATCH = [:first, :smart, :prefer_exact, :one]
|
||||||
|
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
|
@ -129,8 +129,7 @@ module Capybara
|
||||||
private
|
private
|
||||||
|
|
||||||
def valid_keys
|
def valid_keys
|
||||||
vk = COUNT_KEYS + [:text, :visible, :exact, :match, :wait, :filter_set]
|
VALID_KEYS + custom_keys
|
||||||
vk + custom_keys
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def query_filters
|
def query_filters
|
||||||
|
|
Loading…
Reference in a new issue