Merge branch 'main' into 21461-excessive-scrollbars-fix
[arvados.git] / services / workbench2 / cypress / support / commands.js
index 8fe0b06aafebb6adb3aca33f94e701b3b515213c..da7300a43014cbefde2f3edd2842fb61d9aa8c87 100644 (file)
@@ -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 =>