[arvados] updated: 2.7.0-5831-gcee968c000

git repository hosting git at public.arvados.org
Mon Jan 15 21:45:51 UTC 2024


Summary of changes:
 services/workbench2/cypress/support/commands.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

       via  cee968c000e8e76e603ac012efdae0a6e5706932 (commit)
      from  3108805fdc1984c90e3d69670d5911758eb64a1f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit cee968c000e8e76e603ac012efdae0a6e5706932
Author: Stephen Smith <stephen at curii.com>
Date:   Mon Jan 15 16:44:12 2024 -0500

    21353: Move url location check into waitUntil
    
    It seems possible for window.location to be defined, then later undefined.
    Moving the url location check should solve the problem by waiting for redirects
    to be done.
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/services/workbench2/cypress/support/commands.js b/services/workbench2/cypress/support/commands.js
index e5a56e9de0..e4930ff2a0 100644
--- a/services/workbench2/cypress/support/commands.js
+++ b/services/workbench2/cypress/support/commands.js
@@ -353,9 +353,11 @@ Cypress.Commands.add("loginAs", user => {
     cy.clearCookies();
     cy.clearLocalStorage();
     cy.visit(`/token/?api_token=${user.token}`);
-    // Wait for window.location to not be undefined
-    cy.waitUntil(() => cy.window().then(win => win?.location?.href));
-    cy.url({ timeout: 15000 }).should("contain", "/projects/");
+    // Use waitUntil to avoid permafail race conditions with window.location being undefined
+    cy.waitUntil(() => cy.window().then(win =>
+        win?.location?.href &&
+        win.location.href.includes("/projects/")
+    ), { timeout: 15000 });
     cy.get("div#root").should("contain", "Arvados Workbench (zzzzz)");
     cy.get("div#root").should("not.contain", "Your account is inactive");
 });

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list