fix: refs #8581 enhance filtering logic in InvoiceInList tests and add waitTableLoad command
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2025-03-06 17:31:51 +01:00
parent 65a7ca1848
commit e49ab4dfa4
2 changed files with 12 additions and 11 deletions

View File

@ -161,21 +161,20 @@ describe('InvoiceInList', () => {
});
it('should filter by correctingFk param', () => {
let correctiveCount;
let noCorrectiveCount;
cy.dataCy('vnCheckboxRectificative').click();
cy.get('[data-cy="vnTable"] .q-virtual-scroll__content')
.children()
.its('length')
.then((len) => (correctiveCount = len));
cy.dataCy('vnCheckboxRectificative').click();
cy.get('[data-cy="vnTable"] .q-virtual-scroll__content')
.children()
.its('length')
.then((len) => (noCorrectiveCount = len));
expect(correctiveCount).to.not.equal(noCorrectiveCount);
.then((firstCount) => {
cy.dataCy('vnCheckboxRectificative').click();
cy.waitTableLoad();
cy.get('[data-cy="vnTable"] .q-virtual-scroll__content')
.children()
.its('length')
.then((secondCount) => {
expect(firstCount).to.not.equal(secondCount);
});
});
});
});
});

View File

@ -593,3 +593,5 @@ Cypress.Commands.add('checkQueryParams', (expectedParams = {}) => {
}
});
});
Cypress.Commands.add('waitTableLoad', () => cy.waitForElement('[data-q-vs-anchor]'));