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

"actions menu" step overrides in boost cause fatal errors.

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Put the attached file broken.feature in /lib/tests/behat
      2. Run behat init
      3. Run broken.feature
        Before fix: The first test crashes with a fatal error. The second test is not run.
        After fix: The first test fails. The second test then runs.
      Show
      Put the attached file broken.feature in /lib/tests/behat Run behat init Run broken.feature Before fix: The first test crashes with a fatal error. The second test is not run. After fix: The first test fails. The second test then runs.
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull Master Branch:
      MDL-58826_master

      Description

      Steps to reproduce:

      1. Put the attached file broken.feature in /lib/tests/behat
      2. Run behat init
      3. Run broken.feature
        Expected: The first test fails as it's trying to use an action menu that isn't present on the page. The second test then runs.
        Actual: The first test crashes with a fatal error. The second test is not run.

      The problem is that the step gets the menu node using Element->find() not behat_base->find(), so the step isn't throwing an exception when the menu node isn't found. The fix checks $menunode before trying to call method on it and throws an exception.

        Attachments

          Activity

            People

            Assignee:
            marxjohnson Mark Johnson
            Reporter:
            marxjohnson Mark Johnson
            Peer reviewer:
            Ankit Agarwal
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            David Monllaó
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Bas Brands
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              10/Jul/17