refactor: refs #8484 remove redundant visit command overwrite
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
02e94e6df5
commit
d2aad80536
|
@ -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');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue