create client path now adds a sales person
This commit is contained in:
parent
c51d339732
commit
934a1bff49
|
@ -31,6 +31,8 @@ export default {
|
||||||
socialName: `${components.vnTextfield}[name="socialName"]`,
|
socialName: `${components.vnTextfield}[name="socialName"]`,
|
||||||
userName: `${components.vnTextfield}[name="userName"]`,
|
userName: `${components.vnTextfield}[name="userName"]`,
|
||||||
email: `${components.vnTextfield}[name="email"]`,
|
email: `${components.vnTextfield}[name="email"]`,
|
||||||
|
salesPersonInput: `${components.vnAutocomplete}[field="$ctrl.client.salesPersonFk"] > vn-vertical > ${components.vnTextfield}`,
|
||||||
|
salesBruceBannerOption: `${components.vnAutocomplete}[field="$ctrl.client.salesPersonFk"] > vn-vertical > vn-drop-down > vn-vertical:not(.ng-hide) > vn-auto:nth-child(2) > ul > li:nth-child(1)`,
|
||||||
createButton: `${components.vnSubmit}`
|
createButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
basicData: {
|
basicData: {
|
||||||
|
|
|
@ -179,6 +179,21 @@ describe('create client path', () => {
|
||||||
.catch(catchErrors(done));
|
.catch(catchErrors(done));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should receive an error when clicking the create button having all the form fields empty but sales person', done => {
|
||||||
|
nightmare
|
||||||
|
.waitToClick(selectors.createClientView.salesPersonInput)
|
||||||
|
.waitToClick(selectors.createClientView.salesBruceBannerOption)
|
||||||
|
.wait(200)
|
||||||
|
.click(selectors.createClientView.createButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toContain(`Error: La instancia`);
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
it(`should create a new user with all it's data`, done => {
|
it(`should create a new user with all it's data`, done => {
|
||||||
nightmare
|
nightmare
|
||||||
.waitForSnackbarReset()
|
.waitForSnackbarReset()
|
||||||
|
|
Loading…
Reference in New Issue