I have a couple of Cypress tests for a given application and I've observed that the Cypress environment freezes sometimes for a couple of seconds and then continues working. By freezing I mean that the timer on the top-left stops working and I can't stop the tests until it unfreezes. This happens in both headed and headless mode (in the latter I've seen it in the video).
This freezing does not occur when working directly with the app, i.e. doing by hand what the test does. The test seems to freeze always on the same spots.
I have the feeling that something is blocking the event loop. I have a custom command that under certain circumstances calls cy.sleep(100) and then calls itself recursively... but it doesn't make too much sense to me that cy.sleep can cause this behaviour.
Overall the tests work fine, but these extra delays here and there sum up to an annoyingly long testing time.
Any idea would be appreciated.