From 1dd42da802eeace25c2a38b736738e535a86d362 Mon Sep 17 00:00:00 2001
From: Robert Speicher <rspeicher@gmail.com>
Date: Thu, 18 Jun 2015 19:46:50 -0400
Subject: [PATCH] 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.
---
 spec/support/capybara_helpers.rb | 2 ++
 1 file changed, 2 insertions(+)

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
-- 
GitLab