fix: refs #8484 ensure document is fully loaded before visiting pages in tests
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
61a305ad80
commit
a4baa6812a
|
@ -59,6 +59,7 @@ Cypress.Commands.add('login', (user = 'developer') => {
|
||||||
|
|
||||||
Cypress.Commands.overwrite('visit', (originalFn, url, options) => {
|
Cypress.Commands.overwrite('visit', (originalFn, url, options) => {
|
||||||
originalFn(url, options);
|
originalFn(url, options);
|
||||||
|
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'));
|
||||||
cy.waitUntil(() => cy.get('main', { timeout: 10000 }).should('exist'));
|
cy.waitUntil(() => cy.get('main', { timeout: 10000 }).should('exist'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue