fix: refs #7529 fix e2e
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-11-22 06:08:11 +01:00
parent a0f804ab78
commit 3352cea0e7
2 changed files with 30 additions and 16 deletions

View File

@ -59,7 +59,6 @@ const deleteRelative = async (id) => {
auto-load
data-key="workerIrpfs"
:max-width="false"
:data-required="{ workerFk: route.params.id }"
>
<template #form="{ data }">
<QCard class="q-px-lg q-py-lg">
@ -79,6 +78,9 @@ const deleteRelative = async (id) => {
option-label="description"
option-value="id"
v-model="data.disabilityGradeFk"
id="disabilityGrades"
data-cy="disabilityGrades"
hide-selected
/>
<VnInputDate
@ -148,6 +150,7 @@ const deleteRelative = async (id) => {
@click="workerPitCrudRef.onSubmit"
:disable="!workerPitCrudRef.hasChanges"
:title="t('globals.save')"
data-cy="workerPitRelativeSaveBtn"
/>
</QBtnGroup>
</div>
@ -212,6 +215,7 @@ const deleteRelative = async (id) => {
icon="add"
shortcut="+"
style="flex: 0"
data-cy="addRelative"
/>
</VnRow>
</QCard>
@ -245,7 +249,7 @@ en:
geographicMobilityDate: Geographic Mobility Date
childPension: Child Pension
spousePension: Spouse Pension
isDependend: Dependent Support / Reduced Mobility
isDependend: Dependent Suport / Reduced Mobility
spouseNif: Spouse NIF (Tax ID)
hasHousingPaymentBefore: Housing Payments Before 2011
hasHousingPaymentAfter: Housing Payments After 2011

View File

@ -1,9 +1,19 @@
describe('WorkerPit', () => {
const familySituationInput = '[data-cy="Family Situation_input"]';
const familySituation = '1';
const disabilityGradesSelect = '[data-cy="Disability Grades_select"]';
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);
@ -11,18 +21,18 @@ describe('WorkerPit', () => {
cy.visit(`/#/worker/1107/pit`);
});
it('complete PIT', () => {
cy.get(familySituationInput).type(familySituation);
cy.get(disabilityGradesSelect).click('{downArrow}{enter}');
cy.get(childPensionInput).type(childPension);
// cy.get('.q-notification__message').should('have.text', 'Data created');
});
// it('delete pda', () => {
// cy.get('.q-card > .q-item > .q-item__section--side > .q-icon').click();
// cy.get(
// '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
// ).click();
// cy.get('.q-notification__message').should('have.text', 'PDA deallocated');
// 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();
});
});