forked from verdnatura/salix-front
refs #5509 fix: e2e
This commit is contained in:
parent
b3e554d99e
commit
33eef88825
|
@ -13,7 +13,7 @@ describe('ClaimDevelopment', () => {
|
||||||
it('should reset line', () => {
|
it('should reset line', () => {
|
||||||
cy.selectOption(firstLineReason, 'Novato');
|
cy.selectOption(firstLineReason, 'Novato');
|
||||||
cy.resetCard();
|
cy.resetCard();
|
||||||
cy.getValue(firstLineReason).should('have.value', 'Prisas');
|
cy.getValue(firstLineReason).should('equal', 'Prisas');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit line', () => {
|
it('should edit line', () => {
|
||||||
|
@ -23,7 +23,7 @@ describe('ClaimDevelopment', () => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/claim/${claimId}/development`);
|
cy.visit(`/#/claim/${claimId}/development`);
|
||||||
|
|
||||||
cy.getValue(firstLineReason).should('have.value', 'Novato');
|
cy.getValue(firstLineReason).should('equal', 'Novato');
|
||||||
|
|
||||||
//Restart data
|
//Restart data
|
||||||
cy.selectOption(firstLineReason, 'Prisas');
|
cy.selectOption(firstLineReason, 'Prisas');
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('InvoiceInIntrastat', () => {
|
||||||
cy.visit(`/#/invoice-in/1/intrastat`);
|
cy.visit(`/#/invoice-in/1/intrastat`);
|
||||||
|
|
||||||
cy.getValue(firstLineCode).should(
|
cy.getValue(firstLineCode).should(
|
||||||
'have.value',
|
'equal',
|
||||||
'Plantas vivas: Esqueje/injerto, Vid'
|
'Plantas vivas: Esqueje/injerto, Vid'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,7 +21,7 @@ describe('InvoiceInVat', () => {
|
||||||
cy.saveCard();
|
cy.saveCard();
|
||||||
cy.visit(`/#/invoice-in/1/vat`);
|
cy.visit(`/#/invoice-in/1/vat`);
|
||||||
|
|
||||||
cy.getValue(firstLineVat).should('have.value', 'H.P. IVA 21% CEE');
|
cy.getValue(firstLineVat).should('equal', 'H.P. IVA 21% CEE');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add a new row', () => {
|
it('should add a new row', () => {
|
||||||
|
|
|
@ -55,13 +55,13 @@ Cypress.Commands.add('getValue', (selector) => {
|
||||||
return cy.get(
|
return cy.get(
|
||||||
selector +
|
selector +
|
||||||
'> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > input'
|
'> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > input'
|
||||||
);
|
).invoke('val')
|
||||||
}
|
}
|
||||||
// Si es un QSelect
|
// Si es un QSelect
|
||||||
if ($el.find('span').length) {
|
if ($el.find('span').length) {
|
||||||
return cy.get(
|
return cy.get(
|
||||||
selector + ' span'
|
selector + ' span'
|
||||||
);
|
).then(($span) => { return $span[0].innerText })
|
||||||
}
|
}
|
||||||
// Puedes añadir un log o lanzar un error si el elemento no es reconocido
|
// Puedes añadir un log o lanzar un error si el elemento no es reconocido
|
||||||
cy.log('Elemento no soportado');
|
cy.log('Elemento no soportado');
|
||||||
|
@ -138,7 +138,7 @@ Cypress.Commands.add('validateRow', (rowSelector, expectedValues) => {
|
||||||
cy.getValue(`:nth-child(${index + 1})`).should(`${prefix}be.checked`);
|
cy.getValue(`:nth-child(${index + 1})`).should(`${prefix}be.checked`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
cy.getValue(`:nth-child(${index + 1})`).invoke('text').should('have.value', value)
|
cy.getValue(`:nth-child(${index + 1})`).should('equal', value)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue