Skip to content

Commit 01352cb

Browse files
committed
Restore action
1 parent 710730c commit 01352cb

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

cypress/e2e/trafficlight/actions/browser.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,14 @@ export function advanceClock(data: any): string {
3333

3434
export function clearIDBStorage(): string {
3535
cy.window().then((window) => {
36-
return window.indexedDB.databases().then(async databases => {
37-
const promises: Promise<void>[] = [];
36+
return window.indexedDB.databases().then(databases => {
3837
const databaseNames: string[] = databases
3938
.map((db) => db.name)
4039
.filter((name) => name !== undefined) as string[];
4140
for (const name of databaseNames) {
4241
cy.log("Deleting indexedDb database", name);
43-
const request = window.indexedDB.deleteDatabase(name);
44-
const promise: Promise<void> = new Promise((resolve) => {
45-
request.onsuccess = () => { resolve(); };
46-
});
47-
promises.push(promise);
42+
window.indexedDB.deleteDatabase(name);
4843
}
49-
// await Promise.all(promises);
5044
});
5145
});
5246
cy.wait(5000);

0 commit comments

Comments
 (0)