summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-03-30 10:22:24 +0100
committerPhil Hughes <me@iamphill.com>2017-03-30 10:22:24 +0100
commitaf86ae8fd7950ddac71b225c6d8f9ab0517126ab (patch)
tree5be2ef7b635ab21d0e7ea15eccb10b31bd67edc7
parent68aa43fdbde279b2d990e4108da03c4e6bd8034d (diff)
downloadgitlab-ce-test-at-fixing-random-failure.tar.gz
Check for jQuery before checking active propertytest-at-fixing-random-failure
An attempt at fixing a random failure because of jQuery
-rw-r--r--spec/support/wait_for_ajax.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/wait_for_ajax.rb b/spec/support/wait_for_ajax.rb
index 0f9dc2dee75..d7fd8595ea8 100644
--- a/spec/support/wait_for_ajax.rb
+++ b/spec/support/wait_for_ajax.rb
@@ -6,7 +6,7 @@ module WaitForAjax
end
def finished_all_ajax_requests?
- page.evaluate_script('jQuery.active').zero?
+ page.evaluate_script('typeof jQuery !== "undefined" && jQuery.active').zero?
end
def javascript_test?