Skip to content
Permalink
Browse files

MDL-52899 behat: make PAGE_READY_JS more robust

  • Loading branch information...
timhunt committed Jan 26, 2016
1 parent eddec36 commit 41f4dabe2b2fb5755688720e0dae77167424c11c
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/behat/behat_base.php
@@ -74,7 +74,7 @@ class behat_base extends Behat\MinkExtension\Context\RawMinkContext {
/**
* The JS code to check that the page is ready.
*/
const PAGE_READY_JS = '(M && M.util && M.util.pending_js && !Boolean(M.util.pending_js.length)) && (document.readyState === "complete")';
const PAGE_READY_JS = '(typeof M !== "undefined" && M.util && M.util.pending_js && !Boolean(M.util.pending_js.length)) && (document.readyState === "complete")';
/**
* Locates url, based on provided path.

0 comments on commit 41f4dab

Please sign in to comment.
You can’t perform that action at this time.