salix-front/test/cypress/integration/invoiceIn/invoiceInSummary.spec.js

25 lines
853 B
JavaScript
Raw Permalink Normal View History

describe('InvoiceInSummary', () => {
beforeEach(() => {
cy.login('administrative');
cy.visit('/#/invoice-in/3/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', /Suppliers\/\d+/).as('getSupplier');
cy.dataCy('invoiceInSummary_supplier').then(($el) => {
const description = $el.text().trim();
$el.click();
cy.wait('@getSupplier').then(() =>
cy.validateDescriptor({ description, popup: true }),
);
});
});
});