in my cypress tests, I am looking to set the clock to a specific time to have a consistent time frame for every test.
When I call:
cy.visit('/path/to/page');
cy.get('#elementId').click();
All is fine.
However, when I do:
cy.clock(Date.now());
cy.visit('/path/to/page');
cy.get('#elementId').click();
I get the following error:
This element `<button with Id i want to click>` is not visible because its parent `<body>` has CSS property: `display: none`
This also happens when I pass no arguments to cy.clock().
Why is cy.clock() setting the body of this page to invisible? And how do I avoid this?