Open antischematic opened 1 year ago
Worth noting that I had to simulate 6x CPU slowdown to get some of my tests to fail on my local machine. The problem only became apparent once I ran them on CI.
So getting this clear in my mind, once req.reply
is called, we should wait until the after:response
event is fired before allowing the test to complete?
I do not fully understand why this would fail the next test case. I would imagine between tests when things are mounted and unmounted, the beforeEach
function is run again and things are in a relatively fresh state.
Related to https://github.com/Sam152/cypress-replay/issues/12
It's the same problem as before. Tests are completing before the recorded stubs play out, even with delay override set to 0. This causes some requests to fall into the next test case, which there is no stub for. In some cases this causes tests to fail due to failed network requests that should have been stubbed.
We need to add a wait in replay mode that matches the recording behaviour.