beforeEach is not triggered sometime (migration to cypress 6.0.0) #9364
Unanswered
sgomezcnvdev
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone, I'm migrating Cypress version from 4.12.1 to 6.0.0 so I replaced the stubbing request (cy.route) by cy.intercept(). I noticed that after migration sometimes beforeEach() is not triggered. Below is an screenshot where you can see that beforeEach() was triggered for the first test but it wasn't for the second.
I noticed that it's happeing when there are some pending requests in the previous test. You can see that request 1 and 2 were triggered by frontend code and intercepted by Cypess. But automated test finished before Cypress intercepts request3.
It doesn't happend in the version 4.12.1 of Cypress.
Is it a expected behavior? Why isn't BeforeEach hook triggered for the next automated test?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions