MOBILE-3833 behat: Improve runtime debugging
Injecting the runtime instead of evaluating makes it possible to debug using dev toolsmain
parent
462e868582
commit
ecaaba732a
|
@ -504,8 +504,14 @@ class behat_app extends behat_base {
|
|||
throw new DriverException('Moodle app not found in browser');
|
||||
}, false, 60);
|
||||
|
||||
// Run the scripts to install Moodle 'pending' checks.
|
||||
$this->execute_script(file_get_contents(__DIR__ . '/app_behat_runtime.js'));
|
||||
// Inject Behat JavaScript runtime.
|
||||
global $CFG;
|
||||
|
||||
$this->execute_script("
|
||||
var script = document.createElement('script');
|
||||
script.src = '{$CFG->behat_wwwroot}/local/moodlemobileapp/tests/behat/app_behat_runtime.js';
|
||||
document.body.append(script);
|
||||
");
|
||||
|
||||
if ($restart) {
|
||||
// Assert initial page.
|
||||
|
|
Loading…
Reference in New Issue