/// describe('InvoiceInIntrastat', () => { const firstRow = 'tbody > :nth-child(1)'; const thirdRow = 'tbody > :nth-child(3)'; const codes = `[data-cy="intrastat-code"]`; const firstRowAmount = `${firstRow} > :nth-child(3)`; beforeEach(() => { cy.login('administrative'); cy.visit(`/#/invoice-in/1/intrastat`); }); it('should edit the first line', () => { cy.selectOption(`${firstRow} ${codes}`, 'Plantas vivas: Esqueje/injerto, Vid'); cy.saveCard(); cy.get(codes).eq(0).contains('6021010: Plantas vivas: Esqueje/injerto, Vid'); }); it('should add a new row', () => { cy.addRow(); cy.fillRow(thirdRow, [ false, 'Plantas vivas: Esqueje/injerto, Vid', 30, 10, 5, 'FR', ]); cy.saveCard(); cy.checkNotification('Data saved'); }); it('should remove the first line', () => { cy.removeRow(1); }); });