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

Dynamic future date support into behat

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9
    • Fix Version/s: None
    • Labels:
      None
    • Affected Branches:
      MOODLE_39_STABLE

      Description

      This is the second part of MDL-67599 where, on January 1st 2020 some of the expected future dates harcoded in behat scenarios became past (see the fix there to understand the problem).

      Obviously, those tests will fail in 10 years from now. Again (January 1st 2030).

      This issue is about to design a way allowing future-date scenarios to (just examples, you get the idea):

      • Support dynamic / relative dates into date / time elements: sort of "date field is "+2y"
      • Support dynamic / relative assertions too: sort of "I can see +2y"

      (surely with support for days/months/years and, maybe hours minutes).

      In any case the point is to make all those tests immune to time, working till the end of the times.

      Ciao

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: