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:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-08 03:41:18 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-08 03:41:18 +0300
commitf7aafd8fc8e1dd3a414e3827c42087b364ebd5a0 (patch)
tree5b13c5d00dbc7590eec668b91b74fbc21b044f9f /spec/support
parent7d836a0c0ae2869a6b915234d347d15e25a511fe (diff)
parente02940e32941cc253f713ef3fe0aac896c9342ac (diff)
Merge branch 'master' into fix-merge-request-that-removes-submodule
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/wait_for_ajax.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/wait_for_ajax.rb b/spec/support/wait_for_ajax.rb
new file mode 100644
index 00000000000..692d219e9f1
--- /dev/null
+++ b/spec/support/wait_for_ajax.rb
@@ -0,0 +1,11 @@
+module WaitForAjax
+ def wait_for_ajax
+ Timeout.timeout(Capybara.default_wait_time) do
+ loop until finished_all_ajax_requests?
+ end
+ end
+
+ def finished_all_ajax_requests?
+ page.evaluate_script('jQuery.active').zero?
+ end
+end