File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -727,12 +727,16 @@ expand the APIs to support "switching into" an iframe and then back out of them.
727
727
## <Icon name = " angle-right" /> How do I preserve cookies / localStorage in between my tests?
728
728
729
729
By default, Cypress automatically
730
- [ clears all cookies ** before** each test] ( /api/commands/clearcookies ) to prevent
731
- state from building up .
730
+ [ clears all cookies, local storage and session ** before** each test] ( /guides/core-concepts/test-isolation )
731
+ to prevent state from leaking between tests .
732
732
733
733
You can preserve session details across tests using the
734
734
[ ` cy.session() ` ] ( /api/commands/session ) command.
735
735
736
+ Alternatively, you can disable
737
+ [ ` testIsolation ` ] ( /guides/references/configuration#e2e ) at the suite or e2e
738
+ configuration-level to prevent the clearing of browser state.
739
+
736
740
## <Icon name = " angle-right" /> Some of my elements animate in; how do I work around that?
737
741
738
742
Oftentimes you can usually account for animation by asserting
Original file line number Diff line number Diff line change @@ -17,8 +17,9 @@ sidebar_position: 35
17
17
18
18
::: tip
19
19
20
- <Icon name =" check-circle " color =" green " ></Icon > ** Best Practice:** Tests should
21
- always be able to be run independently from one another ** and still pass** .
20
+   ; <Icon name =" check-circle " color =" green " ></Icon > ** Best Practice:** Tests
21
+ should always be able to be run independently from one another ** and still
22
+ pass** .
22
23
23
24
:::
24
25
@@ -48,7 +49,7 @@ consistently when ran. This behavior is described as `testIsolation`.
48
49
49
50
The test isolation is a global configuration and can be overridden for
50
51
end-to-end testing at the ` describe ` level with the
51
- [ ` testIsolation ` ] ( /guides/references/configuration#Global ) option.
52
+ [ ` testIsolation ` ] ( /guides/references/configuration#e2e ) option.
52
53
53
54
## Test Isolation in End-to-End Testing
54
55
You can’t perform that action at this time.
0 commit comments