diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2015-12-07 22:41:18 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2015-12-07 22:41:18 -0200 |
commit | f7aafd8fc8e1dd3a414e3827c42087b364ebd5a0 (patch) | |
tree | 5b13c5d00dbc7590eec668b91b74fbc21b044f9f /spec/support | |
parent | 7d836a0c0ae2869a6b915234d347d15e25a511fe (diff) | |
parent | e02940e32941cc253f713ef3fe0aac896c9342ac (diff) | |
download | gitlab-ce-f7aafd8fc8e1dd3a414e3827c42087b364ebd5a0.tar.gz |
Merge branch 'master' into fix-merge-request-that-removes-submodulefix-merge-request-that-removes-submodule
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/wait_for_ajax.rb | 11 |
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 |