From d2aad80536889c566047a747c8af31e114f233e4 Mon Sep 17 00:00:00 2001 From: jorgep <jorgep@verdnatura.es> Date: Mon, 17 Feb 2025 15:42:37 +0100 Subject: [PATCH] refactor: refs #8484 remove redundant visit command overwrite --- test/cypress/support/commands.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index d5e50639c..26250b458 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -57,13 +57,9 @@ Cypress.Commands.add('login', (user = 'developer') => { }); }); -Cypress.Commands.add('domContentLoad', (element, timeout = 5000) => { - cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete')); -}); - Cypress.Commands.overwrite('visit', (originalFn, url, options) => { originalFn(url, options); - cy.domContentLoad(); + cy.waitUntil(() => cy.get('main', { timeout: 10000 }).should('exist')); }); Cypress.Commands.add('waitForElement', (element, timeout = 5000) => { @@ -396,8 +392,3 @@ Cypress.Commands.add('clickButtonWithIcon', (iconClass) => { Cypress.Commands.add('clickButtonWithText', (buttonText) => { cy.get('.q-btn').contains(buttonText).click(); }); - -Cypress.Commands.overwrite('visit', (originalFn, url, options) => { - originalFn(url, options); - cy.get('main', { timeout: 10000 }).should('exist'); -});