TODO: Find solution for possible issue - A test that runs over two days could potentially fail.
Thought: A test that is dependent on time/date (e.g. a calendar test) and starts in Day X, but still runs in Day X+1, could potentially fail.
Example:
- Be in app calendar. Have default view = Day.
- Create appointment for Today (Monday) by using moment().startOf('day') or similar at real-time 11:59:55 PM.
- ... (Test is doing other stuff, takes 10s)
- Current real time is 12:00:05 AM. Clicking on 'Today' in Calendar as expectedly opens current Day, which by this point is Tuesday.
- e.g. expect(await I.grabNumberOfVisibleElements('.appointment')).equal.to.equal(1) fails, because Tuesday does not have any appointments.
=> Test passes when run at any other time, except when it runs just a few seconds before 12:00AM.