39 lines
1.5 KiB
JavaScript
39 lines
1.5 KiB
JavaScript
describe('WorkerPit', () => {
|
|
const familySituationInput = '[data-cy="Family Situation_input"]';
|
|
const familySituation = '1';
|
|
const childPensionInput = '[data-cy="Child Pension_input"]';
|
|
const childPension = '120';
|
|
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"]';
|
|
|
|
beforeEach(() => {
|
|
cy.viewport(1920, 1080);
|
|
cy.login('developer');
|
|
cy.visit(`/#/worker/1107/pit`);
|
|
});
|
|
|
|
// it('complete PIT', () => {
|
|
// cy.get(familySituationInput).type(familySituation);
|
|
// cy.get(childPensionInput).type(childPension);
|
|
// cy.get(spouseNifInput).type(spouseNif);
|
|
// cy.get(spousePensionInput).type(spousePension);
|
|
// });
|
|
|
|
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();
|
|
});
|
|
});
|