gray-kilobyte-89541
04/22/2022, 5:06 PMgreat-london-82425
04/22/2022, 7:59 PMglamorous-architect-52545
04/22/2022, 8:32 PMglamorous-architect-52545
04/22/2022, 8:34 PMglamorous-architect-52545
04/22/2022, 8:34 PMcolossal-table-17032
04/26/2022, 11:01 PMambitious-australia-44913
04/27/2022, 9:07 PMacceptable-solstice-90676
04/27/2022, 9:55 PMacceptable-solstice-90676
04/27/2022, 10:00 PMstrong-fountain-30659
04/28/2022, 8:55 AMconst now = new Date(); // instead of this I would like to have something like `Cypress.currentTest.startedAt`
cy.registerUser(email, password);
cy.checkThatSomethingHappenedAfterRegisteringANewAccount(now);
gray-kilobyte-89541
04/28/2022, 10:44 AMstrong-fountain-30659
04/28/2022, 11:09 AMinterface AttemptResult {
// ...
startedAt: dateTimeISO
//...
}
My use case a little more explained:
After I register a new User - I want to check if an event has been published in the background
=> to do that I can call an API that accepts a "since" parameter, here I want to pass the timestamp when the test (so, my it
-block) was started so the request is as fast as possible so having Cypress.currentTest.startedAt would be great 😉gray-kilobyte-89541
04/28/2022, 11:41 AMbeforeEach
hook to take the timestamp of when the test is about to startstrong-fountain-30659
04/29/2022, 7:27 AMCypress.currentTest.startedAt
or where ever you think it is more appropriate). Would save 2-4 Lines of Code in the Spec-Files when writing Tests.gray-kilobyte-89541
04/29/2022, 10:35 AMfancy-lawyer-44060
04/29/2022, 9:06 PMacceptable-solstice-90676
04/30/2022, 4:52 PMdazzling-angle-28206
04/30/2022, 5:10 PMacceptable-solstice-90676
04/30/2022, 6:34 PMdazzling-angle-28206
04/30/2022, 8:07 PMproud-napkin-47266
05/01/2022, 12:33 AMbitter-fountain-36713
05/01/2022, 1:20 AMrough-forest-98201
05/01/2022, 5:04 AMproud-napkin-47266
05/01/2022, 6:04 PMwonderful-author-91008
05/01/2022, 9:02 PMbland-oil-91894
05/02/2022, 8:22 AMgray-kilobyte-89541
05/02/2022, 12:37 PMlemon-toothbrush-55306
05/02/2022, 12:58 PMflaky-fall-49668
05/03/2022, 1:18 PMcypress-image-snapshot
, however, i'm getting this error shown in the screenshot. I've also included the package.json screenshot too.magnificent-finland-58048
05/03/2022, 3:53 PM