From 52a325798d41f587ddc276ebd01a09ab0e7545e3 Mon Sep 17 00:00:00 2001 From: Carlos Date: Mon, 6 Nov 2017 10:46:32 +0100 Subject: [PATCH] e2e small refactor --- e2e/helpers/selectors.js | 7 ++++--- e2e/paths/edit_fiscal_data.spec.js | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index c4deb0d94b..1b74ac9bad 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -48,9 +48,10 @@ export default { fiscalData: { fiscalDataButton: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-empty > vn-left-menu > vn-card > div > vn-vertical > vn-actions > vn-horizontal > ul > vn-menu-item:nth-child(2) > li > a', addressInput: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(3) > vn-textfield:nth-child(1) > div > input', - hastToInvoiceCheckboxLabel: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(2) > vn-one:nth-child(1) > vn-check > label', - hastToInvoiceCheckboxInput: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(2) > vn-one:nth-child(1) > vn-check > label > input', - invoiceByMailCheckbox: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(2) > vn-check:nth-child(2) > label > span.mdl-checkbox__ripple-container.mdl-js-ripple-effect.mdl-ripple--center', + hasToInvoiceCheckboxLabel: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(2) > vn-one:nth-child(1) > vn-check > label', + hasToInvoiceCheckboxInput: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(2) > vn-one:nth-child(1) > vn-check > label > input', + printToInvoiceCheckboxLabel: '', + printInvoiceCheckboxInput: '', saveButton: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-button-bar > vn-submit > input' } }; diff --git a/e2e/paths/edit_fiscal_data.spec.js b/e2e/paths/edit_fiscal_data.spec.js index 32662edddf..3dcea55a03 100644 --- a/e2e/paths/edit_fiscal_data.spec.js +++ b/e2e/paths/edit_fiscal_data.spec.js @@ -75,7 +75,7 @@ describe('Edit fiscalData path', () => { it(`should uncheck the hasToInvoice checkbox`, done => { nightmare - .waitToClick(selectors.fiscalData.hastToInvoiceCheckboxLabel) + .waitToClick(selectors.fiscalData.hasToInvoiceCheckboxLabel) .waitToClick(selectors.fiscalData.saveButton) .wait(selectors.globalItems.snackbarIsActive) .getInnerText(selectors.globalItems.snackbarIsActive) @@ -92,10 +92,10 @@ describe('Edit fiscalData path', () => { .waitToClick(selectors.basicData.basicDataButton) .wait(selectors.basicData.nameInput) .waitToClick(selectors.fiscalData.fiscalDataButton) - .wait(selectors.fiscalData.hastToInvoiceCheckboxLabel) + .wait(selectors.fiscalData.hasToInvoiceCheckboxLabel) .evaluate(selector => { return document.querySelector(selector).checked; - }, selectors.fiscalData.hastToInvoiceCheckboxInput) + }, selectors.fiscalData.hasToInvoiceCheckboxInput) .then(value => { expect(value).toBeFalsy(); done();