From a4baa6812ab6d2b1067e72a70a777cf08ad12c0b Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 18 Feb 2025 12:33:34 +0100 Subject: [PATCH] fix: refs #8484 ensure document is fully loaded before visiting pages in tests --- test/cypress/support/commands.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 71956f945..3b782d8ba 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -59,6 +59,7 @@ Cypress.Commands.add('login', (user = 'developer') => { Cypress.Commands.overwrite('visit', (originalFn, url, options) => { originalFn(url, options); + cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete')); cy.waitUntil(() => cy.get('main', { timeout: 10000 }).should('exist')); });