From c866d28367a56f885ed610ecf4f5470aefd0e538 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Tue, 20 Mar 2018 08:28:30 +0100 Subject: [PATCH] e2e fiscal data path updated to test frozen checkBox --- e2e/helpers/selectors.js | 5 +++-- e2e/paths/client-module/03_edit_fiscal_data.spec.js | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 0158b6e27..9acf8b1fe 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -57,9 +57,10 @@ export default { provinceFifthOption: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] vn-drop-down ul > li:nth-child(5)`, countryInput: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] input`, 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`, - verifiedDataCheckboxInput: `${components.vnCheck}[label='Verified data'] > 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`, diff --git a/e2e/paths/client-module/03_edit_fiscal_data.spec.js b/e2e/paths/client-module/03_edit_fiscal_data.spec.js index 099c422ab..5564bc51d 100644 --- a/e2e/paths/client-module/03_edit_fiscal_data.spec.js +++ b/e2e/paths/client-module/03_edit_fiscal_data.spec.js @@ -99,6 +99,7 @@ describe('Edit fiscalData path', () => { .waitToClick(selectors.clientFiscalData.provinceInput) .waitToClick(selectors.clientFiscalData.provinceFifthOption) .waitToClick(selectors.clientFiscalData.activeCheckboxLabel) + .waitToClick(selectors.clientFiscalData.frozenCheckboxLabel) .waitToClick(selectors.clientFiscalData.invoiceByAddressCheckboxInput) .waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput) .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', () => { return nightmare .evaluate(selector => {