feat: refs #8581 add Cypress tests for InvoiceInSummary and enhance data attributes for better accessibility
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
bfd0b23719
commit
a62d7b165f
|
@ -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>
|
||||
|
|
|
@ -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 }),
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue