Session and Test Isolation Problem #25415
-
I have a problem with test isolation. I enabled test isolation and I want to use session for my login process:
This is my session, if there's anything wrong please let me know. Then I run my tests and there's no problem when it's creating the session but if its restoring the session,default blank page appears. How can i fix it? 2- I have one more question. I override some of my tests with {testIsolation: false}, and can't i use session for that part too in before section? If I can, please enlighten me.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The page is blank due to test isolation. The page is navigated to
|
Beta Was this translation helpful? Give feedback.
The page is blank due to test isolation. The page is navigated to
about:blank
before each test so when your session is restored, your validation logic will always fail when verifying the route withcy.hash().should('eq', '/dashboard')
. I suggested moving this check into the setup and using the validate func to verify the client is still authenticated with the backend.