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

Random behat fails in mod/quiz/tests/behat/manually_mark_question.feature:62

    XMLWordPrintable

    Details

      Description

      MDL-41090 introduced a new functionality which allows for embedding of files in response contents.
      Unfortunately the test for this causes random behat failures.

      The offending line is:

      And I should see "It's the logo" in the "3" "table_row"
      

      This fails because behat does not perform strict lookups, so when searching for the "3" "table_row", it returns any table row which contains the number three.

      If, for example, you run the test at 03:00, or 13:00, then any row with the current time in it will match.

      The check above only checks the first result. In this case it's the "Started on Friday, 19 January 2018, 5:13AM" row, hence the failure.

      Whilst I would love to change this to be a strict match, that's easier said than done and would break a great many tests.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Jun Pataleta
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/May/18