test: refs #8315 fix claimDevelopment fixtures

This commit is contained in:
Alex Moreno 2024-12-17 14:35:37 +01:00
parent e6ced7b2f5
commit 5bf3e2c80a
1 changed files with 8 additions and 6 deletions

View File

@ -3,6 +3,8 @@ describe('ClaimDevelopment', () => {
const claimId = 1; const claimId = 1;
const firstLineReason = 'tbody > :nth-child(1) > :nth-child(2)'; const firstLineReason = 'tbody > :nth-child(1) > :nth-child(2)';
const thirdRow = 'tbody > :nth-child(3)'; const thirdRow = 'tbody > :nth-child(3)';
const lastReason = 'Incompetencia';
const newReason = 'Calor';
beforeEach(() => { beforeEach(() => {
cy.viewport(1920, 1080); cy.viewport(1920, 1080);
@ -14,22 +16,22 @@ describe('ClaimDevelopment', () => {
}); });
it('should reset line', () => { it('should reset line', () => {
cy.selectOption(firstLineReason, 'Novato'); cy.selectOption(firstLineReason, newReason);
cy.resetCard(); cy.resetCard();
cy.getValue(firstLineReason).should('equal', 'Prisas'); cy.getValue(firstLineReason).should('equal', lastReason);
}); });
it('should edit line', () => { it('should edit line', () => {
cy.selectOption(firstLineReason, 'Novato'); cy.selectOption(firstLineReason, newReason);
cy.saveCard(); cy.saveCard();
cy.login('developer'); cy.login('developer');
cy.visit(`/#/claim/${claimId}/development`); cy.visit(`/#/claim/${claimId}/development`);
cy.getValue(firstLineReason).should('equal', 'Novato'); cy.getValue(firstLineReason).should('equal', newReason);
//Restart data //Restart data
cy.selectOption(firstLineReason, 'Prisas'); cy.selectOption(firstLineReason, lastReason);
cy.saveCard(); cy.saveCard();
}); });
@ -42,7 +44,7 @@ describe('ClaimDevelopment', () => {
const rowData = [ const rowData = [
false, false,
'Novato', newReason,
'Roces', 'Roces',
'Compradores', 'Compradores',
'administrativeNick', 'administrativeNick',