/// describe('ClaimDevelopment', () => { const claimId = 1; beforeEach(() => { cy.viewport(1920, 1080); cy.login('developer'); cy.visit(`/#/claim/${claimId}/development`); }); it('should reset line', () => { cy.get('tbody > :nth-child(1) > :nth-child(2)').click(); cy.selectOption('Novato'); cy.get('[title="Reset"]').click(); cy.get( ':nth-child(1) > :nth-child(2) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > span' ).should('have.text', 'Prisas'); }); it('should edit line', () => { cy.get('tbody > :nth-child(1) > :nth-child(2)').click(); cy.selectOption('Novato'); cy.get('[title="Save"]').click(); cy.visit(`/#/claim/${claimId}/development`); cy.get( ':nth-child(1) > :nth-child(2) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > span' ).should('have.text', 'Novato'); //Restart data cy.get('tbody > :nth-child(1) > :nth-child(2)'); cy.selectOption('Prisas'); cy.get('[title="Save"]').click(); }); it('should add new line', () => { //check third if row exist cy.get('.q-page-sticky > div > .q-btn').click(); cy.get('tbody > :nth-child(3)').should('exist'); //fill in data const rowData = ['', '', '']; cy.fillTableRow(3, rowData); }); // it('should remove last line', () => { // cy.get( // ':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image' // ).click(); // cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should( // 'be.visible' // ); // cy.get('.q-carousel__control > .q-btn > .q-btn__content > .q-icon').click(); // cy.get( // '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon' // ).click(); // cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should( // 'not.be.visible' // ); // }); // 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'); // }); });