mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Merge branch 'has_selector_block_return_fix' of https://github.com/madadam/capybara into madadam-has_selector_block_return_fix
This commit is contained in:
commit
f2b153016a
1 changed files with 4 additions and 6 deletions
|
@ -37,9 +37,9 @@ module Capybara
|
|||
wait_conditionally_until do
|
||||
results = all(*args)
|
||||
|
||||
return false if results.empty?
|
||||
|
||||
case
|
||||
when results.empty?
|
||||
false
|
||||
when options[:between]
|
||||
options[:between] === results.size
|
||||
when options[:count]
|
||||
|
@ -51,7 +51,6 @@ module Capybara
|
|||
else
|
||||
results.size > 0
|
||||
end
|
||||
|
||||
end
|
||||
rescue Capybara::TimeoutError
|
||||
return false
|
||||
|
@ -70,9 +69,9 @@ module Capybara
|
|||
wait_conditionally_until do
|
||||
results = all(*args)
|
||||
|
||||
return true if results.empty?
|
||||
|
||||
case
|
||||
when results.empty?
|
||||
true
|
||||
when options[:between]
|
||||
not(options[:between] === results.size)
|
||||
when options[:count]
|
||||
|
@ -84,7 +83,6 @@ module Capybara
|
|||
else
|
||||
results.empty?
|
||||
end
|
||||
|
||||
end
|
||||
rescue Capybara::TimeoutError
|
||||
return false
|
||||
|
|
Loading…
Reference in a new issue