Skip to content

Commit

Permalink
[ci] Reduce Capybara max wait time on Ajax handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyukri committed Mar 23, 2016
1 parent 7591730 commit 35b214b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/t/spec/wait_for_ajax.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#https://robots.thoughtbot.com/automatically-wait-for-ajax-with-capybara
module WaitForAjax
def wait_for_ajax
Timeout.timeout(Capybara.default_max_wait_time = 40) do
Timeout.timeout(Capybara.default_max_wait_time = 30) do
loop until finished_all_ajax_requests?
end
end

def finished_all_ajax_requests?
page.evaluate_script('jQuery.active').zero?
end
end
end

0 comments on commit 35b214b

Please sign in to comment.