This commit is contained in:
parent
cbc907a54b
commit
2b3308bde7
|
@ -68,8 +68,14 @@ const deleteRelative = async (id) => {
|
||||||
:label="t('familySituation')"
|
:label="t('familySituation')"
|
||||||
clearable
|
clearable
|
||||||
v-model="data.familySituation"
|
v-model="data.familySituation"
|
||||||
|
data-cy="familySituation"
|
||||||
|
/>
|
||||||
|
<VnInput
|
||||||
|
:label="t('spouseNif')"
|
||||||
|
clearable
|
||||||
|
v-model="data.spouseNif"
|
||||||
|
data-cy="spouseNif"
|
||||||
/>
|
/>
|
||||||
<VnInput :label="t('spouseNif')" clearable v-model="data.spouseNif" />
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
@ -93,11 +99,13 @@ const deleteRelative = async (id) => {
|
||||||
clearable
|
clearable
|
||||||
v-model="data.childPension"
|
v-model="data.childPension"
|
||||||
:label="t(`childPension`)"
|
:label="t(`childPension`)"
|
||||||
|
data-cy="childPension"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
clearable
|
clearable
|
||||||
v-model="data.spousePension"
|
v-model="data.spousePension"
|
||||||
:label="t(`spousePension`)"
|
:label="t(`spousePension`)"
|
||||||
|
data-cy="spousePension"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow wrap>
|
<VnRow wrap>
|
||||||
|
@ -190,12 +198,14 @@ const deleteRelative = async (id) => {
|
||||||
type="number"
|
type="number"
|
||||||
v-model="row.birthed"
|
v-model="row.birthed"
|
||||||
:label="t(`birthed`)"
|
:label="t(`birthed`)"
|
||||||
|
data-cy="birthed"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<VnInput
|
<VnInput
|
||||||
type="number"
|
type="number"
|
||||||
v-model="row.adoptionYear"
|
v-model="row.adoptionYear"
|
||||||
:label="t(`adoptionYear`)"
|
:label="t(`adoptionYear`)"
|
||||||
|
data-cy="adoptionYear"
|
||||||
/>
|
/>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
v-model="row.isDependend"
|
v-model="row.isDependend"
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
describe('WorkerBasicData', () => {
|
describe('WorkerBasicData', () => {
|
||||||
const maritalStatusSelect = '[data-cy="MaritalStatus"]';
|
|
||||||
const countrySelect = '[data-cy="country"]';
|
|
||||||
const country = 'Alemania';
|
|
||||||
const nif = '42572374H';
|
|
||||||
const fi = '[data-cy="fi"]';
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
@ -11,9 +6,9 @@ describe('WorkerBasicData', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should modify worker summary', () => {
|
it('should modify worker summary', () => {
|
||||||
cy.get(maritalStatusSelect).type('Married');
|
cy.dataCy('MaritalStatus').type('Married');
|
||||||
cy.get(fi).type(nif);
|
cy.dataCy('fi').type('42572374H');
|
||||||
cy.get(countrySelect).type(country);
|
cy.dataCy('country').type('Alemania');
|
||||||
cy.saveCard();
|
cy.saveCard();
|
||||||
cy.checkNotification('Data saved');
|
cy.checkNotification('Data saved');
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('WorkerNotes', () => {
|
describe('WorkerNotes', () => {
|
||||||
const userId = 1106;
|
const userId = 1106;
|
||||||
const addNote = '[data-cy="addNote"]';
|
|
||||||
const numberOfWagons = '[data-cy="numberOfWagons"]';
|
|
||||||
const linesLimit = '[data-cy="linesLimit"]';
|
|
||||||
const volumeLimit = '[data-cy="volumeLimit"]';
|
|
||||||
const sizeLimit = '[data-cy="sizeLimit"]';
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
|
|
@ -13,10 +13,10 @@ describe('WorkerOperator', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should fill the operator form', () => {
|
it('should fill the operator form', () => {
|
||||||
cy.get(numberOfWagons).type(nWagons);
|
cy.dataCy('numberOfWagons').type(nWagons);
|
||||||
cy.get(linesLimit).type('6');
|
cy.dataCy('linesLimit').type('6');
|
||||||
cy.get(volumeLimit).type('3');
|
cy.get('volumeLimit').type('3');
|
||||||
cy.get(sizeLimit).type('3');
|
cy.get('sizeLimit').type('3');
|
||||||
cy.saveCard();
|
cy.saveCard();
|
||||||
|
|
||||||
cy.checkNotification('Data saved');
|
cy.checkNotification('Data saved');
|
||||||
|
|
|
@ -1,19 +1,5 @@
|
||||||
describe('WorkerPit', () => {
|
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 addRelative = '[data-cy="addRelative"]';
|
||||||
const isDescendantSelect = '[data-cy="Descendant/Ascendant"]';
|
|
||||||
const Descendant = 'Descendiente';
|
|
||||||
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"]';
|
const saveRelative = '[data-cy="workerPitRelativeSaveBtn"]';
|
||||||
const savePIT = '#st-actions > .q-btn-group > .q-btn--standard';
|
const savePIT = '#st-actions > .q-btn-group > .q-btn--standard';
|
||||||
|
|
||||||
|
@ -24,15 +10,15 @@ describe('WorkerPit', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('complete PIT', () => {
|
it('complete PIT', () => {
|
||||||
cy.get(familySituationInput).type(familySituation);
|
cy.dataCy('familySituation').type('1');
|
||||||
cy.get(childPensionInput).type(childPension);
|
cy.dataCy('childPension').type('120');
|
||||||
cy.get(spouseNifInput).type(spouseNif);
|
cy.dataCy('spouseNif').type('65117125P');
|
||||||
cy.get(spousePensionInput).type(spousePension);
|
cy.dataCy('spousePension').type('120');
|
||||||
cy.get(savePIT).click();
|
cy.get(savePIT).click();
|
||||||
cy.get(addRelative).click();
|
cy.get(addRelative).click();
|
||||||
cy.get(isDescendantSelect).type(Descendant);
|
cy.dataCy('Descendant/Ascendant').type('Descendiente');
|
||||||
cy.get(birthedInput).type(birthed);
|
cy.dataCy('birthed').type('2002');
|
||||||
cy.get(adoptionYearInput).type(adoptionYear);
|
cy.dataCy('adoptionYear').type('2004');
|
||||||
cy.get(saveRelative).click();
|
cy.get(saveRelative).click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue