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'); -});