Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eddec36
)
MDL-52899 behat: make PAGE_READY_JS more robust
author
Tim Hunt
<T.J.Hunt@open.ac.uk>
Tue, 26 Jan 2016 11:23:26 +0000
(11:23 +0000)
committer
Tim Hunt
<T.J.Hunt@open.ac.uk>
Tue, 26 Jan 2016 11:23:26 +0000
(11:23 +0000)
lib/behat/behat_base.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/behat/behat_base.php
b/lib/behat/behat_base.php
index
c2dac9a
..
efe954b
100644
(file)
--- a/
lib/behat/behat_base.php
+++ b/
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.