wait: nil should mean use default, not 0
This commit is contained in:
parent
590793d004
commit
f2a431931f
|
@ -112,7 +112,8 @@ module Capybara
|
|||
#
|
||||
# @overload assert_all_of_selectors([kind = Capybara.default_selector], *locators, options = {})
|
||||
#
|
||||
def assert_all_of_selectors(*args, wait: session_options.default_max_wait_time, **options, &optional_filter_block)
|
||||
def assert_all_of_selectors(*args, wait: nil, **options, &optional_filter_block)
|
||||
wait = session_options.default_max_wait_time if wait.nil?
|
||||
selector = args.first.is_a?(Symbol) ? args.shift : session_options.default_selector
|
||||
synchronize(wait) do
|
||||
args.each do |locator|
|
||||
|
@ -136,7 +137,8 @@ module Capybara
|
|||
#
|
||||
# @overload assert_none_of_selectors([kind = Capybara.default_selector], *locators, options = {})
|
||||
#
|
||||
def assert_none_of_selectors(*args, wait: session_options.default_max_wait_time, **options, &optional_filter_block)
|
||||
def assert_none_of_selectors(*args, wait: nil, **options, &optional_filter_block)
|
||||
wait = session_options.default_max_wait_time if wait.nil?
|
||||
selector = args.first.is_a?(Symbol) ? args.shift : session_options.default_selector
|
||||
synchronize(wait) do
|
||||
args.each do |locator|
|
||||
|
|
|
@ -22,7 +22,10 @@ module Capybara
|
|||
end
|
||||
|
||||
def self.wait(options, default = Capybara.default_max_wait_time)
|
||||
options.fetch(:wait, default) || 0
|
||||
# if no value or nil for the :wait option is passed it should default to the default
|
||||
w = options.fetch(:wait, nil)
|
||||
w = default if w.nil?
|
||||
w || 0
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in New Issue