Skip to content

Commit 353bbca

Browse files
grnd-altAndyScherzinger
authored andcommitted
fix(cypress): set cypress clock before badge is rendered
Signed-off-by: grnd-alt <git@belakkaf.net>
1 parent 72b639b commit 353bbca

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

cypress/e2e/cardFeatures.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,16 +272,14 @@ describe('Card', function () {
272272

273273
cy.get('#app-sidebar-vue [data-cy-due-date-actions]').should('be.visible').click()
274274

275+
const now = new Date().setHours(11, 0, 0, 0)
276+
cy.clock(now)
275277
// Set a due date through shortcut
276278
cy.get('[data-cy-due-date-shortcut="tomorrow"] button').should('be.visible').click()
277279

278280
const tomorrow = moment().add(1, 'days').hour(8).minutes(0).seconds(0)
279281
cy.get('#card-duedate-picker').should('have.value', tomorrow.format('YYYY-MM-DDTHH:mm'))
280282

281-
const now = moment().hour(11).minutes(0).seconds(0).toDate()
282-
cy.clock(now)
283-
cy.log(now)
284-
cy.tick(60_000)
285283

286284
cy.get(`.card:contains("${newCardTitle}")`).find('[data-due-state="Now"]').should('be.visible').should('contain', '21 hours')
287285

0 commit comments

Comments
 (0)