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

Course regex is wrong in i_open_my_profile_in_edit_mode custom step

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Run any behat test that utilises the "i_open_my_profile_in_edit_mode" custom step

      E.g. admin/tool/behat/tests/behat/manipulate_forms.feature

      Expectation - test passes.

       

      Note, that the existing tests were probably passing anyway - it was just that the code would potentially break if a behat test navigated to a course and then there was a i_open_my_profile_in_edit_mode step

      Show
      Run any behat test that utilises the "i_open_my_profile_in_edit_mode" custom step E.g. admin/tool/behat/tests/behat/manipulate_forms.feature Expectation - test passes.   Note, that the existing tests were probably passing anyway - it was just that the code would potentially break if a behat test navigated to a course and then there was a i_open_my_profile_in_edit_mode step
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-58761_bad_regex_in_custom_step

      Description

      The regex to extract the current course in the custom step i_open_my_profile_in_edit_mode is wrong. Sorry I didn't spot this when I did the development work on it.

      It is currently only going to work with single digit course ids:

      '/(?<=^course-|\scourse-)\d/'

      It should be changed to this to allow for multi digit course ids:

      '/(?<=^course-|\scourse-)(?:\d*)/'

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Sep/17