This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/wait_for_ajax.rb | |
# There is inbuild `wait_for_ajax` method in selinium WebDriver library | |
# This is for Capybara Webkit only | |
# # | |
module WaitForAjax | |
def wait_for_ajax | |
Timeout.timeout(Capybara.default_max_wait_time) do | |
loop until finished_all_ajax_requests? | |
end | |
end |