Skip to content

Commit

Permalink
Clear IndexedDB
Browse files Browse the repository at this point in the history
  • Loading branch information
Revadike authored Jul 24, 2023
1 parent 2e092ad commit 46e21fa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/driver/src/cy/commands/sessions/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ export default class SessionsManager {
window.localStorage.clear()
window.sessionStorage.clear()

// not on firefox https://bugzilla.mozilla.org/show_bug.cgi?id=934640
if (window.indexedDB.databases) {
const dbs = await window.indexedDB.databases();
dbs.forEach(db => { window.indexedDB.deleteDatabase(db.name) });
}

await Promise.all([
clearStorage(this.Cypress),
this.sessions.clearCookies(),
Expand Down

0 comments on commit 46e21fa

Please sign in to comment.