e2e test
This commit is contained in:
parent
6ea0f05054
commit
602d0a74bd
|
@ -56,7 +56,9 @@ export default {
|
||||||
cityInput: `${components.vnTextfield}[name="city"]`,
|
cityInput: `${components.vnTextfield}[name="city"]`,
|
||||||
postcodeInput: `${components.vnTextfield}[name="postcode"]`,
|
postcodeInput: `${components.vnTextfield}[name="postcode"]`,
|
||||||
provinceInput: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] > vn-vertical > ${components.vnTextfield}`,
|
provinceInput: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] > vn-vertical > ${components.vnTextfield}`,
|
||||||
provinceFifthOption: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] > vn-vertical > vn-drop-down > vn-vertical > vn-one:nth-child(2) > ul > li:nth-child(5)`,
|
provinceFifthOption: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] > vn-vertical > vn-drop-down > vn-vertical > vn-one:nth-child(1) > ul > li:nth-child(5)`,
|
||||||
|
countryInput: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] > vn-vertical > ${components.vnTextfield}`,
|
||||||
|
countryThirdOption: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] > 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-fiscal-data > form > vn-button-bar > vn-submit > input'
|
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'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -299,7 +299,6 @@ describe('Edit basicData path', () => {
|
||||||
it('should select the channel', done => {
|
it('should select the channel', done => {
|
||||||
nightmare
|
nightmare
|
||||||
.waitToClick(selectors.basicData.channelInput)
|
.waitToClick(selectors.basicData.channelInput)
|
||||||
.waitToClick(selectors.basicData.channelInput)
|
|
||||||
.waitToClick(selectors.basicData.channelMetropolisOption)
|
.waitToClick(selectors.basicData.channelMetropolisOption)
|
||||||
.waitToClick(selectors.basicData.saveButton)
|
.waitToClick(selectors.basicData.saveButton)
|
||||||
.wait(selectors.globalItems.snackbarIsActive)
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {catchErrors} from '../../services/utils/jasmineHelpers';
|
||||||
const nightmare = createNightmare();
|
const nightmare = createNightmare();
|
||||||
const moduleAccessViewHashURL = '#!/';
|
const moduleAccessViewHashURL = '#!/';
|
||||||
|
|
||||||
describe('Edit fiscalData path', () => {
|
fdescribe('Edit fiscalData path', () => {
|
||||||
describe('warm up', () => {
|
describe('warm up', () => {
|
||||||
it('should warm up login and fixtures', done => {
|
it('should warm up login and fixtures', done => {
|
||||||
nightmare
|
nightmare
|
||||||
|
@ -223,33 +223,62 @@ describe('Edit fiscalData path', () => {
|
||||||
.catch(catchErrors(done));
|
.catch(catchErrors(done));
|
||||||
});
|
});
|
||||||
|
|
||||||
// it(`should edit the province`, done => {
|
it(`should edit the province`, done => {
|
||||||
// nightmare
|
nightmare
|
||||||
// .waitToClick(selectors.fiscalData.provinceInput)
|
.waitToClick(selectors.fiscalData.provinceInput)
|
||||||
// .waitToClick(selectors.fiscalData.provinceInput)
|
.waitToClick(selectors.fiscalData.provinceFifthOption)
|
||||||
// .waitToClick(selectors.fiscalData.provinceMetropolisOption)
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
// .waitToClick(selectors.fiscalData.saveButton)
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
// .wait(selectors.globalItems.snackbarIsActive)
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
// .getInnerText(selectors.globalItems.snackbarIsActive)
|
.then(result => {
|
||||||
// .then(result => {
|
expect(result).toEqual(`¡Datos guardados!`);
|
||||||
// expect(result).toEqual(`¡Datos guardados!`);
|
done();
|
||||||
// done();
|
})
|
||||||
// })
|
.catch(catchErrors(done));
|
||||||
// .catch(catchErrors(done));
|
});
|
||||||
// });
|
|
||||||
|
|
||||||
// it(`should confirm the province have been selected`, done => {
|
it(`should confirm the province have been selected`, done => {
|
||||||
// nightmare
|
nightmare
|
||||||
// .waitForSnackbarReset()
|
.waitForSnackbarReset()
|
||||||
// .click(selectors.fiscalData.fiscalDataButton)
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
// .wait(selectors.fiscalData.addressInput)
|
.wait(selectors.basicData.nameInput)
|
||||||
// .click(selectors.fiscalData.basicDataButton)
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
// .wait(100)
|
.wait(selectors.fiscalData.addressInput)
|
||||||
// .getInputValue(selectors.fiscalData.provinceInput)
|
.wait(100)
|
||||||
// .then(result => {
|
.getInputValue(selectors.fiscalData.provinceInput)
|
||||||
// expect(result).toEqual('Province two');
|
.then(result => {
|
||||||
// done();
|
expect(result).toEqual('Province two');
|
||||||
// })
|
done();
|
||||||
// .catch(catchErrors(done));
|
})
|
||||||
// });
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should edit the country`, done => {
|
||||||
|
nightmare
|
||||||
|
.waitToClick(selectors.fiscalData.countryInput)
|
||||||
|
.waitToClick(selectors.fiscalData.countryThirdOption)
|
||||||
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual(`¡Datos guardados!`);
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should confirm the country have been selected`, done => {
|
||||||
|
nightmare
|
||||||
|
.waitForSnackbarReset()
|
||||||
|
.click(selectors.fiscalData.fiscalDataButton)
|
||||||
|
.wait(selectors.fiscalData.addressInput)
|
||||||
|
.click(selectors.fiscalData.basicDataButton)
|
||||||
|
.wait(100)
|
||||||
|
.getInputValue(selectors.fiscalData.countryInput)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual('Holanda');
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue