diff --git a/e2e/paths/create_client_path.spec.js b/e2e/paths/create_client_path.spec.js index bafd5f3d0..48f7c2e9a 100644 --- a/e2e/paths/create_client_path.spec.js +++ b/e2e/paths/create_client_path.spec.js @@ -279,6 +279,21 @@ describe('Clients path', () => { .catch(catchErrors(done)); }); + it(`should confirm the tax number have been edited`, done => { + nightmare + .waitForSnackbarReset() + .click(selectors.fiscalData.fiscalDataButton) + .wait(selectors.fiscalData.addressInput) + .click(selectors.basicData.basicDataButton) + .wait(selectors.basicData.taxNumberInput) + .getInputValue(selectors.basicData.taxNumberInput) + .then(result => { + expect(result).toBe(`AVG tax Edited`); + done(); + }) + .catch(catchErrors(done)); + }); + it(`should edit the social name`, done => { nightmare .wait(selectors.basicData.socialNameInput) @@ -294,6 +309,21 @@ describe('Clients path', () => { .catch(catchErrors(done)); }); + it(`should confirm the social name have been edited`, done => { + nightmare + .waitForSnackbarReset() + .click(selectors.fiscalData.fiscalDataButton) + .wait(selectors.fiscalData.addressInput) + .click(selectors.basicData.basicDataButton) + .wait(selectors.basicData.socialNameInput) + .getInputValue(selectors.basicData.socialNameInput) + .then(result => { + expect(result).toBe(`Avengers Team Edited`); + done(); + }) + .catch(catchErrors(done)); + }); + it(`should add the landline phone number`, done => { nightmare .wait(selectors.basicData.phoneInput) @@ -308,6 +338,21 @@ describe('Clients path', () => { .catch(catchErrors(done)); }); + it(`should confirm the landline phone number have been added`, done => { + nightmare + .waitForSnackbarReset() + .click(selectors.fiscalData.fiscalDataButton) + .wait(selectors.fiscalData.addressInput) + .click(selectors.basicData.basicDataButton) + .wait(selectors.basicData.phoneInput) + .getInputValue(selectors.basicData.phoneInput) + .then(result => { + expect(result).toBe('123456789'); + done(); + }) + .catch(catchErrors(done)); + }); + it(`should add the mobile phone number`, done => { nightmare .wait(selectors.basicData.mobileInput) @@ -322,6 +367,21 @@ describe('Clients path', () => { .catch(catchErrors(done)); }); + it(`should confirm the mobile phone number have been added`, done => { + nightmare + .waitForSnackbarReset() + .click(selectors.fiscalData.fiscalDataButton) + .wait(selectors.fiscalData.addressInput) + .click(selectors.basicData.basicDataButton) + .wait(selectors.basicData.mobileInput) + .getInputValue(selectors.basicData.mobileInput) + .then(result => { + expect(result).toBe('987654321'); + done(); + }) + .catch(catchErrors(done)); + }); + it(`should add the fax number`, done => { nightmare .wait(selectors.basicData.faxInput) @@ -336,6 +396,21 @@ describe('Clients path', () => { .catch(catchErrors(done)); }); + it(`should confirm the fax number have been added`, done => { + nightmare + .waitForSnackbarReset() + .click(selectors.fiscalData.fiscalDataButton) + .wait(selectors.fiscalData.addressInput) + .click(selectors.basicData.basicDataButton) + .wait(selectors.basicData.faxInput) + .getInputValue(selectors.basicData.faxInput) + .then(result => { + expect(result).toBe('432198765'); + done(); + }) + .catch(catchErrors(done)); + }); + it(`should edit the email`, done => { nightmare .wait(selectors.basicData.emailInput) @@ -351,6 +426,21 @@ describe('Clients path', () => { .catch(catchErrors(done)); }); + it(`should confirm the email have been edited`, done => { + nightmare + .waitForSnackbarReset() + .click(selectors.fiscalData.fiscalDataButton) + .wait(selectors.fiscalData.addressInput) + .click(selectors.basicData.basicDataButton) + .wait(selectors.basicData.emailInput) + .getInputValue(selectors.basicData.emailInput) + .then(result => { + expect(result).toBe('CarolDanversEdited@verdnatura.es'); + done(); + }) + .catch(catchErrors(done)); + }); + // it(`should select the sales person`, done => { // nightmare // .wait(selectors.basicData.salesPersonInput) @@ -368,7 +458,9 @@ describe('Clients path', () => { it(`should select the channel`, done => { nightmare .wait(selectors.basicData.channelInput) - .select(selectors.basicData.channelInput, 'The Newspaper') + .click(selectors.basicData.channelInput) + .click(selectors.basicData.channelInput) + .waitToClick('body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-basic-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(4) > vn-autocomplete:nth-child(3) > vn-vertical > vn-drop-down > vn-vertical > vn-one:nth-child(2) > ul > li:nth-child(3)') .click(selectors.basicData.saveButton) .wait(selectors.globalItems.snackbarIsActive) .getInnerText(selectors.globalItems.snackbarIsActive) @@ -378,5 +470,20 @@ describe('Clients path', () => { }) .catch(catchErrors(done)); }); + + it(`should confirm the channe; have been selected`, done => { + nightmare + .waitForSnackbarReset() + .click(selectors.fiscalData.fiscalDataButton) + .wait(selectors.fiscalData.addressInput) + .click(selectors.basicData.basicDataButton) + .wait(selectors.basicData.channelInput) + .getInputValue(selectors.basicData.channelInput) + .then(result => { + expect(result).toBe('Metropolis newspaper'); + done(); + }) + .catch(catchErrors(done)); + }); }); });