/// describe('ClaimDevelopment', () => { const claimId = 1; const firstLineReason = 'tbody > :nth-child(1) > :nth-child(2)'; const thirdRow = 'tbody > :nth-child(3)'; const lastReason = 'Incompetencia'; const newReason = 'Calor'; beforeEach(() => { cy.viewport(1920, 1080); cy.login('developer'); cy.visit(`/#/claim/${claimId}/development`); cy.intercept('GET', /\/api\/Workers\/search/).as('workers'); cy.intercept('GET', /\/api\/Workers\/search/).as('workers'); cy.waitForElement('tbody'); }); it('should reset line', () => { cy.selectOption(firstLineReason, newReason); cy.resetCard(); cy.getValue(firstLineReason).should('equal', lastReason); }); it('should edit line', () => { cy.selectOption(firstLineReason, newReason); cy.saveCard(); cy.login('developer'); cy.visit(`/#/claim/${claimId}/development`); cy.getValue(firstLineReason).should('equal', newReason); //Restart data cy.selectOption(firstLineReason, lastReason); cy.saveCard(); }); // TODO: #8112 xit('should add and remove new line', () => { cy.wait(['@workers', '@workers']); cy.addCard(); cy.waitForElement(thirdRow); const rowData = [ false, newReason, 'Roces', 'Compradores', 'administrativeNick', 'Tour', ]; cy.fillRow(thirdRow, rowData); cy.saveCard(); cy.login('developer'); cy.visit(`/#/claim/${claimId}/development`); cy.validateRow(thirdRow, rowData); cy.reload(); cy.validateRow(thirdRow, rowData); //remove row cy.fillRow(thirdRow, [true]); cy.removeCard(); cy.clickConfirm(); cy.get(thirdRow).should('not.exist'); cy.reload(); cy.get(thirdRow).should('not.exist'); }); });