Open bahmutov opened 4 years ago
It looks like the spec is also affected by incorrect cy.tick
https://github.com/bahmutov/cypress-react-unit-test/blob/bb3228172dedd425b292ce7ccf5b2d5817d8e297/cypress/component/advanced/framer-motion/Motion.spec.tsx#L13
this is still an issue, and is not just that it doesn't advance, cy.clock()
+ cy.tick()
don't work at all in react component testing.
is anyone looking at this issue?
bump. on this issue. Im also seeing this right now.
I'm also noticing that something isn't working quite right for cy.clock() and component tests... For some reason not rendering my component properly. When I remove the cy.clock() it seems to work fine.
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
We also had issues with cy.clock()
and Cypress 16.8.1 in a large React app.
I've explained in https://github.com/cypress-io/cypress/issues/27744 how we overcame this.
It would be interesting to see if you experience the same behaviour: will the UI assertions work if you restore the clock, before making the actual assertion?
Seems to only advance it by 1 second ...
in https://github.com/bahmutov/sudoku-qafest/blob/main/src/components/Timer.spec.js#L57