Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-08-12 12:10:59 +0300
committerAlfredo Sumaran <alfredo@gitlab.com>2016-08-13 08:57:40 +0300
commit61bdc80dbad253f6532a83ae2554de82deb40e5f (patch)
treef043c15e862ef690be29d53368cbab7a84b37194 /features/support
parent59955fbbbd5f807654e0861f49b182f27654d4cc (diff)
Updated failing tests
Diffstat (limited to 'features/support')
-rw-r--r--features/support/wait_for_ajax.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/features/support/wait_for_ajax.rb b/features/support/wait_for_ajax.rb
new file mode 100644
index 00000000000..b90fc112671
--- /dev/null
+++ b/features/support/wait_for_ajax.rb
@@ -0,0 +1,11 @@
+module WaitForAjax
+ def wait_for_ajax
+ Timeout.timeout(Capybara.default_max_wait_time) do
+ loop until finished_all_ajax_requests?
+ end
+ end
+
+ def finished_all_ajax_requests?
+ page.evaluate_script('jQuery.active').zero?
+ end
+end