e2e create client path -basic data form tests but sales person

This commit is contained in:
Carlos 2017-10-31 12:00:46 +01:00
parent b049d8832f
commit 914ba9d1f4
1 changed files with 108 additions and 1 deletions

View File

@ -279,6 +279,21 @@ describe('Clients path', () => {
.catch(catchErrors(done)); .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 => { it(`should edit the social name`, done => {
nightmare nightmare
.wait(selectors.basicData.socialNameInput) .wait(selectors.basicData.socialNameInput)
@ -294,6 +309,21 @@ describe('Clients path', () => {
.catch(catchErrors(done)); .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 => { it(`should add the landline phone number`, done => {
nightmare nightmare
.wait(selectors.basicData.phoneInput) .wait(selectors.basicData.phoneInput)
@ -308,6 +338,21 @@ describe('Clients path', () => {
.catch(catchErrors(done)); .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 => { it(`should add the mobile phone number`, done => {
nightmare nightmare
.wait(selectors.basicData.mobileInput) .wait(selectors.basicData.mobileInput)
@ -322,6 +367,21 @@ describe('Clients path', () => {
.catch(catchErrors(done)); .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 => { it(`should add the fax number`, done => {
nightmare nightmare
.wait(selectors.basicData.faxInput) .wait(selectors.basicData.faxInput)
@ -336,6 +396,21 @@ describe('Clients path', () => {
.catch(catchErrors(done)); .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 => { it(`should edit the email`, done => {
nightmare nightmare
.wait(selectors.basicData.emailInput) .wait(selectors.basicData.emailInput)
@ -351,6 +426,21 @@ describe('Clients path', () => {
.catch(catchErrors(done)); .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 => { // it(`should select the sales person`, done => {
// nightmare // nightmare
// .wait(selectors.basicData.salesPersonInput) // .wait(selectors.basicData.salesPersonInput)
@ -368,7 +458,9 @@ describe('Clients path', () => {
it(`should select the channel`, done => { it(`should select the channel`, done => {
nightmare nightmare
.wait(selectors.basicData.channelInput) .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) .click(selectors.basicData.saveButton)
.wait(selectors.globalItems.snackbarIsActive) .wait(selectors.globalItems.snackbarIsActive)
.getInnerText(selectors.globalItems.snackbarIsActive) .getInnerText(selectors.globalItems.snackbarIsActive)
@ -378,5 +470,20 @@ describe('Clients path', () => {
}) })
.catch(catchErrors(done)); .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));
});
}); });
}); });