2024-11-21 08:32:45 +00:00
|
|
|
describe('WorkerPit', () => {
|
|
|
|
const familySituationInput = '[data-cy="Family Situation_input"]';
|
|
|
|
const familySituation = '1';
|
|
|
|
const childPensionInput = '[data-cy="Child Pension_input"]';
|
|
|
|
const childPension = '120';
|
2024-11-22 05:08:11 +00:00
|
|
|
const spouseNifInput = '[data-cy="Spouse Pension_input"]';
|
|
|
|
const spouseNif = '65117125P';
|
|
|
|
const spousePensionInput = '[data-cy="Spouse Pension_input"]';
|
|
|
|
const spousePension = '120';
|
|
|
|
const addRelative = '[data-cy="addRelative"]';
|
|
|
|
const isDescendantSelect = '[data-cy="Descendant/Ascendant_select"]';
|
|
|
|
const birthedInput = '[data-cy="Birth Year_input"]';
|
|
|
|
const birthed = '2002';
|
|
|
|
const adoptionYearInput = '[data-cy="Adoption Year_input"]';
|
|
|
|
const adoptionYear = '2004';
|
|
|
|
const saveRelative = '[data-cy="workerPitRelativeSaveBtn"]';
|
2024-11-21 08:32:45 +00:00
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1920, 1080);
|
|
|
|
cy.login('developer');
|
|
|
|
cy.visit(`/#/worker/1107/pit`);
|
|
|
|
});
|
|
|
|
|
2024-11-22 06:34:39 +00:00
|
|
|
it('complete PIT', () => {
|
|
|
|
cy.get(familySituationInput).type(familySituation);
|
|
|
|
cy.get(childPensionInput).type(childPension);
|
|
|
|
cy.get(spouseNifInput).type(spouseNif);
|
|
|
|
cy.get(spousePensionInput).type(spousePension);
|
|
|
|
cy.saveCard();
|
|
|
|
});
|
2024-11-22 05:08:11 +00:00
|
|
|
|
|
|
|
it('delete relative', () => {
|
|
|
|
cy.get(addRelative).click();
|
|
|
|
cy.get(isDescendantSelect).type('{downArrow}{downArrow}{enter}');
|
|
|
|
cy.get(birthedInput).type(birthed);
|
|
|
|
cy.get(adoptionYearInput).type(adoptionYear);
|
|
|
|
cy.get(saveRelative).click();
|
|
|
|
});
|
2024-11-21 08:32:45 +00:00
|
|
|
});
|