ci: refs #8581 update Cypress tests for InvoiceIn integration
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2025-03-13 10:10:40 +01:00
parent 79873aeb1a
commit 595f975b4f
3 changed files with 20 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
find 'test/cypress/integration' \
find 'test/cypress/integration/invoiceIn' \
-mindepth 1 \
-maxdepth 1 \
-type d | \
@ -8,7 +8,7 @@ xargs -P "$1" -I {} sh -c '
echo "🔷 {}" &&
xvfb-run -a cypress run \
--headless \
--spec "[test/cypress/integration/invoiceIn/*Descriptor.spec.js]" \
--spec "{}" \
--quiet \
> /dev/null
'

View File

@ -35,6 +35,23 @@ describe('InvoiceInBasicData', () => {
cy.fillInForm(mock, { attr: 'data-cy' });
cy.saveCard();
cy.validateForm(mock, { attr: 'data-cy' });
cy.request({
method: 'PATCH',
url: '/api/InvoiceIns/1/updateInvoiceIn',
headers: { Authorization: 'DEFAULT_TOKEN' },
body: {
supplierRef: '1234',
serial: 'R',
supplierFk: 1,
issued: new Date(Date.UTC(2001, 0, 1, 11)),
companyFk: 442,
docFk: 1,
bookEntried: new Date(Date.UTC(2001, 0, 1, 11)),
currencyFk: 1,
operated: null,
booked: null,
},
});
});
it('should edit, remove and create the dms data', () => {

View File

@ -38,7 +38,7 @@ describe('InvoiceInList', () => {
it('should create a new Invoice', () => {
cy.dataCy('vnTableCreateBtn').click();
cy.fillInForm(mock, { attr: 'data-cy' });
cy.fillInForm({ ...mock }, { attr: 'data-cy' });
cy.dataCy('FormModelPopup_save').click();
cy.intercept('GET', /\/api\/InvoiceIns\/\d+\/getTotals$/).as('invoice');
cy.wait('@invoice').then(() =>