#8581 invoiceIn e2e #1452

Merged
jorgep merged 153 commits from 8581-invoiceinE2e into dev 2025-03-20 08:58:01 +00:00
2 changed files with 29 additions and 1 deletions
Showing only changes of commit a62d7b165f - Show all commits
src/pages/InvoiceIn/Card
test/cypress/integration/invoiceIn

View File

@ -198,6 +198,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
color="orange-11"
text-color="black"
@click="book(entityId)"
data-cy="invoiceInSummary_book"
/>
</template>
</InvoiceIntoBook>
@ -219,7 +220,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
:value="entity.supplier?.name"
>
<template #value>
<span class="link">
<span class="link" data-cy="invoiceInSummary_supplier">
{{ entity.supplier?.name }}
<SupplierDescriptorProxy :id="entity.supplierFk" />
</span>

View File

@ -0,0 +1,27 @@
describe('InvoiceInSummary', () => {
beforeEach(() => {
cy.login('administrative');
cy.visit('/#/invoice-in/4/summary');
});
it('should booking and unbooking the invoice properly', () => {
const checkbox = '[data-cy="vnLvIs booked"] > .q-checkbox';
cy.dataCy('invoiceInSummary_book').click();
cy.dataCy('VnConfirm_confirm').click();
cy.validateCheckbox(checkbox);
});
it('should open the supplier descriptor popup', () => {
cy.intercept('GET', /InvoiceIns\/4.*/).as('getInvoice');
cy.intercept('GET', /Suppliers\/\d+/).as('getSupplier');
cy.wait('@getInvoice');
cy.dataCy('invoiceInSummary_supplier').then(($el) => {
const description = $el.text().trim();
$el.click();
cy.wait('@getSupplier').then(() =>
cy.validateDescriptor({ description, popup: true }),
);
});
});
});