e2e testing fiscal data path up to country select

This commit is contained in:
Carlos 2017-11-13 08:36:15 +01:00
parent 602d0a74bd
commit c800034cc7
3 changed files with 7 additions and 8 deletions

View File

@ -56,9 +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(1) > ul > li:nth-child(5)`,
provinceFifthOption: `${components.vnAutocomplete}[field="$ctrl.client.provinceFk"] > vn-vertical > vn-drop-down > vn-vertical > vn-one:nth-child(2) > 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'
countryThirdOption: `${components.vnAutocomplete}[field="$ctrl.client.countryFk"] > vn-vertical > vn-drop-down > vn-vertical > vn-one:nth-child(3) > ul > li:nth-child(3)`,
saveButton: `${components.vnSubmit}`
}
};

View File

@ -316,7 +316,7 @@ describe('Edit basicData path', () => {
.click(selectors.fiscalData.fiscalDataButton)
.wait(selectors.fiscalData.addressInput)
.click(selectors.basicData.basicDataButton)
.wait(100)
.wait(selectors.basicData.basicDataButton)
.getInputValue(selectors.basicData.channelInput)
.then(result => {
expect(result).toEqual('Metropolis newspaper');

View File

@ -5,7 +5,7 @@ import {catchErrors} from '../../services/utils/jasmineHelpers';
const nightmare = createNightmare();
const moduleAccessViewHashURL = '#!/';
fdescribe('Edit fiscalData path', () => {
describe('Edit fiscalData path', () => {
describe('warm up', () => {
it('should warm up login and fixtures', done => {
nightmare
@ -240,10 +240,9 @@ fdescribe('Edit fiscalData path', () => {
it(`should confirm the province have been selected`, done => {
nightmare
.waitForSnackbarReset()
.waitToClick(selectors.basicData.basicDataButton)
.click(selectors.basicData.basicDataButton)
.wait(selectors.basicData.nameInput)
.waitToClick(selectors.fiscalData.fiscalDataButton)
.wait(selectors.fiscalData.addressInput)
.click(selectors.fiscalData.fiscalDataButton)
.wait(100)
.getInputValue(selectors.fiscalData.provinceInput)
.then(result => {