From ffb17154c3ae92ef9dc6898ed433586d5168e7bc Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 16 Aug 2017 12:57:42 +0800 Subject: [PATCH 1/1] MDL-59859 NOCOMMIT --- lib/behat/behat_base.php | 2 +- lib/external/externallib.php | 1 + lib/tests/behat/mdl59859.feature | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 lib/tests/behat/mdl59859.feature diff --git a/lib/behat/behat_base.php b/lib/behat/behat_base.php index e7c631fada..975b97c383 100644 --- a/lib/behat/behat_base.php +++ b/lib/behat/behat_base.php @@ -70,7 +70,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 6721d2af14..c305190451 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/tests/behat/mdl59859.feature b/lib/tests/behat/mdl59859.feature new file mode 100644 index 0000000000..d402a2352d --- /dev/null +++ b/lib/tests/behat/mdl59859.feature @@ -0,0 +1,12 @@ +@mdl59859 @javascript +Feature: Test MDL-59859 + Scenario: Test MDL-59859 + Given the following "users" exist: + | username | firstname | lastname | email | + | teacher1 | Teacher | 1 | teacher1@example.com | + And the following "courses" exist: + | fullname | shortname | category | + | Course 1 | C1 | 0 | + And I log in as "admin" + And I am on "Course 1" course homepage + And I enrol "Teacher 1" user as "Teacher" -- 2.11.0 (Apple Git-81)