e2e test
This commit is contained in:
parent
6ea0f05054
commit
602d0a74bd
|
@ -56,7 +56,9 @@ export default {
|
|||
cityInput: `${components.vnTextfield}[name="city"]`,
|
||||
postcodeInput: `${components.vnTextfield}[name="postcode"]`,
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
|
|
@ -299,7 +299,6 @@ describe('Edit basicData path', () => {
|
|||
it('should select the channel', done => {
|
||||
nightmare
|
||||
.waitToClick(selectors.basicData.channelInput)
|
||||
.waitToClick(selectors.basicData.channelInput)
|
||||
.waitToClick(selectors.basicData.channelMetropolisOption)
|
||||
.waitToClick(selectors.basicData.saveButton)
|
||||
.wait(selectors.globalItems.snackbarIsActive)
|
||||
|
|
|
@ -5,7 +5,7 @@ import {catchErrors} from '../../services/utils/jasmineHelpers';
|
|||
const nightmare = createNightmare();
|
||||
const moduleAccessViewHashURL = '#!/';
|
||||
|
||||
describe('Edit fiscalData path', () => {
|
||||
fdescribe('Edit fiscalData path', () => {
|
||||
describe('warm up', () => {
|
||||
it('should warm up login and fixtures', done => {
|
||||
nightmare
|
||||
|
@ -223,33 +223,62 @@ describe('Edit fiscalData path', () => {
|
|||
.catch(catchErrors(done));
|
||||
});
|
||||
|
||||
// it(`should edit the province`, done => {
|
||||
// nightmare
|
||||
// .waitToClick(selectors.fiscalData.provinceInput)
|
||||
// .waitToClick(selectors.fiscalData.provinceInput)
|
||||
// .waitToClick(selectors.fiscalData.provinceMetropolisOption)
|
||||
// .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 edit the province`, done => {
|
||||
nightmare
|
||||
.waitToClick(selectors.fiscalData.provinceInput)
|
||||
.waitToClick(selectors.fiscalData.provinceFifthOption)
|
||||
.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 province have been selected`, done => {
|
||||
// nightmare
|
||||
// .waitForSnackbarReset()
|
||||
// .click(selectors.fiscalData.fiscalDataButton)
|
||||
// .wait(selectors.fiscalData.addressInput)
|
||||
// .click(selectors.fiscalData.basicDataButton)
|
||||
// .wait(100)
|
||||
// .getInputValue(selectors.fiscalData.provinceInput)
|
||||
// .then(result => {
|
||||
// expect(result).toEqual('Province two');
|
||||
// done();
|
||||
// })
|
||||
// .catch(catchErrors(done));
|
||||
// });
|
||||
it(`should confirm the province have been selected`, done => {
|
||||
nightmare
|
||||
.waitForSnackbarReset()
|
||||
.waitToClick(selectors.basicData.basicDataButton)
|
||||
.wait(selectors.basicData.nameInput)
|
||||
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||
.wait(selectors.fiscalData.addressInput)
|
||||
.wait(100)
|
||||
.getInputValue(selectors.fiscalData.provinceInput)
|
||||
.then(result => {
|
||||
expect(result).toEqual('Province two');
|
||||
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