From 8a70e3a1cf2be64fc65219bb636be6ace989a3b8 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 16 Aug 2017 12:57:42 +0800 Subject: [PATCH 1/1] MDL-59784 NOCOMMIT --- lib/behat/behat_base.php | 2 +- lib/external/externallib.php | 1 + lib/javascript-static.js | 4 ++++ lib/tests/behat/mdl59784.feature | 7 +++++++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 lib/tests/behat/mdl59784.feature diff --git a/lib/behat/behat_base.php b/lib/behat/behat_base.php index d01213b4fe..cb3ad20329 100644 --- a/lib/behat/behat_base.php +++ b/lib/behat/behat_base.php @@ -69,7 +69,7 @@ class behat_base extends Behat\MinkExtension\Context\RawMinkContext { /** * And extended timeout for specific cases. */ - const EXTENDED_TIMEOUT = 10; + const EXTENDED_TIMEOUT = 90; /** * The JS code to check that the page is ready. diff --git a/lib/external/externallib.php b/lib/external/externallib.php index ba8aa4046a..b502959b63 100644 --- a/lib/external/externallib.php +++ b/lib/external/externallib.php @@ -109,6 +109,7 @@ class core_external extends external_api { * @since Moodle 2.4 */ public static function get_string($stringid, $component = 'moodle', $lang = null, $stringparams = array()) { + sleep(2); $params = self::validate_parameters(self::get_string_parameters(), array('stringid'=>$stringid, 'component' => $component, 'lang' => $lang, 'stringparams' => $stringparams)); diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 4320ae23c9..78e810c9d1 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -683,6 +683,10 @@ M.util.init_block_hider = function(Y, config) { M.util.pending_js = []; M.util.complete_js = []; +setInterval(function() { + console.log(M.util.pending_js); +}, 10); + /** * Register any long running javascript code with a unique identifier. * Should be followed with a call to js_complete with a matching diff --git a/lib/tests/behat/mdl59784.feature b/lib/tests/behat/mdl59784.feature new file mode 100644 index 0000000000..e78b8b8c2e --- /dev/null +++ b/lib/tests/behat/mdl59784.feature @@ -0,0 +1,7 @@ +@mdl59784 @javascript +Feature: Add and configure blocks throughout the site + Scenario: You can add a block + Given I log in as "admin" + And I am on homepage + And I press "Customise this page" + And I add the "HTML" block -- 2.11.0 (Apple Git-81)