e2e fiscal data path updated to test frozen checkBox

This commit is contained in:
Carlos Jimenez 2018-03-20 08:28:30 +01:00
parent e08fd21f4c
commit c866d28367
2 changed files with 14 additions and 2 deletions

View File

@ -57,9 +57,10 @@ export default {
provinceFifthOption: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] vn-drop-down ul > li:nth-child(5)`, provinceFifthOption: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] vn-drop-down ul > li:nth-child(5)`,
countryInput: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] input`, countryInput: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] input`,
countryThirdOption: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] vn-drop-down ul > li:nth-child(3)`, countryThirdOption: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] vn-drop-down ul > li:nth-child(3)`,
activeCheckboxLabel: `${components.vnCheck}[label='Active'] > label`, activeCheckboxLabel: `${components.vnCheck}[label="Active"] > label`,
frozenCheckboxLabel: `${components.vnCheck}[label="Frozen"] > label`,
invoiceByAddressCheckboxInput: `${components.vnCheck}[label='Invoice by address'] > label > input`, invoiceByAddressCheckboxInput: `${components.vnCheck}[label='Invoice by address'] > label > input`,
verifiedDataCheckboxInput: `${components.vnCheck}[label='Verified data'] > label > input`, verifiedDataCheckboxInput: `${components.vnCheck}[label="Verified data"] > label > input`,
hasToInvoiceCheckboxLabel: `${components.vnCheck}[label='Has to invoice'] > label`, hasToInvoiceCheckboxLabel: `${components.vnCheck}[label='Has to invoice'] > label`,
invoiceByMailCheckboxLabel: `${components.vnCheck}[label='Invoice by mail'] > label`, invoiceByMailCheckboxLabel: `${components.vnCheck}[label='Invoice by mail'] > label`,
viesCheckboxInput: `${components.vnCheck}[label='Vies'] > label > input`, viesCheckboxInput: `${components.vnCheck}[label='Vies'] > label > input`,

View File

@ -99,6 +99,7 @@ describe('Edit fiscalData path', () => {
.waitToClick(selectors.clientFiscalData.provinceInput) .waitToClick(selectors.clientFiscalData.provinceInput)
.waitToClick(selectors.clientFiscalData.provinceFifthOption) .waitToClick(selectors.clientFiscalData.provinceFifthOption)
.waitToClick(selectors.clientFiscalData.activeCheckboxLabel) .waitToClick(selectors.clientFiscalData.activeCheckboxLabel)
.waitToClick(selectors.clientFiscalData.frozenCheckboxLabel)
.waitToClick(selectors.clientFiscalData.invoiceByAddressCheckboxInput) .waitToClick(selectors.clientFiscalData.invoiceByAddressCheckboxInput)
.waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput) .waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput)
.waitToClick(selectors.clientFiscalData.hasToInvoiceCheckboxLabel) .waitToClick(selectors.clientFiscalData.hasToInvoiceCheckboxLabel)
@ -227,6 +228,16 @@ describe('Edit fiscalData path', () => {
}); });
}); });
it('should confirm frozen checkbox is unchecked', () => {
return nightmare
.evaluate(selector => {
return document.querySelector(selector).checked;
}, selectors.clientFiscalData.frozenCheckboxLabel)
.then(value => {
expect(value).toBeFalsy();
});
});
it('should confirm invoice by address checkbox is unchecked', () => { it('should confirm invoice by address checkbox is unchecked', () => {
return nightmare return nightmare
.evaluate(selector => { .evaluate(selector => {