Isolation doesn't actually "work" #25347
joshribakoff-sm
started this conversation in
General
Replies: 1 comment
-
Looks like there may be a minimum Cypress version in order to receive "test isolation", but it does not appear to be documented. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Even with isolation enabled, some side effects like replacing/updating the URL still occur in the subsequent test if I don't wait for all side effects in the current test. I see in the docs it supposedly visits
about:blank
, which to my knowledge should cancel any pending side effects however when I run my test(s) with and without focusing the subsequent test, I can see when I run both tests there are extra 'steps' showing a URL update at the top of my "before each" hook which corresponds to values used in my previous test. When I focus only the subsequent test, there are no longer any extra steps in my "before each". I haveisolation
enabled, so in theory this is a bug.I even tried adding
cy.wait(1000);
to the top of mybeforeEach()
, but when I run the tests I still see "steps" that say "URL updated" being "injected" before the wait command, so my tests continue to flake. The only fix seems to be to update the previous test to wait on all possible side effects, which seems to defeat some of the reason the declarativeisolation
setting exists if you have to imperatively isolate things.Cypress 9.7.0
Beta Was this translation helpful? Give feedback.
All reactions