refactor: refs #8484 remove redundant visit command overwrite
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2025-02-17 15:42:37 +01:00
parent 02e94e6df5
commit d2aad80536
1 changed files with 1 additions and 10 deletions

View File

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