/// describe('ClaimDevelopment', () => { const claimId = 1; const firstLineReason = 'tbody > :nth-child(1) > :nth-child(2)'; const thirdRow = 'tbody > :nth-child(3)'; beforeEach(() => { cy.viewport(1920, 1080); cy.login('developer'); cy.visit(`/#/claim/${claimId}/development`); }); it('should reset line', () => { cy.selectOption(firstLineReason, 'Novato'); cy.resetCard(); cy.getValue(firstLineReason).should('have.text', 'Prisas'); }); it('should edit line', () => { cy.selectOption(firstLineReason, 'Novato'); cy.saveCard(); cy.reload(); cy.getValue(firstLineReason).should('have.text', 'Novato'); //Restart data cy.selectOption(firstLineReason, 'Prisas'); cy.saveCard(); }); it('should add and remove new line', () => { //add row cy.addCard(); cy.get(thirdRow).should('exist'); const rowData = [false, 'Novato', 'Roces', 'Compradores', 'employeeNick', 'Tour']; cy.fillRow(thirdRow, rowData); cy.saveCard(); 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'); }); // it('should remove third and fourth file', () => { // cy.get( // '.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon' // ).click(); // cy.get('.q-btn--unelevated > .q-btn__content > .block').click(); // cy.get('.q-notification__message').should('have.text', 'Data deleted'); // cy.get( // '.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon' // ).click(); // cy.get('.q-btn--unelevated > .q-btn__content > .block').click(); // cy.get('.q-notification__message').should('have.text', 'Data deleted'); // }); });