Merge pull request 'fix: refs #7323 e2e' (!1443) from 7323-fixe2e into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1443 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
b32d30c90b
|
@ -176,6 +176,7 @@ const deleteRelative = async (id) => {
|
||||||
:label="t('isDescendant')"
|
:label="t('isDescendant')"
|
||||||
v-model="row.isDescendant"
|
v-model="row.isDescendant"
|
||||||
class="q-gutter-xs q-mb-xs"
|
class="q-gutter-xs q-mb-xs"
|
||||||
|
data-cy="Descendant/Ascendant"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('disabilityGrades')"
|
:label="t('disabilityGrades')"
|
||||||
|
|
|
@ -2,9 +2,24 @@ describe('WorkerCreate', () => {
|
||||||
const externalRadio = '.q-radio:nth-child(2)';
|
const externalRadio = '.q-radio:nth-child(2)';
|
||||||
const developerBossId = 120;
|
const developerBossId = 120;
|
||||||
const payMethodCross =
|
const payMethodCross =
|
||||||
'.grid-create .full-width > :nth-child(9) .q-select .q-field__append:not(.q-anchor--skip)';
|
':nth-child(9) > .q-select > .q-field__inner > .q-field__control > :nth-child(2)';
|
||||||
const saveBtn = '.q-mt-lg > .q-btn--standard';
|
const saveBtn = '.q-mt-lg > .q-btn--standard';
|
||||||
|
|
||||||
|
const internalWithOutPay = {
|
||||||
|
Fi: { val: '78457139E' },
|
||||||
|
'Web user': { val: 'manolo' },
|
||||||
|
Name: { val: 'Manolo' },
|
||||||
|
'Last name': { val: 'Hurtado' },
|
||||||
|
'Personal email': { val: 'manolo@mydomain.com' },
|
||||||
|
Company: { val: 'VNL', type: 'select' },
|
||||||
|
Street: { val: 'S/ DEFAULTWORKERSTREET' },
|
||||||
|
Location: { val: 1, type: 'select' },
|
||||||
|
Phone: { val: '123456789' },
|
||||||
|
'Worker code': { val: 'DWW' },
|
||||||
|
Boss: { val: developerBossId, type: 'select' },
|
||||||
|
Birth: { val: '11-12-2022', type: 'date' },
|
||||||
|
};
|
||||||
|
|
||||||
const internal = {
|
const internal = {
|
||||||
Fi: { val: '78457139E' },
|
Fi: { val: '78457139E' },
|
||||||
'Web user': { val: 'manolo' },
|
'Web user': { val: 'manolo' },
|
||||||
|
@ -14,6 +29,7 @@ describe('WorkerCreate', () => {
|
||||||
Company: { val: 'VNL', type: 'select' },
|
Company: { val: 'VNL', type: 'select' },
|
||||||
Street: { val: 'S/ DEFAULTWORKERSTREET' },
|
Street: { val: 'S/ DEFAULTWORKERSTREET' },
|
||||||
Location: { val: 1, type: 'select' },
|
Location: { val: 1, type: 'select' },
|
||||||
|
'Pay method': { val: 1, type: 'select' },
|
||||||
Phone: { val: '123456789' },
|
Phone: { val: '123456789' },
|
||||||
'Worker code': { val: 'DWW' },
|
'Worker code': { val: 'DWW' },
|
||||||
Boss: { val: developerBossId, type: 'select' },
|
Boss: { val: developerBossId, type: 'select' },
|
||||||
|
@ -37,17 +53,14 @@ describe('WorkerCreate', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if a pay method has not been selected', () => {
|
it('should throw an error if a pay method has not been selected', () => {
|
||||||
cy.fillInForm(internal);
|
cy.fillInForm(internalWithOutPay);
|
||||||
cy.get(payMethodCross).click();
|
cy.get(payMethodCross).click();
|
||||||
cy.get(saveBtn).click();
|
cy.get(saveBtn).click();
|
||||||
cy.checkNotification('Payment method is required');
|
cy.checkNotification('Payment method is required');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create an internal', () => {
|
it('should create an internal', () => {
|
||||||
cy.fillInForm({
|
cy.fillInForm(internal);
|
||||||
...internal,
|
|
||||||
'Pay method': { val: 'PayMethod one', type: 'select' },
|
|
||||||
});
|
|
||||||
cy.get(saveBtn).click();
|
cy.get(saveBtn).click();
|
||||||
cy.checkNotification('Data created');
|
cy.checkNotification('Data created');
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('WorkerNotificationsManager', () => {
|
||||||
cy.visit(`/#/worker/${salesPersonId}/notifications`);
|
cy.visit(`/#/worker/${salesPersonId}/notifications`);
|
||||||
cy.get(firstAvailableNotification).click();
|
cy.get(firstAvailableNotification).click();
|
||||||
cy.checkNotification(
|
cy.checkNotification(
|
||||||
'The notification subscription of this worker cant be modified'
|
'The notification subscription of this worker cant be modified',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,8 @@ describe('WorkerPit', () => {
|
||||||
const spousePensionInput = '[data-cy="Spouse Pension_input"]';
|
const spousePensionInput = '[data-cy="Spouse Pension_input"]';
|
||||||
const spousePension = '120';
|
const spousePension = '120';
|
||||||
const addRelative = '[data-cy="addRelative"]';
|
const addRelative = '[data-cy="addRelative"]';
|
||||||
const isDescendantSelect = '[data-cy="Descendant/Ascendant_select"]';
|
const isDescendantSelect = '[data-cy="Descendant/Ascendant"]';
|
||||||
|
const Descendant = 'Descendiente';
|
||||||
const birthedInput = '[data-cy="Birth Year_input"]';
|
const birthedInput = '[data-cy="Birth Year_input"]';
|
||||||
const birthed = '2002';
|
const birthed = '2002';
|
||||||
const adoptionYearInput = '[data-cy="Adoption Year_input"]';
|
const adoptionYearInput = '[data-cy="Adoption Year_input"]';
|
||||||
|
@ -28,11 +29,8 @@ describe('WorkerPit', () => {
|
||||||
cy.get(spouseNifInput).type(spouseNif);
|
cy.get(spouseNifInput).type(spouseNif);
|
||||||
cy.get(spousePensionInput).type(spousePension);
|
cy.get(spousePensionInput).type(spousePension);
|
||||||
cy.get(savePIT).click();
|
cy.get(savePIT).click();
|
||||||
});
|
|
||||||
|
|
||||||
it('complete relative', () => {
|
|
||||||
cy.get(addRelative).click();
|
cy.get(addRelative).click();
|
||||||
cy.get(isDescendantSelect).type('{downArrow}{downArrow}{enter}');
|
cy.get(isDescendantSelect).type(Descendant);
|
||||||
cy.get(birthedInput).type(birthed);
|
cy.get(birthedInput).type(birthed);
|
||||||
cy.get(adoptionYearInput).type(adoptionYear);
|
cy.get(adoptionYearInput).type(adoptionYear);
|
||||||
cy.get(saveRelative).click();
|
cy.get(saveRelative).click();
|
||||||
|
|
Loading…
Reference in New Issue