Add sleep call before yield in allowing_for_delay

This is to give pending AJAX requests time to complete before we
navigate away, for example.
This commit is contained in:
Robert Speicher 2015-06-18 19:46:50 -04:00 committed by Dmitriy Zaporozhets
parent bf71d53f63
commit 1dd42da802

View file

@ -14,6 +14,8 @@ module CapybaraHelpers
tries = 0
begin
sleep interval
yield
rescue Capybara::ExpectationNotMet => ex
if tries <= retries