We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 14795cb + 91464e7 commit 46cf944Copy full SHA for 46cf944
1 file changed
lib/commands/state.ts
@@ -20,5 +20,10 @@ export function restoreState(snapshot: string = 'init') {
20
runCommand(`rm -vfr ./data/*`)
21
runCommand(`tar -xf '/var/www/html/data-${snapshot}.tar'`)
22
23
+ // Any user sessions created between saveState() and restoreState()
24
+ // are not present in the database, but exist in the web server.
25
+ // Using them leads to unknown behavior, so we clear them all to prevent session errors.
26
+ Cypress.session.clearAllSavedSessions()
27
+
28
cy.log(`Restored snapshot ${snapshot}`)
29
}
0 commit comments