23 lines
860 B
JavaScript
23 lines
860 B
JavaScript
/// <reference types="cypress" />
|
|
describe('InvoiceInCorrective', () => {
|
|
const saveDialog = '.q-card > .q-card__actions > .q-btn--standard ';
|
|
|
|
it('should create a correcting invoice', () => {
|
|
cy.viewport(1280, 720);
|
|
cy.login('developer');
|
|
cy.visit(`/#/invoice-in/1/summary`);
|
|
cy.intercept('POST', '/api/InvoiceIns/corrective').as('corrective');
|
|
|
|
cy.openActionsDescriptor();
|
|
|
|
cy.dataCy('createCorrectiveItem').click();
|
|
cy.get(saveDialog).click();
|
|
cy.wait('@corrective').then((interception) => {
|
|
const correctingId = interception.response.body;
|
|
cy.url().should('include', `/invoice-in/${correctingId}/summary`);
|
|
cy.visit(`/#/invoice-in/${correctingId}/corrective`);
|
|
});
|
|
cy.get('tbody > tr:visible').should('have.length', 1);
|
|
});
|
|
});
|