Stabilise Cypress login tests (#9446)

* Attempt to stabilise login tests

* More stability

* Stabilise s'more

* don't clear LS as we rely on it for enablements

* Add small delay

* Iterate

* Update login.ts
This commit is contained in:
Michael Telatynski
2022-10-18 17:07:23 +01:00
committed by GitHub
parent b04991a962
commit 2cf8a9a2f7
14 changed files with 60 additions and 58 deletions

View File

@@ -91,7 +91,7 @@ Cypress.Commands.add("loginUser", (synapse: SynapseInstance, username: string, p
Cypress.Commands.add("initTestUser", (synapse: SynapseInstance, displayName: string, prelaunchFn?: () => void): Chainable<UserCredentials> => {
// XXX: work around Cypress not clearing IDB between tests
cy.window({ log: false }).then(win => {
win.indexedDB.databases().then(databases => {
win.indexedDB.databases()?.then(databases => {
databases.forEach(database => {
win.indexedDB.deleteDatabase(database.name);
});