diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-18 18:55:11 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-18 18:55:11 +0300 |
commit | 82033e2edc43b34823625f886f229e5ae944d4d6 (patch) | |
tree | 9424eac6efc01c8f348e87c761246a00f4dc67c2 /features/support | |
parent | 146e0cbc4dfb857e0eb44777c40da5df56f376e0 (diff) | |
download | gitlab-ce-82033e2edc43b34823625f886f229e5ae944d4d6.tar.gz |
Wait for ajax for every merge request spinach testdz-spinach-wait-ajax
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features/support')
-rw-r--r-- | features/support/env.rb | 2 | ||||
-rw-r--r-- | features/support/wait_for_ajax.rb | 11 |
2 files changed, 1 insertions, 12 deletions
diff --git a/features/support/env.rb b/features/support/env.rb index 569fd444e86..8dbe3624410 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -15,7 +15,7 @@ if ENV['CI'] Knapsack::Adapters::SpinachAdapter.bind end -%w(select2_helper test_env repo_helpers).each do |f| +%w(select2_helper test_env repo_helpers wait_for_ajax).each do |f| require Rails.root.join('spec', 'support', f) end diff --git a/features/support/wait_for_ajax.rb b/features/support/wait_for_ajax.rb deleted file mode 100644 index b90fc112671..00000000000 --- a/features/support/wait_for_ajax.rb +++ /dev/null @@ -1,11 +0,0 @@ -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 |