summaryrefslogtreecommitdiff
path: root/spec/support/capybara_helpers.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-06-18 19:46:50 -0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-22 12:13:49 +0200
commit1dd42da802eeace25c2a38b736738e535a86d362 (patch)
tree209e3c3204ee45404a206d3ecf1073d247bbbf9e /spec/support/capybara_helpers.rb
parentbf71d53f634926bee91955c8ecee7a3869fcd518 (diff)
downloadgitlab-ce-1dd42da802eeace25c2a38b736738e535a86d362.tar.gz
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.
Diffstat (limited to 'spec/support/capybara_helpers.rb')
-rw-r--r--spec/support/capybara_helpers.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/support/capybara_helpers.rb b/spec/support/capybara_helpers.rb
index 5356a3b588d..9b5c3065eed 100644
--- a/spec/support/capybara_helpers.rb
+++ b/spec/support/capybara_helpers.rb
@@ -14,6 +14,8 @@ module CapybaraHelpers
tries = 0
begin
+ sleep interval
+
yield
rescue Capybara::ExpectationNotMet => ex
if tries <= retries