Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.1
-
Fix Version/s: 3.1
-
Component/s: Automated functional tests (behat), Enrolments
-
Testing Instructions:
-
Affected Branches:MOODLE_31_STABLE
-
Fixed Branches:MOODLE_31_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-54672-master-given-i-enrol -
Pull Master Diff URL:
Description
When a Behat test contains the step like
And I enrol "Studie One" user as "Student"
|
in non-javascript session, the step fails with error
"Field matching locator "'Assign roles'" not found."
|
This is a regression of MDL-53381 commit eb9ca848. In the previous version, there were chained steps that contained steps:
$steps[] = new Given('I set the field "' . get_string('assignroles', 'role') . '" to "' . $rolename . '"');
|
and
$steps[] = new Given('I set the field "' . get_string('assignrole', 'role') . '" to "' . $rolename . '"');
|
for javascript and non-javascript, respectively. Note the difference in the string identier "assignroles" (js) and "assignrole" (non-js).
Rajesh Taneja did not notice this tiny difference (no surprise) and replaced both chained steps with single API call using the "assignroles" identifier. Which causes the step to fail in non-js session.
This was not discovered so far because no core test uses this step in non-javascript session.
Attachments
Issue Links
- is a regression caused by
-
MDL-53381 Remove chained step usage in Moodle
-
- Closed
-