Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-54672

Behat: Given I enrol - stopped working in 3.1


      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 . '"');


      $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).

      rajeshtaneja 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.

            mudrd8mz David Mudrák (@mudrd8mz)
            mudrd8mz David Mudrák (@mudrd8mz)
            Rajesh Taneja Rajesh Taneja
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            0 Vote for this issue
            3 Start watching this issue


                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.