X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/54377a7bacc182ace0bb8b55a812e0a9fee5ced8..e1953022010bc0679a2d79baf5c040b8312c5d8b:/services/workbench2/cypress/support/commands.js diff --git a/services/workbench2/cypress/support/commands.js b/services/workbench2/cypress/support/commands.js index 8fe0b06aaf..da7300a430 100644 --- a/services/workbench2/cypress/support/commands.js +++ b/services/workbench2/cypress/support/commands.js @@ -350,8 +350,11 @@ Cypress.Commands.add("updateResource", (token, suffix, uuid, data) => { }); Cypress.Commands.add("loginAs", user => { + // This shouldn't be necessary unless we need to call loginAs multiple times + // in the same test. cy.clearCookies(); - cy.clearLocalStorage(); + cy.clearAllLocalStorage(); + cy.clearAllSessionStorage(); cy.visit(`/token/?api_token=${user.token}`); // Use waitUntil to avoid permafail race conditions with window.location being undefined cy.waitUntil(() => cy.window().then(win =>