diff --git a/README.md b/README.md index 30f05b384..a8df77f6a 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,10 @@ npm run testWatch or test for single run on root run: +gulp docker + +wait 10 secs for db to be ready + npm run e2e ## Built With diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index bdff2be21..1c3e814ad 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -42,6 +42,7 @@ export default { emailInput: '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-textfield > div > input', salesPersonInput: '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(2) > vn-vertical > vn-textfield > div > input', channelInput: '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-textfield > div > input', + channelMetropolisOption: '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)', saveButton: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-basic-data > form > vn-button-bar > vn-submit > input' }, fiscalData: { diff --git a/e2e/paths/create_client_path.spec.js b/e2e/paths/create_client_path.spec.js index 48f7c2e9a..837921863 100644 --- a/e2e/paths/create_client_path.spec.js +++ b/e2e/paths/create_client_path.spec.js @@ -233,7 +233,8 @@ describe('Clients path', () => { }) .catch(catchErrors(done)); }); - + }); + describe('Basic Data', () => { it(`should edit the name`, done => { nightmare .wait(selectors.basicData.nameInput) @@ -457,11 +458,10 @@ describe('Clients path', () => { it(`should select the channel`, done => { nightmare - .wait(selectors.basicData.channelInput) - .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) + .waitToClick(selectors.basicData.channelInput) + .waitToClick(selectors.basicData.channelInput) + .waitToClick(selectors.basicData.channelMetropolisOption) + .waitToClick(selectors.basicData.saveButton) .wait(selectors.globalItems.snackbarIsActive) .getInnerText(selectors.globalItems.snackbarIsActive) .then(result => { @@ -471,13 +471,13 @@ describe('Clients path', () => { .catch(catchErrors(done)); }); - it(`should confirm the channe; have been selected`, done => { + it(`should confirm the channel have been selected`, done => { nightmare .waitForSnackbarReset() .click(selectors.fiscalData.fiscalDataButton) .wait(selectors.fiscalData.addressInput) .click(selectors.basicData.basicDataButton) - .wait(selectors.basicData.channelInput) + .wait(100) .getInputValue(selectors.basicData.channelInput) .then(result => { expect(result).toBe('Metropolis newspaper');