transferred Code Ocean from original repository to GitHub
This commit is contained in:
11
spec/support/wait_for_ajax.rb
Normal file
11
spec/support/wait_for_ajax.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
module WaitForAjax
|
||||
def wait_for_ajax
|
||||
Timeout.timeout(Capybara.default_wait_time) do
|
||||
loop until ajax_requests_finished?
|
||||
end
|
||||
end
|
||||
|
||||
def ajax_requests_finished?
|
||||
page.evaluate_script('jQuery.active').zero?
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user