8714-devToTest #1547

Merged
alexm merged 712 commits from 8714-devToTest into test 2025-03-04 14:08:01 +00:00
2 changed files with 12 additions and 3 deletions
Showing only changes of commit 98363c2197 - Show all commits

View File

@ -9,7 +9,7 @@ describe('InvoiceInList', () => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/invoice-in/list`);
cy.get('#searchbar input').should('be.visible').type('{enter}');
cy.get('#searchbar input').type('{enter}');
});
it('should redirect on clicking a invoice', () => {

View File

@ -54,9 +54,18 @@ Cypress.Commands.add('login', (user) => {
});
});
Cypress.Commands.add('domContentLoad', (element, timeout = 5000) => {
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'));
Cypress.Commands.add('domContentLoad', (timeout = 5000) => {
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'), {
timeout,
interval: 5000,
});
});
Cypress.Commands.overwrite('visit', (originalFn, url, options) => {
originalFn(url, options);
cy.domContentLoad();
});
Cypress.Commands.add('waitForElement', (element, timeout = 5000) => {
cy.get(element, { timeout }).should('be.visible').and('not.be.disabled');
});