-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session / Cookies not cleared between tests #1023
Comments
Can you post your workflow? Otherwise it would probably need a full reproducible example in order to investigate. |
Thanks for your answer @MikeMcC399
It is worth mentioning I'm using https://github.com/badeball/cypress-cucumber-preprocessor ; however since test isolation is working perfectly fine with it locally I do not suspect it to be at cause. Login is performed through firebase authentification |
I don't see any problem with your workflow which could cause this issue. Which version of Cypress are you using? |
I am using the latest version ( 13.1.0 ). I could check that the session local storage was cleared correctly in both cases, but somehow, the indexed databases are only cleared when I run cypress locally, but not through github actions.
Now I'm left with another issue : restoring the session works locally but not on the github action ; my guess is that in the same way that the indexed dbs are not deleted between tests, they are not restored either on github. Any help with that last issue, or a cleaner way to deal with the first, are welcome ! |
The Cypress documentation does not cover the use of IndexedDB at all. It does however refer to the related @this-dot/cypress-indexeddb plugin in the Plugins > Custom Commands section. You might find that plugin useful. You may find users with related experience in the Cypress technical community on Discord who could help with your "how-to" questions: It does not look like your issue is caused by npm ci
npx cypress run --record |
Thanks for your answers @MikeMcC399 I will close this issue since it is now a duplicate of cypress-io/cypress#18350 , which mention the exact same need of having indexed dbs handled by cypress sessions and offer a workaround. Strangely I still confirm that the indexed dbs get cleared upon each test run locally on my machine and not on github, with both electron and chrome, and that they also get restored along with cy.session. That last point doesn't need further investigation on my side since I have to implement a workaround for github anyway. |
|
I use a custom login command, as follow :
When running locally, with cypress:run, everything is working perfectly fine and the tests start with a signed out user regardless of the previous ones. However when running it through github actions, the signed in session persists between my tests and thus create chaos all around. Is there any additional configuration necessary to ensure test isolation with this github action ?
The text was updated successfully, but these errors were encountered: