0
0
Fork 0
salix-front-mindshore-fork2/test/cypress/integration/claimAction.spec.js

46 lines
1.2 KiB
JavaScript
Raw Normal View History

2023-11-07 11:42:39 +00:00
/// <reference types="cypress" />
describe('ClaimAction', () => {
const claimId = 2;
2023-11-07 11:42:39 +00:00
const firstRow = 'tbody > :nth-child(1)';
2023-11-20 17:13:26 +00:00
const destinationRow = '.q-item__section > .q-field';
2023-11-07 11:42:39 +00:00
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/claim/${claimId}/action`);
});
it('should import claim', () => {
cy.get('[title="Import claim"]').click();
});
it('should change destination', () => {
const rowData = [true, null, null, 'Bueno'];
2023-11-07 11:42:39 +00:00
cy.fillRow(firstRow, rowData);
});
2023-11-20 17:13:26 +00:00
it('should change destination from other button', () => {
const rowData = [true];
2023-11-17 13:06:43 +00:00
2023-11-20 17:13:26 +00:00
cy.fillRow(firstRow, rowData);
cy.get('[title="Change destination"]').click();
cy.selectOption(destinationRow, 'Confeccion');
cy.get('.q-card > .q-card__actions > .q-btn--standard').click();
});
2023-11-17 13:06:43 +00:00
2023-11-07 11:42:39 +00:00
it('should regularize', () => {
cy.get('[title="Regularize"]').click();
2023-11-20 17:13:26 +00:00
cy.clickConfirm();
2023-11-07 11:42:39 +00:00
});
2023-11-17 13:06:43 +00:00
it('should remove the line', () => {
cy.fillRow(firstRow, [true]);
cy.removeCard();
cy.clickConfirm();
cy.reload();
cy.get(firstRow).should('not.exist');
});
2023-11-07 11:42:39 +00:00
});