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

              dobedobedoh Andrew Lyons
              dobedobedoh Andrew Lyons
              Jun Pataleta Jun Pataleta
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                17/May/18