2023-08-16 13:04:16 +00:00
|
|
|
/// <reference types="cypress" />
|
2023-08-21 13:14:19 +00:00
|
|
|
describe('ClaimDevelopment', () => {
|
|
|
|
const claimId = 1;
|
|
|
|
|
2023-08-16 13:04:16 +00:00
|
|
|
beforeEach(() => {
|
2023-08-21 13:14:19 +00:00
|
|
|
cy.viewport(1920, 1080);
|
2023-08-16 13:04:16 +00:00
|
|
|
cy.login('developer');
|
2023-08-21 13:14:19 +00:00
|
|
|
cy.visit(`/#/claim/${claimId}/development`);
|
2023-08-16 13:04:16 +00:00
|
|
|
});
|
|
|
|
|
2023-08-21 13:14:19 +00:00
|
|
|
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');
|
2023-08-16 13:04:16 +00:00
|
|
|
});
|
|
|
|
|
2023-08-21 13:14:19 +00:00
|
|
|
it('should edit line', () => {
|
|
|
|
cy.get('tbody > :nth-child(1) > :nth-child(2)').click();
|
|
|
|
cy.selectOption('Novato');
|
|
|
|
cy.get('[title="Save"]').click();
|
2023-08-16 13:04:16 +00:00
|
|
|
|
2023-08-21 13:14:19 +00:00
|
|
|
cy.visit(`/#/claim/${claimId}/development`);
|
2023-08-16 13:04:16 +00:00
|
|
|
cy.get(
|
2023-08-21 13:14:19 +00:00
|
|
|
':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');
|
2023-08-16 13:04:16 +00:00
|
|
|
|
2023-08-21 13:14:19 +00:00
|
|
|
//Restart data
|
|
|
|
cy.get('tbody > :nth-child(1) > :nth-child(2)');
|
|
|
|
cy.selectOption('Prisas');
|
|
|
|
cy.get('[title="Save"]').click();
|
2023-08-16 13:04:16 +00:00
|
|
|
});
|
|
|
|
|
2023-08-21 13:14:19 +00:00
|
|
|
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');
|
2023-08-16 13:04:16 +00:00
|
|
|
|
2023-08-21 13:14:19 +00:00
|
|
|
//fill in data
|
|
|
|
const rowData = ['', '', ''];
|
|
|
|
cy.fillTableRow(3, rowData);
|
2023-08-16 13:04:16 +00:00
|
|
|
});
|
2023-08-21 13:14:19 +00:00
|
|
|
|
|
|
|
// 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');
|
|
|
|
// });
|
2023-08-16 13:04:16 +00:00
|
|
|
});
|