Hi all,
Let's say I have two tests running one after the other, test #1 and test #2
#1 finishes. Sometimes there are still network requests going in/out of the application
#2's beforeEach begins, which (1) clears my DB and (2) seeds by DB
Sometimes these network requests still linger even after my DB is cleared in #2's beforeEach.
This causes my application to throw an authentication error, as the requests are trying to check if they are from an authenticated session, but the DB is cleared
---
Is there any way to prevent these requests from test #1 lingering into test #2's beforeEach?
I know that Cypress has done this by design (
https://docs.cypress.io/guides/references/best-practices#Dangling-state-is-your-friend)... but it seems harmful in this case.
I would expect the "dangling state" to go away in the subsequent test's beforeEach