Return early from `finished_all_ajax_requests?` when jQuery is undefined

This commit is contained in:
Robert Speicher 2017-04-19 18:55:02 -04:00
parent 5647d5deaf
commit 6b298d06b4
1 changed files with 1 additions and 0 deletions

View File

@ -7,6 +7,7 @@ module WaitForAjax
def finished_all_ajax_requests?
return true unless javascript_test?
return true if page.evaluate_script('typeof jQuery === "undefined"')
page.evaluate_script('jQuery.active').zero?
end