repairs on e2e tests completed plus Fiscal Data Path completed
This commit is contained in:
parent
78a2887ab3
commit
92fe65b898
|
@ -49,7 +49,7 @@
|
||||||
<vn-check label="Invoice by address" field="$ctrl.client.hasToInvoiceByAddress" vn-acl="administrative"></vn-check>
|
<vn-check label="Invoice by address" field="$ctrl.client.hasToInvoiceByAddress" vn-acl="administrative"></vn-check>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<vn-check label="Datos comprobados" field="$ctrl.client.isTaxDataChecked" vn-acl="administrative"></vn-check>
|
<vn-check label="Verified data" field="$ctrl.client.isTaxDataChecked" vn-acl="administrative"></vn-check>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
|
|
@ -18,5 +18,6 @@
|
||||||
"Pay method" : "Forma de pago",
|
"Pay method" : "Forma de pago",
|
||||||
"Address": "Consignatario",
|
"Address": "Consignatario",
|
||||||
"Credit" : "Crédito",
|
"Credit" : "Crédito",
|
||||||
"Secured credit": "Crédito asegurado"
|
"Secured credit": "Crédito asegurado",
|
||||||
|
"Verified data": "Datos comprobados"
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,17 +49,22 @@ export default {
|
||||||
fiscalData: {
|
fiscalData: {
|
||||||
fiscalDataButton: `${components.vnMenuItem}[ui-sref="clientCard.fiscalData"]`,
|
fiscalDataButton: `${components.vnMenuItem}[ui-sref="clientCard.fiscalData"]`,
|
||||||
socialNameInput: `${components.vnTextfield}[name="socialName"]`,
|
socialNameInput: `${components.vnTextfield}[name="socialName"]`,
|
||||||
hasToInvoiceCheckboxLabel: `${components.vnCheck}[label='Has to invoice'] > label`,
|
fiscalIdInput: `${components.vnTextfield}[name="fi"]`,
|
||||||
hasToInvoiceCheckboxInput: `${components.vnCheck}[label='Has to invoice'] > label > label > input`,
|
equalizationTaxCheckboxLabel: `${components.vnCheck}[label='Equalization tax'] > label`,
|
||||||
invoiceByMailCheckboxLabel: `${components.vnCheck}[label='Invoice by mail'] > label`,
|
cancelPropagationButton: `body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-one > vn-vertical > vn-client-fiscal-data > vn-dialog > div > form > div.button-bar > tpl-buttons > button:nth-child(1)`,
|
||||||
invoiceByMailCheckboxInput: `${components.vnCheck}[label='Invoice by mail'] > label > label > input`,
|
|
||||||
addressInput: `${components.vnTextfield}[name="street"]`,
|
addressInput: `${components.vnTextfield}[name="street"]`,
|
||||||
cityInput: `${components.vnTextfield}[name="city"]`,
|
cityInput: `${components.vnTextfield}[name="city"]`,
|
||||||
postcodeInput: `${components.vnTextfield}[name="postcode"]`,
|
postcodeInput: `${components.vnTextfield}[name="postcode"]`,
|
||||||
provinceInput: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] > vn-vertical > ${components.vnTextfield}`,
|
provinceInput: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] > vn-vertical > ${components.vnTextfield}`,
|
||||||
provinceFifthOption: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] > vn-vertical > vn-drop-down > vn-vertical > vn-one:nth-child(2) > ul > li:nth-child(5)`,
|
provinceFifthOption: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] > vn-vertical > vn-drop-down > vn-vertical:not(.ng-hide) > vn-auto:nth-child(2) > ul > li:nth-child(5)`,
|
||||||
countryInput: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] > vn-vertical > ${components.vnTextfield}`,
|
countryInput: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] > vn-vertical > ${components.vnTextfield}`,
|
||||||
countryThirdOption: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] > vn-vertical > vn-drop-down > vn-vertical > vn-one:nth-child(3) > ul > li:nth-child(3)`,
|
countryThirdOption: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] > vn-vertical > vn-drop-down > vn-vertical:not(.ng-hide) > vn-auto:nth-child(2) > ul > li:nth-child(3)`,
|
||||||
|
activeCheckboxLabel: `${components.vnCheck}[label='Active'] > label`,
|
||||||
|
invoiceByAddressCheckboxInput: `${components.vnCheck}[label='Invoice by address'] > label > input`,
|
||||||
|
verifiedDataCheckboxInput: `${components.vnCheck}[label='Verified data'] > label > input`,
|
||||||
|
hasToInvoiceCheckboxLabel: `${components.vnCheck}[label='Has to invoice'] > label`,
|
||||||
|
invoiceByMailCheckboxLabel: `${components.vnCheck}[label='Invoice by mail'] > label`,
|
||||||
|
viesCheckboxInput: `${components.vnCheck}[label='Vies'] > label > input`,
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -226,7 +226,7 @@ describe('Edit basicData path', () => {
|
||||||
nightmare
|
nightmare
|
||||||
.waitToClick(selectors.basicData.salesPersonInput)
|
.waitToClick(selectors.basicData.salesPersonInput)
|
||||||
.waitToClick(selectors.basicData.salesBruceBannerOption)
|
.waitToClick(selectors.basicData.salesBruceBannerOption)
|
||||||
.wait(100)
|
.wait(200)
|
||||||
.waitToClick(selectors.basicData.saveButton)
|
.waitToClick(selectors.basicData.saveButton)
|
||||||
.wait(selectors.globalItems.snackbarIsActive)
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
.getInnerText(selectors.globalItems.snackbarIsActive)
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
@ -243,7 +243,7 @@ describe('Edit basicData path', () => {
|
||||||
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
.wait(selectors.fiscalData.addressInput)
|
.wait(selectors.fiscalData.addressInput)
|
||||||
.waitToClick(selectors.basicData.basicDataButton)
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
.wait(selectors.basicData.salesPersonInput)
|
.wait(200)
|
||||||
.getInputValue(selectors.basicData.salesPersonInput)
|
.getInputValue(selectors.basicData.salesPersonInput)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Bruce Banner');
|
expect(result).toEqual('Bruce Banner');
|
||||||
|
@ -256,7 +256,7 @@ describe('Edit basicData path', () => {
|
||||||
nightmare
|
nightmare
|
||||||
.waitToClick(selectors.basicData.channelInput)
|
.waitToClick(selectors.basicData.channelInput)
|
||||||
.waitToClick(selectors.basicData.channelMetropolisOption)
|
.waitToClick(selectors.basicData.channelMetropolisOption)
|
||||||
.wait(100)
|
.wait(400)
|
||||||
.waitToClick(selectors.basicData.saveButton)
|
.waitToClick(selectors.basicData.saveButton)
|
||||||
.wait(selectors.globalItems.snackbarIsActive)
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
.getInnerText(selectors.globalItems.snackbarIsActive)
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
@ -273,7 +273,7 @@ describe('Edit basicData path', () => {
|
||||||
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
.wait(selectors.fiscalData.addressInput)
|
.wait(selectors.fiscalData.addressInput)
|
||||||
.waitToClick(selectors.basicData.basicDataButton)
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
.wait(selectors.basicData.channelInput)
|
.wait(400)
|
||||||
.getInputValue(selectors.basicData.channelInput)
|
.getInputValue(selectors.basicData.channelInput)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Metropolis newspaper');
|
expect(result).toEqual('Metropolis newspaper');
|
||||||
|
|
|
@ -73,9 +73,69 @@ describe('Edit fiscalData path', () => {
|
||||||
.catch(catchErrors(done));
|
.catch(catchErrors(done));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should uncheck the hasToInvoice checkbox', done => {
|
it('should edit the social name', done => {
|
||||||
nightmare
|
nightmare
|
||||||
.waitToClick(selectors.fiscalData.hasToInvoiceCheckboxLabel)
|
.wait(selectors.fiscalData.socialNameInput)
|
||||||
|
.clearInput(selectors.fiscalData.socialNameInput)
|
||||||
|
.type(selectors.fiscalData.socialNameInput, 'Hulk edited')
|
||||||
|
.click(selectors.fiscalData.saveButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual('¡Datos guardados!');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm the social name have been edited', done => {
|
||||||
|
nightmare
|
||||||
|
.waitForSnackbarReset()
|
||||||
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
|
.wait(selectors.basicData.nameInput)
|
||||||
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
|
.wait(selectors.fiscalData.socialNameInput)
|
||||||
|
.getInputValue(selectors.fiscalData.socialNameInput)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual('Hulk edited');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should edit the fiscal id', done => {
|
||||||
|
nightmare
|
||||||
|
.wait(selectors.fiscalData.fiscalIdInput)
|
||||||
|
.clearInput(selectors.fiscalData.fiscalIdInput)
|
||||||
|
.type(selectors.fiscalData.fiscalIdInput, '94980061C')
|
||||||
|
.click(selectors.fiscalData.saveButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual('¡Datos guardados!');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm the fiscal id have been edited', done => {
|
||||||
|
nightmare
|
||||||
|
.waitForSnackbarReset()
|
||||||
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
|
.wait(selectors.basicData.nameInput)
|
||||||
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
|
.wait(selectors.fiscalData.fiscalIdInput)
|
||||||
|
.getInputValue(selectors.fiscalData.fiscalIdInput)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual('94980061C');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should uncheck the Equalization tax checkbox', done => {
|
||||||
|
nightmare
|
||||||
|
.waitToClick(selectors.fiscalData.equalizationTaxCheckboxLabel)
|
||||||
.waitToClick(selectors.fiscalData.saveButton)
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
.wait(selectors.globalItems.snackbarIsActive)
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
.getInnerText(selectors.globalItems.snackbarIsActive)
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
@ -86,27 +146,10 @@ describe('Edit fiscalData path', () => {
|
||||||
.catch(catchErrors(done));
|
.catch(catchErrors(done));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm hasToInvoice checkbox is unchecked', done => {
|
// there should be a test to confirm propagation on addresses view once equalization tax propagation is shown on each address
|
||||||
|
it('should not propagate the Equalization tax', done => {
|
||||||
nightmare
|
nightmare
|
||||||
.waitForSnackbarReset()
|
.waitToClick(selectors.fiscalData.cancelPropagationButton)
|
||||||
.waitToClick(selectors.basicData.basicDataButton)
|
|
||||||
.wait(selectors.basicData.nameInput)
|
|
||||||
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
|
||||||
.wait(selectors.fiscalData.hasToInvoiceCheckboxLabel)
|
|
||||||
.evaluate(selector => {
|
|
||||||
return document.querySelector(selector).checked;
|
|
||||||
}, selectors.fiscalData.hasToInvoiceCheckboxLabel)
|
|
||||||
.then(value => {
|
|
||||||
expect(value).toBeFalsy();
|
|
||||||
done();
|
|
||||||
})
|
|
||||||
.catch(catchErrors(done));
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should uncheck the invoiceByMail checkbox', done => {
|
|
||||||
nightmare
|
|
||||||
.waitToClick(selectors.fiscalData.invoiceByMailCheckboxLabel)
|
|
||||||
.waitToClick(selectors.fiscalData.saveButton)
|
|
||||||
.wait(selectors.globalItems.snackbarIsActive)
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
.getInnerText(selectors.globalItems.snackbarIsActive)
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
|
@ -116,28 +159,28 @@ describe('Edit fiscalData path', () => {
|
||||||
.catch(catchErrors(done));
|
.catch(catchErrors(done));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm invoiceByMail checkbox is unchecked', done => {
|
it('should confirm Equalization tax checkbox is unchecked', done => {
|
||||||
nightmare
|
nightmare
|
||||||
.waitForSnackbarReset()
|
.waitForSnackbarReset()
|
||||||
.waitToClick(selectors.basicData.basicDataButton)
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
.wait(selectors.basicData.nameInput)
|
.wait(selectors.basicData.nameInput)
|
||||||
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
.wait(selectors.fiscalData.invoiceByMailCheckboxLabel)
|
.wait(selectors.fiscalData.equalizationTaxCheckboxLabel)
|
||||||
.evaluate(selector => {
|
.evaluate(selector => {
|
||||||
return document.querySelector(selector).checked;
|
return document.querySelector(selector).checked;
|
||||||
}, selectors.fiscalData.invoiceByMailCheckboxLabel)
|
}, selectors.fiscalData.equalizationTaxCheckboxLabel)
|
||||||
.then(value => {
|
.then(value => {
|
||||||
expect(value).toBeFalsy();
|
expect(value).toBeFalsy();
|
||||||
done();
|
done();
|
||||||
})
|
})
|
||||||
.catch(catchErrors(done));
|
.catch(catchErrors(done));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit the address', done => {
|
it('should edit the address', done => {
|
||||||
nightmare
|
nightmare
|
||||||
.wait(selectors.fiscalData.addressInput)
|
.wait(selectors.fiscalData.addressInput)
|
||||||
.clearInput(selectors.fiscalData.addressInput)
|
.clearInput(selectors.fiscalData.addressInput)
|
||||||
.type(selectors.fiscalData.addressInput, 'Alpha Flight Low-Orbit')
|
.type(selectors.fiscalData.addressInput, 'Somewhere in New York edited')
|
||||||
.click(selectors.fiscalData.saveButton)
|
.click(selectors.fiscalData.saveButton)
|
||||||
.wait(selectors.globalItems.snackbarIsActive)
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
.getInnerText(selectors.globalItems.snackbarIsActive)
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
@ -157,7 +200,7 @@ describe('Edit fiscalData path', () => {
|
||||||
.wait(selectors.fiscalData.addressInput)
|
.wait(selectors.fiscalData.addressInput)
|
||||||
.getInputValue(selectors.fiscalData.addressInput)
|
.getInputValue(selectors.fiscalData.addressInput)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Alpha Flight Low-Orbit');
|
expect(result).toEqual('Somewhere in New York edited');
|
||||||
done();
|
done();
|
||||||
})
|
})
|
||||||
.catch(catchErrors(done));
|
.catch(catchErrors(done));
|
||||||
|
@ -227,6 +270,7 @@ describe('Edit fiscalData path', () => {
|
||||||
nightmare
|
nightmare
|
||||||
.waitToClick(selectors.fiscalData.provinceInput)
|
.waitToClick(selectors.fiscalData.provinceInput)
|
||||||
.waitToClick(selectors.fiscalData.provinceFifthOption)
|
.waitToClick(selectors.fiscalData.provinceFifthOption)
|
||||||
|
.wait(200)
|
||||||
.waitToClick(selectors.fiscalData.saveButton)
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
.wait(selectors.globalItems.snackbarIsActive)
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
.getInnerText(selectors.globalItems.snackbarIsActive)
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
@ -243,7 +287,7 @@ describe('Edit fiscalData path', () => {
|
||||||
.click(selectors.basicData.basicDataButton)
|
.click(selectors.basicData.basicDataButton)
|
||||||
.wait(selectors.basicData.nameInput)
|
.wait(selectors.basicData.nameInput)
|
||||||
.click(selectors.fiscalData.fiscalDataButton)
|
.click(selectors.fiscalData.fiscalDataButton)
|
||||||
.wait(100)
|
.wait(200)
|
||||||
.getInputValue(selectors.fiscalData.provinceInput)
|
.getInputValue(selectors.fiscalData.provinceInput)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Province two');
|
expect(result).toEqual('Province two');
|
||||||
|
@ -256,6 +300,7 @@ describe('Edit fiscalData path', () => {
|
||||||
nightmare
|
nightmare
|
||||||
.waitToClick(selectors.fiscalData.countryInput)
|
.waitToClick(selectors.fiscalData.countryInput)
|
||||||
.waitToClick(selectors.fiscalData.countryThirdOption)
|
.waitToClick(selectors.fiscalData.countryThirdOption)
|
||||||
|
.wait(200)
|
||||||
.waitToClick(selectors.fiscalData.saveButton)
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
.wait(selectors.globalItems.snackbarIsActive)
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
.getInnerText(selectors.globalItems.snackbarIsActive)
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
@ -269,10 +314,10 @@ describe('Edit fiscalData path', () => {
|
||||||
it(`should confirm the country have been selected`, done => {
|
it(`should confirm the country have been selected`, done => {
|
||||||
nightmare
|
nightmare
|
||||||
.waitForSnackbarReset()
|
.waitForSnackbarReset()
|
||||||
|
.click(selectors.basicData.basicDataButton)
|
||||||
|
.wait(selectors.basicData.nameInput)
|
||||||
.click(selectors.fiscalData.fiscalDataButton)
|
.click(selectors.fiscalData.fiscalDataButton)
|
||||||
.wait(selectors.fiscalData.addressInput)
|
.wait(200)
|
||||||
.click(selectors.fiscalData.basicDataButton)
|
|
||||||
.wait(100)
|
|
||||||
.getInputValue(selectors.fiscalData.countryInput)
|
.getInputValue(selectors.fiscalData.countryInput)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Holanda');
|
expect(result).toEqual('Holanda');
|
||||||
|
@ -280,4 +325,184 @@ describe('Edit fiscalData path', () => {
|
||||||
})
|
})
|
||||||
.catch(catchErrors(done));
|
.catch(catchErrors(done));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should uncheck the active checkbox', done => {
|
||||||
|
nightmare
|
||||||
|
.waitToClick(selectors.fiscalData.activeCheckboxLabel)
|
||||||
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual('¡Datos guardados!');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm active checkbox is unchecked', done => {
|
||||||
|
nightmare
|
||||||
|
.waitForSnackbarReset()
|
||||||
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
|
.wait(selectors.basicData.nameInput)
|
||||||
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
|
.wait(selectors.fiscalData.activeCheckboxLabel)
|
||||||
|
.evaluate(selector => {
|
||||||
|
return document.querySelector(selector).checked;
|
||||||
|
}, selectors.fiscalData.activeCheckboxLabel)
|
||||||
|
.then(value => {
|
||||||
|
expect(value).toBeFalsy();
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should check the invoice by address checkbox', done => {
|
||||||
|
nightmare
|
||||||
|
.waitToClick(selectors.fiscalData.invoiceByAddressCheckboxInput)
|
||||||
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual('¡Datos guardados!');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm invoice by address checkbox is checked', done => {
|
||||||
|
nightmare
|
||||||
|
.waitForSnackbarReset()
|
||||||
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
|
.wait(selectors.basicData.nameInput)
|
||||||
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
|
.wait(selectors.fiscalData.invoiceByAddressCheckboxInput)
|
||||||
|
.evaluate(selector => {
|
||||||
|
return document.querySelector(selector).checked;
|
||||||
|
}, selectors.fiscalData.invoiceByAddressCheckboxInput)
|
||||||
|
.then(value => {
|
||||||
|
expect(value).toBeTruthy();
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should check the Verified data checkbox', done => {
|
||||||
|
nightmare
|
||||||
|
.waitToClick(selectors.fiscalData.verifiedDataCheckboxInput)
|
||||||
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual('¡Datos guardados!');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm Verified data checkbox is checked', done => {
|
||||||
|
nightmare
|
||||||
|
.waitForSnackbarReset()
|
||||||
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
|
.wait(selectors.basicData.nameInput)
|
||||||
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
|
.wait(selectors.fiscalData.verifiedDataCheckboxInput)
|
||||||
|
.evaluate(selector => {
|
||||||
|
return document.querySelector(selector).checked;
|
||||||
|
}, selectors.fiscalData.verifiedDataCheckboxInput)
|
||||||
|
.then(value => {
|
||||||
|
expect(value).toBeTruthy();
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should uncheck the Has to invoice checkbox', done => {
|
||||||
|
nightmare
|
||||||
|
.waitToClick(selectors.fiscalData.hasToInvoiceCheckboxLabel)
|
||||||
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual('¡Datos guardados!');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm Has to invoice checkbox is unchecked', done => {
|
||||||
|
nightmare
|
||||||
|
.waitForSnackbarReset()
|
||||||
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
|
.wait(selectors.basicData.nameInput)
|
||||||
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
|
.wait(selectors.fiscalData.hasToInvoiceCheckboxLabel)
|
||||||
|
.evaluate(selector => {
|
||||||
|
return document.querySelector(selector).checked;
|
||||||
|
}, selectors.fiscalData.hasToInvoiceCheckboxLabel)
|
||||||
|
.then(value => {
|
||||||
|
expect(value).toBeFalsy();
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should uncheck the Invoice by mail checkbox', done => {
|
||||||
|
nightmare
|
||||||
|
.waitToClick(selectors.fiscalData.invoiceByMailCheckboxLabel)
|
||||||
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual('¡Datos guardados!');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm Invoice by mail checkbox is unchecked', done => {
|
||||||
|
nightmare
|
||||||
|
.waitForSnackbarReset()
|
||||||
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
|
.wait(selectors.basicData.nameInput)
|
||||||
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
|
.wait(selectors.fiscalData.invoiceByMailCheckboxLabel)
|
||||||
|
.evaluate(selector => {
|
||||||
|
return document.querySelector(selector).checked;
|
||||||
|
}, selectors.fiscalData.invoiceByMailCheckboxLabel)
|
||||||
|
.then(value => {
|
||||||
|
expect(value).toBeFalsy();
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should check the Vies checkbox', done => {
|
||||||
|
nightmare
|
||||||
|
.waitToClick(selectors.fiscalData.viesCheckboxInput)
|
||||||
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual('¡Datos guardados!');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm Vies checkbox is checked', done => {
|
||||||
|
nightmare
|
||||||
|
.waitForSnackbarReset()
|
||||||
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
|
.wait(selectors.basicData.nameInput)
|
||||||
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
|
.wait(selectors.fiscalData.viesCheckboxInput)
|
||||||
|
.evaluate(selector => {
|
||||||
|
return document.querySelector(selector).checked;
|
||||||
|
}, selectors.fiscalData.viesCheckboxInput)
|
||||||
|
.then(value => {
|
||||||
|
expect(value).toBeTruthy();
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue