#1798 Extensiones que trabajen sobre componentes
gitea/salix/1798-e2e-extensions There was a failure building this commit
Details
gitea/salix/1798-e2e-extensions There was a failure building this commit
Details
This commit is contained in:
parent
4d263765df
commit
dd9cd73dca
|
@ -27,9 +27,9 @@ let actions = {
|
||||||
let langSelector = '.user-popover vn-autocomplete[ng-model="$ctrl.lang"]';
|
let langSelector = '.user-popover vn-autocomplete[ng-model="$ctrl.lang"]';
|
||||||
|
|
||||||
await this.waitToClick('#user');
|
await this.waitToClick('#user');
|
||||||
await this.wait(langSelector);
|
await this.waitForSelector(`${langSelector} input`, {});
|
||||||
let lang = await this.waitToGetProperty(`${langSelector} input`, 'value');
|
|
||||||
|
|
||||||
|
let lang = await this.waitToGetProperty(langSelector, 'value');
|
||||||
if (lang !== 'English')
|
if (lang !== 'English')
|
||||||
await this.autocompleteSearch(langSelector, 'English');
|
await this.autocompleteSearch(langSelector, 'English');
|
||||||
|
|
||||||
|
@ -38,12 +38,12 @@ let actions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
doLogin: async function(userName, password = 'nightmare') {
|
doLogin: async function(userName, password = 'nightmare') {
|
||||||
await this.wait(`vn-login [ng-model="$ctrl.user"]`);
|
await this.waitForSelector(`vn-login vn-textfield[ng-model="$ctrl.user"]`, {visible: true});
|
||||||
await this.clearInput(`vn-login [ng-model="$ctrl.user"]`);
|
await this.clearInput(`vn-login vn-textfield[ng-model="$ctrl.user"]`);
|
||||||
await this.write(`vn-login [ng-model="$ctrl.user"]`, userName);
|
await this.write(`vn-login vn-textfield[ng-model="$ctrl.user"]`, userName);
|
||||||
await this.clearInput(`vn-login [ng-model="$ctrl.password"]`);
|
await this.clearInput(`vn-login vn-textfield[ng-model="$ctrl.password"]`);
|
||||||
await this.write(`vn-login [ng-model="$ctrl.password"]`, password);
|
await this.write(`vn-login vn-textfield[ng-model="$ctrl.password"]`, password);
|
||||||
await this.click('vn-login button[type=submit]');
|
await this.waitToClick('vn-login button[type=submit]');
|
||||||
},
|
},
|
||||||
|
|
||||||
login: async function(userName) {
|
login: async function(userName) {
|
||||||
|
@ -59,7 +59,7 @@ let actions = {
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.doLogin(userName);
|
await this.doLogin(userName);
|
||||||
await this.wait(() => {
|
await this.waitForFunction(() => {
|
||||||
return document.location.hash === '#!/';
|
return document.location.hash === '#!/';
|
||||||
}, {});
|
}, {});
|
||||||
await this.changeLanguageToEnglish();
|
await this.changeLanguageToEnglish();
|
||||||
|
@ -104,14 +104,14 @@ let actions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
clearTextarea: async function(selector) {
|
clearTextarea: async function(selector) {
|
||||||
await this.wait(selector);
|
await this.waitForSelector(selector, {visible: true});
|
||||||
await this.evaluate(inputSelector => {
|
await this.evaluate(inputSelector => {
|
||||||
return document.querySelector(inputSelector).value = '';
|
return document.querySelector(`${inputSelector} textarea`).value = '';
|
||||||
}, selector);
|
}, selector);
|
||||||
},
|
},
|
||||||
|
|
||||||
clearInput: async function(selector) {
|
clearInput: async function(selector) {
|
||||||
await this.wait(selector);
|
await this.waitForSelector(selector, {visible: true});
|
||||||
let field = await this.evaluate(selector => {
|
let field = await this.evaluate(selector => {
|
||||||
return document.querySelector(`${selector} input`).closest('.vn-field').$ctrl.field;
|
return document.querySelector(`${selector} input`).closest('.vn-field').$ctrl.field;
|
||||||
}, selector);
|
}, selector);
|
||||||
|
@ -136,7 +136,7 @@ let actions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
waitPropertyLength: async function(selector, property, minLength) {
|
waitPropertyLength: async function(selector, property, minLength) {
|
||||||
await this.wait((selector, property, minLength) => {
|
await this.waitForFunction((selector, property, minLength) => {
|
||||||
const element = document.querySelector(selector);
|
const element = document.querySelector(selector);
|
||||||
return element && element[property] != null && element[property] !== '' && element[property].length >= minLength;
|
return element && element[property] != null && element[property] !== '' && element[property].length >= minLength;
|
||||||
}, {}, selector, property, minLength);
|
}, {}, selector, property, minLength);
|
||||||
|
@ -152,22 +152,27 @@ let actions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
waitToGetProperty: async function(selector, property) {
|
waitToGetProperty: async function(selector, property) {
|
||||||
|
let builtSelector = selector;
|
||||||
|
if (property != 'innerText')
|
||||||
|
builtSelector = await this.selectorFormater(selector);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.waitForFunction((selector, property) => {
|
await this.waitForFunction((selector, property) => {
|
||||||
const element = document.querySelector(selector);
|
const element = document.querySelector(selector);
|
||||||
|
|
||||||
return element && element[property] != null && element[property] !== '';
|
return element && element[property] != null && element[property] !== '';
|
||||||
}, {}, selector, property);
|
}, {}, builtSelector, property);
|
||||||
return await this.getProperty(selector, property);
|
return await this.getProperty(builtSelector, property);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`couldn't get property: ${property} of ${selector}`);
|
throw new Error(`couldn't get property: ${property} of ${builtSelector}, ${error}`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
write: async function(selector, text) {
|
write: async function(selector, text) {
|
||||||
|
let builtSelector = await this.selectorFormater(selector);
|
||||||
await this.waitForSelector(selector, {});
|
await this.waitForSelector(selector, {});
|
||||||
await this.type(`${selector} input`, text);
|
await this.type(builtSelector, text);
|
||||||
await this.waitForTextInInput(selector, text);
|
await this.waitForTextInField(selector, text);
|
||||||
},
|
},
|
||||||
|
|
||||||
waitToClick: async function(selector) {
|
waitToClick: async function(selector) {
|
||||||
|
@ -280,11 +285,27 @@ let actions = {
|
||||||
}, {}, selector, text);
|
}, {}, selector, text);
|
||||||
},
|
},
|
||||||
|
|
||||||
waitForTextInInput: async function(selector, text) {
|
selectorFormater: async function(selector) {
|
||||||
await this.wait(selector);
|
let builtSelector = `${selector} input`;
|
||||||
return await this.wait((selector, text) => {
|
|
||||||
return document.querySelector(`${selector} input`).value.toLowerCase().includes(text.toLowerCase());
|
if (selector.includes('vn-autocomplete'))
|
||||||
}, {}, selector, text);
|
return builtSelector = `${selector} input`;
|
||||||
|
|
||||||
|
if (selector.includes('vn-textarea'))
|
||||||
|
return builtSelector = `${selector} textarea`;
|
||||||
|
|
||||||
|
if (selector.includes('vn-textfield'))
|
||||||
|
return builtSelector = `${selector} input`;
|
||||||
|
|
||||||
|
return builtSelector;
|
||||||
|
},
|
||||||
|
|
||||||
|
waitForTextInField: async function(selector, text) {
|
||||||
|
let builtSelector = await this.selectorFormater(selector);
|
||||||
|
await this.waitForSelector(builtSelector);
|
||||||
|
return await this.waitForFunction((selector, text) => {
|
||||||
|
return document.querySelector(selector).value.toLowerCase().includes(text.toLowerCase());
|
||||||
|
}, {}, builtSelector, text);
|
||||||
},
|
},
|
||||||
|
|
||||||
waitForInnerText: async function(selector) {
|
waitForInnerText: async function(selector) {
|
||||||
|
@ -305,9 +326,13 @@ let actions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
waitForURL: async function(hashURL) {
|
waitForURL: async function(hashURL) {
|
||||||
await this.waitForFunction(expectedHash => {
|
try {
|
||||||
return document.location.hash.includes(expectedHash);
|
await this.waitForFunction(expectedHash => {
|
||||||
}, {}, hashURL);
|
return document.location.hash.includes(expectedHash);
|
||||||
|
}, {}, hashURL);
|
||||||
|
} catch (error) {
|
||||||
|
throw new Error(`failed to reach URL containing: ${hashURL}`);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
hideSnackbar: async function() {
|
hideSnackbar: async function() {
|
||||||
|
@ -362,15 +387,16 @@ let actions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
autocompleteSearch: async function(selector, searchValue) {
|
autocompleteSearch: async function(selector, searchValue) {
|
||||||
|
let builtSelector = await this.selectorFormater(selector);
|
||||||
try {
|
try {
|
||||||
await this.waitToClick(`${selector} input`);
|
await this.waitToClick(builtSelector);
|
||||||
await this.waitForSelector(selector => {
|
await this.waitForSelector(selector => {
|
||||||
document
|
document
|
||||||
.querySelector(`${selector} vn-drop-down`).$ctrl.content
|
.querySelector(`${selector} vn-drop-down`).$ctrl.content
|
||||||
.querySelectorAll('li');
|
.querySelectorAll('li');
|
||||||
}, selector);
|
}, selector);
|
||||||
|
|
||||||
await this.write(`.vn-drop-down.shown`, searchValue);
|
await this.type(`.vn-drop-down.shown`, searchValue);
|
||||||
await this.waitForFunction((selector, searchValue) => {
|
await this.waitForFunction((selector, searchValue) => {
|
||||||
let element = document
|
let element = document
|
||||||
.querySelector(`${selector} vn-drop-down`).$ctrl.content
|
.querySelector(`${selector} vn-drop-down`).$ctrl.content
|
||||||
|
@ -381,11 +407,11 @@ let actions = {
|
||||||
|
|
||||||
await this.keyboard.press('Enter');
|
await this.keyboard.press('Enter');
|
||||||
await this.waitForFunction((selector, searchValue) => {
|
await this.waitForFunction((selector, searchValue) => {
|
||||||
return document.querySelector(`${selector} input`).value.toLowerCase()
|
return document.querySelector(selector).value.toLowerCase()
|
||||||
.includes(searchValue.toLowerCase());
|
.includes(searchValue.toLowerCase());
|
||||||
}, {}, selector, searchValue);
|
}, {}, builtSelector, searchValue);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`${selector} failed to autocomplete ${searchValue}! ${error}`);
|
throw new Error(`${builtSelector} failed to autocomplete ${searchValue}! ${error}`);
|
||||||
}
|
}
|
||||||
await this.waitForMutation(`.vn-drop-down`, 'childList');
|
await this.waitForMutation(`.vn-drop-down`, 'childList');
|
||||||
},
|
},
|
||||||
|
|
|
@ -542,7 +542,7 @@ export default {
|
||||||
claimBasicData: {
|
claimBasicData: {
|
||||||
claimStateAutocomplete: 'vn-claim-basic-data vn-autocomplete[ng-model="$ctrl.claim.claimStateFk"]',
|
claimStateAutocomplete: 'vn-claim-basic-data vn-autocomplete[ng-model="$ctrl.claim.claimStateFk"]',
|
||||||
responsabilityInputRange: 'vn-range',
|
responsabilityInputRange: 'vn-range',
|
||||||
observationInput: 'vn-textarea[ng-model="$ctrl.claim.observation"] textarea',
|
observationInput: 'vn-textarea[ng-model="$ctrl.claim.observation"]',
|
||||||
saveButton: `button[type=submit]`
|
saveButton: `button[type=submit]`
|
||||||
},
|
},
|
||||||
claimDetail: {
|
claimDetail: {
|
||||||
|
|
|
@ -79,13 +79,13 @@ describe('Client create path', async() => {
|
||||||
|
|
||||||
it(`should check for autocompleted city, province and country`, async() => {
|
it(`should check for autocompleted city, province and country`, async() => {
|
||||||
const clientCity = await page
|
const clientCity = await page
|
||||||
.waitToGetProperty(`${selectors.createClientView.city} input`, 'value');
|
.waitToGetProperty(selectors.createClientView.city, 'value');
|
||||||
|
|
||||||
const clientProvince = await page
|
const clientProvince = await page
|
||||||
.waitToGetProperty(`${selectors.createClientView.province} input`, 'value');
|
.waitToGetProperty(selectors.createClientView.province, 'value');
|
||||||
|
|
||||||
const clientCountry = await page
|
const clientCountry = await page
|
||||||
.waitToGetProperty(`${selectors.createClientView.country} input`, 'value');
|
.waitToGetProperty(selectors.createClientView.country, 'value');
|
||||||
|
|
||||||
expect(clientCity).toEqual('Valencia');
|
expect(clientCity).toEqual('Valencia');
|
||||||
expect(clientProvince).toEqual('Province one');
|
expect(clientProvince).toEqual('Province one');
|
||||||
|
|
|
@ -42,28 +42,28 @@ describe('Client Edit basicData path', () => {
|
||||||
|
|
||||||
it('should confirm the name have been edited', async() => {
|
it('should confirm the name have been edited', async() => {
|
||||||
await page.reloadSection('client.card.basicData');
|
await page.reloadSection('client.card.basicData');
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientBasicData.nameInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientBasicData.nameInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Ptonomy Wallace');
|
expect(result).toEqual('Ptonomy Wallace');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the contact name have been edited', async() => {
|
it('should confirm the contact name have been edited', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.clientBasicData.contactInput} input`, 'value');
|
.waitToGetProperty(selectors.clientBasicData.contactInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('David Haller');
|
expect(result).toEqual('David Haller');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the email have been edited', async() => {
|
it('should confirm the email have been edited', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.clientBasicData.emailInput} input`, 'value');
|
.waitToGetProperty(selectors.clientBasicData.emailInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('PWallace@verdnatura.es');
|
expect(result).toEqual('PWallace@verdnatura.es');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the channel have been selected', async() => {
|
it('should confirm the channel have been selected', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.clientBasicData.channelAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.clientBasicData.channelAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Rumors on the streets');
|
expect(result).toEqual('Rumors on the streets');
|
||||||
});
|
});
|
||||||
|
@ -102,35 +102,35 @@ describe('Client Edit basicData path', () => {
|
||||||
|
|
||||||
it('should now confirm the name have been edited', async() => {
|
it('should now confirm the name have been edited', async() => {
|
||||||
await page.reloadSection('client.card.basicData');
|
await page.reloadSection('client.card.basicData');
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientBasicData.nameInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientBasicData.nameInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Ororo Munroe');
|
expect(result).toEqual('Ororo Munroe');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now confirm the contact name have been edited', async() => {
|
it('should now confirm the contact name have been edited', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.clientBasicData.contactInput} input`, 'value');
|
.waitToGetProperty(selectors.clientBasicData.contactInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Black Panther');
|
expect(result).toEqual('Black Panther');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now confirm the email have been edited', async() => {
|
it('should now confirm the email have been edited', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.clientBasicData.emailInput} input`, 'value');
|
.waitToGetProperty(selectors.clientBasicData.emailInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Storm@verdnatura.es');
|
expect(result).toEqual('Storm@verdnatura.es');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the sales person have been selected', async() => {
|
it('should confirm the sales person have been selected', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.clientBasicData.salesPersonAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.clientBasicData.salesPersonAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('replenisherNick');
|
expect(result).toEqual('replenisherNick');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now confirm the channel have been selected', async() => {
|
it('should now confirm the channel have been selected', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.clientBasicData.channelAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.clientBasicData.channelAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Metropolis newspaper');
|
expect(result).toEqual('Metropolis newspaper');
|
||||||
});
|
});
|
||||||
|
|
|
@ -167,44 +167,44 @@ describe('Client Edit fiscalData path', () => {
|
||||||
|
|
||||||
it('should confirm its name have been edited', async() => {
|
it('should confirm its name have been edited', async() => {
|
||||||
await page.waitToClick(selectors.clientFiscalData.fiscalDataButton);
|
await page.waitToClick(selectors.clientFiscalData.fiscalDataButton);
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientFiscalData.socialNameInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialNameInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('SMASH');
|
expect(result).toEqual('SMASH');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the fiscal id have been edited', async() => {
|
it('should confirm the fiscal id have been edited', async() => {
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientFiscalData.fiscalIdInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.fiscalIdInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('94980061C');
|
expect(result).toEqual('94980061C');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the address have been edited', async() => {
|
it('should confirm the address have been edited', async() => {
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientFiscalData.addressInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.addressInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Somewhere edited');
|
expect(result).toEqual('Somewhere edited');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the postcode have been edited', async() => {
|
it('should confirm the postcode have been edited', async() => {
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientFiscalData.postcodeInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.postcodeInput, 'value');
|
||||||
|
|
||||||
expect(result).toContain('46000');
|
expect(result).toContain('46000');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the city have been autocompleted', async() => {
|
it('should confirm the city have been autocompleted', async() => {
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientFiscalData.cityInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.cityInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Valencia');
|
expect(result).toEqual('Valencia');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
it(`should confirm the province have been autocompleted`, async() => {
|
it(`should confirm the province have been autocompleted`, async() => {
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientFiscalData.provinceAutocomplete} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.provinceAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Province one');
|
expect(result).toEqual('Province one');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the country have been autocompleted', async() => {
|
it('should confirm the country have been autocompleted', async() => {
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientFiscalData.countryAutocomplete} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.countryAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('España');
|
expect(result).toEqual('España');
|
||||||
});
|
});
|
||||||
|
@ -269,7 +269,7 @@ describe('Client Edit fiscalData path', () => {
|
||||||
// confirm invoice by address checkbox gets checked if the EQtax differs between addresses step 2
|
// confirm invoice by address checkbox gets checked if the EQtax differs between addresses step 2
|
||||||
it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async() => {
|
it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async() => {
|
||||||
await page.waitToClick(selectors.clientAddresses.firstEditAddress);
|
await page.waitToClick(selectors.clientAddresses.firstEditAddress);
|
||||||
await page.waitForTextInInput(selectors.clientAddresses.cityInput, 'Silla');
|
await page.waitForTextInField(selectors.clientAddresses.cityInput, 'Silla');
|
||||||
await page.waitToClick(selectors.clientAddresses.equalizationTaxCheckbox);
|
await page.waitToClick(selectors.clientAddresses.equalizationTaxCheckbox);
|
||||||
await page.waitToClick(selectors.clientAddresses.saveButton);
|
await page.waitToClick(selectors.clientAddresses.saveButton);
|
||||||
const result = await page.waitForLastSnackbar();
|
const result = await page.waitForLastSnackbar();
|
||||||
|
|
|
@ -21,7 +21,7 @@ describe('Client Edit billing data path', () => {
|
||||||
await page.autocompleteSearch(selectors.clientBillingData.swiftBicAutocomplete, 'BBKKESMMMMM');
|
await page.autocompleteSearch(selectors.clientBillingData.swiftBicAutocomplete, 'BBKKESMMMMM');
|
||||||
await page.clearInput(selectors.clientBillingData.dueDayInput);
|
await page.clearInput(selectors.clientBillingData.dueDayInput);
|
||||||
await page.write(selectors.clientBillingData.dueDayInput, '60');
|
await page.write(selectors.clientBillingData.dueDayInput, '60');
|
||||||
await page.waitForTextInInput(selectors.clientBillingData.dueDayInput, '60');
|
await page.waitForTextInField(selectors.clientBillingData.dueDayInput, '60');
|
||||||
await page.waitToClick(selectors.clientBillingData.receivedCoreLCRCheckbox);
|
await page.waitToClick(selectors.clientBillingData.receivedCoreLCRCheckbox);
|
||||||
await page.waitToClick(selectors.clientBillingData.receivedCoreVNLCheckbox);
|
await page.waitToClick(selectors.clientBillingData.receivedCoreVNLCheckbox);
|
||||||
await page.waitToClick(selectors.clientBillingData.receivedB2BVNLCheckbox);
|
await page.waitToClick(selectors.clientBillingData.receivedB2BVNLCheckbox);
|
||||||
|
@ -37,14 +37,14 @@ describe('Client Edit billing data path', () => {
|
||||||
await page.write(selectors.clientBillingData.newBankEntityCode, '9999');
|
await page.write(selectors.clientBillingData.newBankEntityCode, '9999');
|
||||||
await page.write(selectors.clientBillingData.newBankEntityBIC, 'GTHMCT');
|
await page.write(selectors.clientBillingData.newBankEntityBIC, 'GTHMCT');
|
||||||
await page.waitToClick(selectors.clientBillingData.acceptBankEntityButton);
|
await page.waitToClick(selectors.clientBillingData.acceptBankEntityButton);
|
||||||
await page.waitForTextInInput(selectors.clientBillingData.swiftBicAutocomplete, 'Gotham City Bank');
|
await page.waitForTextInField(selectors.clientBillingData.swiftBicAutocomplete, 'Gotham City Bank');
|
||||||
let newcode = await page.waitToGetProperty(`${selectors.clientBillingData.swiftBicAutocomplete} input`, 'value');
|
let newcode = await page.waitToGetProperty(selectors.clientBillingData.swiftBicAutocomplete, 'value');
|
||||||
|
|
||||||
expect(newcode).toEqual('GTHMCT Gotham City Bank');
|
expect(newcode).toEqual('GTHMCT Gotham City Bank');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the IBAN pay method was sucessfully saved`, async() => {
|
it(`should confirm the IBAN pay method was sucessfully saved`, async() => {
|
||||||
let payMethod = await page.waitToGetProperty(`${selectors.clientBillingData.payMethodAutocomplete} input`, 'value');
|
let payMethod = await page.waitToGetProperty(selectors.clientBillingData.payMethodAutocomplete, 'value');
|
||||||
|
|
||||||
expect(payMethod).toEqual('PayMethod with IBAN');
|
expect(payMethod).toEqual('PayMethod with IBAN');
|
||||||
});
|
});
|
||||||
|
@ -53,8 +53,8 @@ describe('Client Edit billing data path', () => {
|
||||||
await page.write(selectors.clientBillingData.IBANInput, 'ES9121000418450200051332');
|
await page.write(selectors.clientBillingData.IBANInput, 'ES9121000418450200051332');
|
||||||
await page.keyboard.press('Tab');
|
await page.keyboard.press('Tab');
|
||||||
await page.keyboard.press('Tab');
|
await page.keyboard.press('Tab');
|
||||||
await page.waitForTextInInput(selectors.clientBillingData.swiftBicAutocomplete, 'caixesbb');
|
await page.waitForTextInField(selectors.clientBillingData.swiftBicAutocomplete, 'caixesbb');
|
||||||
let automaticCode = await page.waitToGetProperty(`${selectors.clientBillingData.swiftBicAutocomplete} input`, 'value');
|
let automaticCode = await page.waitToGetProperty(selectors.clientBillingData.swiftBicAutocomplete, 'value');
|
||||||
|
|
||||||
expect(automaticCode).toEqual('CAIXESBB Caixa Bank');
|
expect(automaticCode).toEqual('CAIXESBB Caixa Bank');
|
||||||
});
|
});
|
||||||
|
@ -69,19 +69,19 @@ describe('Client Edit billing data path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the due day have been edited', async() => {
|
it('should confirm the due day have been edited', async() => {
|
||||||
let dueDate = await page.waitToGetProperty(`${selectors.clientBillingData.dueDayInput} input`, 'value');
|
let dueDate = await page.waitToGetProperty(selectors.clientBillingData.dueDayInput, 'value');
|
||||||
|
|
||||||
expect(dueDate).toEqual('60');
|
expect(dueDate).toEqual('60');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the IBAN was saved', async() => {
|
it('should confirm the IBAN was saved', async() => {
|
||||||
let IBAN = await page.waitToGetProperty(`${selectors.clientBillingData.IBANInput} input`, 'value');
|
let IBAN = await page.waitToGetProperty(selectors.clientBillingData.IBANInput, 'value');
|
||||||
|
|
||||||
expect(IBAN).toEqual('ES9121000418450200051332');
|
expect(IBAN).toEqual('ES9121000418450200051332');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the swift / BIC code was saved', async() => {
|
it('should confirm the swift / BIC code was saved', async() => {
|
||||||
let code = await page.waitToGetProperty(`${selectors.clientBillingData.swiftBicAutocomplete} input`, 'value');
|
let code = await page.waitToGetProperty(selectors.clientBillingData.swiftBicAutocomplete, 'value');
|
||||||
|
|
||||||
expect(code).toEqual('CAIXESBB Caixa Bank');
|
expect(code).toEqual('CAIXESBB Caixa Bank');
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,7 +37,7 @@ describe('Client Edit web access path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm web access name have been updated', async() => {
|
it('should confirm web access name have been updated', async() => {
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientWebAccess.userNameInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientWebAccess.userNameInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Hulk');
|
expect(result).toEqual('Hulk');
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,7 +34,7 @@ describe('Client Add greuge path', () => {
|
||||||
|
|
||||||
it(`should create a new greuge with all its data`, async() => {
|
it(`should create a new greuge with all its data`, async() => {
|
||||||
await page.write(selectors.clientGreuge.amountInput, '999');
|
await page.write(selectors.clientGreuge.amountInput, '999');
|
||||||
await page.waitForTextInInput(selectors.clientGreuge.amountInput, '999');
|
await page.waitForTextInField(selectors.clientGreuge.amountInput, '999');
|
||||||
await page.write(selectors.clientGreuge.descriptionInput, 'new armor for Batman!');
|
await page.write(selectors.clientGreuge.descriptionInput, 'new armor for Batman!');
|
||||||
await page.waitToClick(selectors.clientGreuge.saveButton);
|
await page.waitToClick(selectors.clientGreuge.saveButton);
|
||||||
const result = await page.waitForLastSnackbar();
|
const result = await page.waitForLastSnackbar();
|
||||||
|
|
|
@ -37,7 +37,7 @@ describe('Client lock verified data path', () => {
|
||||||
|
|
||||||
it('should confirm the social name have been edited', async() => {
|
it('should confirm the social name have been edited', async() => {
|
||||||
await page.reloadSection('client.card.fiscalData');
|
await page.reloadSection('client.card.fiscalData');
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientFiscalData.socialNameInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialNameInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Captain America Civil War');
|
expect(result).toEqual('Captain America Civil War');
|
||||||
});
|
});
|
||||||
|
@ -83,7 +83,7 @@ describe('Client lock verified data path', () => {
|
||||||
|
|
||||||
it('should again confirm the social name have been edited', async() => {
|
it('should again confirm the social name have been edited', async() => {
|
||||||
await page.reloadSection('client.card.fiscalData');
|
await page.reloadSection('client.card.fiscalData');
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientFiscalData.socialNameInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialNameInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Ant man and the Wasp');
|
expect(result).toEqual('Ant man and the Wasp');
|
||||||
});
|
});
|
||||||
|
@ -137,7 +137,7 @@ describe('Client lock verified data path', () => {
|
||||||
|
|
||||||
it('should now confirm the social name have been edited once and for all', async() => {
|
it('should now confirm the social name have been edited once and for all', async() => {
|
||||||
await page.reloadSection('client.card.fiscalData');
|
await page.reloadSection('client.card.fiscalData');
|
||||||
const result = await page.waitToGetProperty(`${selectors.clientFiscalData.socialNameInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialNameInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('new social name edition');
|
expect(result).toEqual('new social name edition');
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import selectors from '../../helpers/selectors';
|
import selectors from '../../helpers/selectors';
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
describe('Client log path', () => {
|
fdescribe('Client log path', () => {
|
||||||
let browser;
|
let browser;
|
||||||
let page;
|
let page;
|
||||||
beforeAll(async() => {
|
beforeAll(async() => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import selectors from '../../helpers/selectors';
|
import selectors from '../../helpers/selectors';
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
describe('Client balance path', () => {
|
fdescribe('Client balance path', () => {
|
||||||
let browser;
|
let browser;
|
||||||
let page;
|
let page;
|
||||||
beforeAll(async() => {
|
beforeAll(async() => {
|
||||||
|
@ -9,7 +9,7 @@ describe('Client balance path', () => {
|
||||||
page = browser.page;
|
page = browser.page;
|
||||||
await page.loginAndModule('administrative', 'client');
|
await page.loginAndModule('administrative', 'client');
|
||||||
await page.accessToSearchResult('Petter Parker');
|
await page.accessToSearchResult('Petter Parker');
|
||||||
}, 30000);
|
});
|
||||||
|
|
||||||
afterAll(async() => {
|
afterAll(async() => {
|
||||||
await browser.close();
|
await browser.close();
|
||||||
|
@ -25,7 +25,7 @@ describe('Client balance path', () => {
|
||||||
|
|
||||||
it('should access to the balance section to check the data shown matches the local settings', async() => {
|
it('should access to the balance section to check the data shown matches the local settings', async() => {
|
||||||
await page.accessToSection('client.card.balance.index');
|
await page.accessToSection('client.card.balance.index');
|
||||||
let result = await page.waitToGetProperty(`${selectors.clientBalance.companyAutocomplete} input`, 'value');
|
let result = await page.waitToGetProperty(selectors.clientBalance.companyAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('CCs');
|
expect(result).toEqual('CCs');
|
||||||
});
|
});
|
||||||
|
@ -63,7 +63,7 @@ describe('Client balance path', () => {
|
||||||
it('should check balance is now 0 and the company is now VNL becouse the user local settings were removed', async() => {
|
it('should check balance is now 0 and the company is now VNL becouse the user local settings were removed', async() => {
|
||||||
await page.waitForSpinnerLoad();
|
await page.waitForSpinnerLoad();
|
||||||
let company = await page
|
let company = await page
|
||||||
.waitToGetProperty(`${selectors.clientBalance.companyAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.clientBalance.companyAutocomplete, 'value');
|
||||||
|
|
||||||
let firstBalanceLine = await page
|
let firstBalanceLine = await page
|
||||||
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
||||||
|
|
|
@ -22,20 +22,20 @@ describe('User config', () => {
|
||||||
await page.waitToClick(selectors.globalItems.userMenuButton);
|
await page.waitToClick(selectors.globalItems.userMenuButton);
|
||||||
|
|
||||||
let userLocalWarehouse = await page
|
let userLocalWarehouse = await page
|
||||||
.getProperty(`${selectors.globalItems.userLocalWarehouse} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userLocalWarehouse, 'value');
|
||||||
|
|
||||||
|
|
||||||
let userLocalBank = await page
|
let userLocalBank = await page
|
||||||
.getProperty(`${selectors.globalItems.userLocalBank} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userLocalBank, 'value');
|
||||||
|
|
||||||
let userLocalCompany = await page
|
let userLocalCompany = await page
|
||||||
.getProperty(`${selectors.globalItems.userLocalCompany} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userLocalCompany, 'value');
|
||||||
|
|
||||||
let userWarehouse = await page
|
let userWarehouse = await page
|
||||||
.waitToGetProperty(`${selectors.globalItems.userWarehouse} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userWarehouse, 'value');
|
||||||
|
|
||||||
let userCompany = await page
|
let userCompany = await page
|
||||||
.waitToGetProperty(`${selectors.globalItems.userCompany} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userCompany, 'value');
|
||||||
|
|
||||||
expect(userLocalWarehouse).toEqual('');
|
expect(userLocalWarehouse).toEqual('');
|
||||||
expect(userLocalBank).toEqual('');
|
expect(userLocalBank).toEqual('');
|
||||||
|
@ -53,19 +53,19 @@ describe('User config', () => {
|
||||||
it('should open the user config form to check the settings', async() => {
|
it('should open the user config form to check the settings', async() => {
|
||||||
await page.waitToClick(selectors.globalItems.userMenuButton);
|
await page.waitToClick(selectors.globalItems.userMenuButton);
|
||||||
let userLocalWarehouse = await page
|
let userLocalWarehouse = await page
|
||||||
.getProperty(`${selectors.globalItems.userLocalWarehouse} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userLocalWarehouse, 'value');
|
||||||
|
|
||||||
let userLocalBank = await page
|
let userLocalBank = await page
|
||||||
.getProperty(`${selectors.globalItems.userLocalBank} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userLocalBank, 'value');
|
||||||
|
|
||||||
let userLocalCompany = await page
|
let userLocalCompany = await page
|
||||||
.getProperty(`${selectors.globalItems.userLocalCompany} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userLocalCompany, 'value');
|
||||||
|
|
||||||
let userWarehouse = await page
|
let userWarehouse = await page
|
||||||
.waitToGetProperty(`${selectors.globalItems.userWarehouse} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userWarehouse, 'value');
|
||||||
|
|
||||||
let userCompany = await page
|
let userCompany = await page
|
||||||
.waitToGetProperty(`${selectors.globalItems.userCompany} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userCompany, 'value');
|
||||||
|
|
||||||
expect(userLocalWarehouse).toEqual('');
|
expect(userLocalWarehouse).toEqual('');
|
||||||
expect(userLocalBank).toEqual('');
|
expect(userLocalBank).toEqual('');
|
||||||
|
@ -92,19 +92,19 @@ describe('User config', () => {
|
||||||
it('should again open the user config form to check the local settings', async() => {
|
it('should again open the user config form to check the local settings', async() => {
|
||||||
await page.waitToClick(selectors.globalItems.userMenuButton);
|
await page.waitToClick(selectors.globalItems.userMenuButton);
|
||||||
let userLocalWarehouse = await page
|
let userLocalWarehouse = await page
|
||||||
.waitToGetProperty(`${selectors.globalItems.userLocalWarehouse} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userLocalWarehouse, 'value');
|
||||||
|
|
||||||
let userLocalBank = await page
|
let userLocalBank = await page
|
||||||
.waitToGetProperty(`${selectors.globalItems.userLocalBank} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userLocalBank, 'value');
|
||||||
|
|
||||||
let userLocalCompany = await page
|
let userLocalCompany = await page
|
||||||
.waitToGetProperty(`${selectors.globalItems.userLocalCompany} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userLocalCompany, 'value');
|
||||||
|
|
||||||
let userWarehouse = await page
|
let userWarehouse = await page
|
||||||
.waitToGetProperty(`${selectors.globalItems.userWarehouse} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userWarehouse, 'value');
|
||||||
|
|
||||||
let userCompany = await page
|
let userCompany = await page
|
||||||
.waitToGetProperty(`${selectors.globalItems.userCompany} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userCompany, 'value');
|
||||||
|
|
||||||
expect(userLocalWarehouse).toContain('Warehouse Four');
|
expect(userLocalWarehouse).toContain('Warehouse Four');
|
||||||
expect(userLocalBank).toContain('Pay on receipt');
|
expect(userLocalBank).toContain('Pay on receipt');
|
||||||
|
|
|
@ -42,49 +42,49 @@ describe('Item Edit basic data path', () => {
|
||||||
it(`should confirm the item name was edited`, async() => {
|
it(`should confirm the item name was edited`, async() => {
|
||||||
await page.reloadSection('item.card.basicData');
|
await page.reloadSection('item.card.basicData');
|
||||||
await page.waitForContentLoaded();
|
await page.waitForContentLoaded();
|
||||||
const result = await page.waitToGetProperty(`${selectors.itemBasicData.nameInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.itemBasicData.nameInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Rose of Purity');
|
expect(result).toEqual('Rose of Purity');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the item type was edited`, async() => {
|
it(`should confirm the item type was edited`, async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBasicData.typeAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemBasicData.typeAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Anthurium');
|
expect(result).toEqual('Anthurium');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the item intrastad was edited`, async() => {
|
it(`should confirm the item intrastad was edited`, async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBasicData.intrastatAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemBasicData.intrastatAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('5080000 Coral y materiales similares');
|
expect(result).toEqual('5080000 Coral y materiales similares');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the item relevancy was edited`, async() => {
|
it(`should confirm the item relevancy was edited`, async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBasicData.relevancyInput} input`, 'value');
|
.waitToGetProperty(selectors.itemBasicData.relevancyInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('1');
|
expect(result).toEqual('1');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the item origin was edited`, async() => {
|
it(`should confirm the item origin was edited`, async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBasicData.originAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemBasicData.originAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Spain');
|
expect(result).toEqual('Spain');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the item expence was edited`, async() => {
|
it(`should confirm the item expence was edited`, async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBasicData.expenseAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemBasicData.expenseAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Alquiler VNH');
|
expect(result).toEqual('Alquiler VNH');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the item long name was edited`, async() => {
|
it(`should confirm the item long name was edited`, async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBasicData.longNameInput} input`, 'value');
|
.waitToGetProperty(selectors.itemBasicData.longNameInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('RS Rose of Purity');
|
expect(result).toEqual('RS Rose of Purity');
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,35 +28,35 @@ describe('Item edit tax path', () => {
|
||||||
|
|
||||||
it(`should confirm the first item tax class was edited`, async() => {
|
it(`should confirm the first item tax class was edited`, async() => {
|
||||||
await page.reloadSection('item.card.tax');
|
await page.reloadSection('item.card.tax');
|
||||||
const firstVatType = await page.waitToGetProperty(`${selectors.itemTax.firstClassAutocomplete} input`, 'value');
|
const firstVatType = await page.waitToGetProperty(selectors.itemTax.firstClassAutocomplete, 'value');
|
||||||
|
|
||||||
expect(firstVatType).toEqual('General VAT');
|
expect(firstVatType).toEqual('General VAT');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the second item tax class was edited`, async() => {
|
it(`should confirm the second item tax class was edited`, async() => {
|
||||||
const secondVatType = await page
|
const secondVatType = await page
|
||||||
.waitToGetProperty(`${selectors.itemTax.secondClassAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemTax.secondClassAutocomplete, 'value');
|
||||||
|
|
||||||
expect(secondVatType).toEqual('General VAT');
|
expect(secondVatType).toEqual('General VAT');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the third item tax class was edited`, async() => {
|
it(`should confirm the third item tax class was edited`, async() => {
|
||||||
const thirdVatType = await page
|
const thirdVatType = await page
|
||||||
.waitToGetProperty(`${selectors.itemTax.thirdClassAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemTax.thirdClassAutocomplete, 'value');
|
||||||
|
|
||||||
expect(thirdVatType).toEqual('General VAT');
|
expect(thirdVatType).toEqual('General VAT');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should edit the first class without saving the form`, async() => {
|
it(`should edit the first class without saving the form`, async() => {
|
||||||
await page.autocompleteSearch(selectors.itemTax.firstClassAutocomplete, 'Reduced VAT');
|
await page.autocompleteSearch(selectors.itemTax.firstClassAutocomplete, 'Reduced VAT');
|
||||||
const firstVatType = await page.waitToGetProperty(`${selectors.itemTax.firstClassAutocomplete} input`, 'value');
|
const firstVatType = await page.waitToGetProperty(selectors.itemTax.firstClassAutocomplete, 'value');
|
||||||
|
|
||||||
expect(firstVatType).toEqual('Reduced VAT');
|
expect(firstVatType).toEqual('Reduced VAT');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should now click the undo changes button and see the changes works`, async() => {
|
it(`should now click the undo changes button and see the changes works`, async() => {
|
||||||
await page.waitToClick(selectors.itemTax.undoChangesButton);
|
await page.waitToClick(selectors.itemTax.undoChangesButton);
|
||||||
const firstVatType = await page.waitToGetProperty(`${selectors.itemTax.firstClassAutocomplete} input`, 'value');
|
const firstVatType = await page.waitToGetProperty(selectors.itemTax.firstClassAutocomplete, 'value');
|
||||||
|
|
||||||
expect(firstVatType).toEqual('General VAT');
|
expect(firstVatType).toEqual('General VAT');
|
||||||
});
|
});
|
||||||
|
|
|
@ -32,30 +32,30 @@ describe('Item create tags path', () => {
|
||||||
it(`should confirm the fourth row data is the expected one`, async() => {
|
it(`should confirm the fourth row data is the expected one`, async() => {
|
||||||
await page.reloadSection('item.card.tags');
|
await page.reloadSection('item.card.tags');
|
||||||
await page.wait('vn-item-tags');
|
await page.wait('vn-item-tags');
|
||||||
let result = await page.waitToGetProperty(`${selectors.itemTags.fourthTagAutocomplete} input`, 'value');
|
let result = await page.waitToGetProperty(selectors.itemTags.fourthTagAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Ancho de la base');
|
expect(result).toEqual('Ancho de la base');
|
||||||
|
|
||||||
result = await page
|
result = await page
|
||||||
.waitToGetProperty(`${selectors.itemTags.fourthValueInput} input`, 'value');
|
.waitToGetProperty(selectors.itemTags.fourthValueInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('50');
|
expect(result).toEqual('50');
|
||||||
|
|
||||||
result = await page
|
result = await page
|
||||||
.waitToGetProperty(`${selectors.itemTags.fourthRelevancyInput} input`, 'value');
|
.waitToGetProperty(selectors.itemTags.fourthRelevancyInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('4');
|
expect(result).toEqual('4');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the fifth row data is the expected one`, async() => {
|
it(`should confirm the fifth row data is the expected one`, async() => {
|
||||||
let tag = await page
|
let tag = await page
|
||||||
.waitToGetProperty(`${selectors.itemTags.fifthTagAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemTags.fifthTagAutocomplete, 'value');
|
||||||
|
|
||||||
let value = await page
|
let value = await page
|
||||||
.waitToGetProperty(`${selectors.itemTags.fifthValueInput} input`, 'value');
|
.waitToGetProperty(selectors.itemTags.fifthValueInput, 'value');
|
||||||
|
|
||||||
let relevancy = await page
|
let relevancy = await page
|
||||||
.waitToGetProperty(`${selectors.itemTags.fifthRelevancyInput} input`, 'value');
|
.waitToGetProperty(selectors.itemTags.fifthRelevancyInput, 'value');
|
||||||
|
|
||||||
expect(tag).toEqual('Color');
|
expect(tag).toEqual('Color');
|
||||||
expect(value).toEqual('Brown');
|
expect(value).toEqual('Brown');
|
||||||
|
@ -64,13 +64,13 @@ describe('Item create tags path', () => {
|
||||||
|
|
||||||
it(`should confirm the sixth row data is the expected one`, async() => {
|
it(`should confirm the sixth row data is the expected one`, async() => {
|
||||||
let tag = await page
|
let tag = await page
|
||||||
.waitToGetProperty(`${selectors.itemTags.sixthTagAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemTags.sixthTagAutocomplete, 'value');
|
||||||
|
|
||||||
let value = await page
|
let value = await page
|
||||||
.waitToGetProperty(`${selectors.itemTags.sixthValueInput} input`, 'value');
|
.waitToGetProperty(selectors.itemTags.sixthValueInput, 'value');
|
||||||
|
|
||||||
let relevancy = await page
|
let relevancy = await page
|
||||||
.waitToGetProperty(`${selectors.itemTags.sixthRelevancyInput} input`, 'value');
|
.waitToGetProperty(selectors.itemTags.sixthRelevancyInput, 'value');
|
||||||
|
|
||||||
expect(tag).toEqual('Categoria');
|
expect(tag).toEqual('Categoria');
|
||||||
expect(value).toEqual('+1 precission');
|
expect(value).toEqual('+1 precission');
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe('Item create niche path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click create a new niche and delete a former one`, async() => {
|
it(`should click create a new niche and delete a former one`, async() => {
|
||||||
await page.waitForTextInInput(selectors.itemNiches.firstWarehouseAutocomplete, 'Warehouse One');
|
await page.waitForTextInField(selectors.itemNiches.firstWarehouseAutocomplete, 'Warehouse One');
|
||||||
await page.waitToClick(selectors.itemNiches.addNicheButton);
|
await page.waitToClick(selectors.itemNiches.addNicheButton);
|
||||||
await page.waitToClick(selectors.itemNiches.secondNicheRemoveButton);
|
await page.waitToClick(selectors.itemNiches.secondNicheRemoveButton);
|
||||||
await page.autocompleteSearch(selectors.itemNiches.thirdWarehouseAutocomplete, 'Warehouse Two');
|
await page.autocompleteSearch(selectors.itemNiches.thirdWarehouseAutocomplete, 'Warehouse Two');
|
||||||
|
@ -30,36 +30,36 @@ describe('Item create niche path', () => {
|
||||||
|
|
||||||
it(`should confirm the first niche is the expected one`, async() => {
|
it(`should confirm the first niche is the expected one`, async() => {
|
||||||
await page.reloadSection('item.card.niche');
|
await page.reloadSection('item.card.niche');
|
||||||
await page.waitForTextInInput(selectors.itemNiches.firstWarehouseAutocomplete, 'Warehouse One');
|
await page.waitForTextInField(selectors.itemNiches.firstWarehouseAutocomplete, 'Warehouse One');
|
||||||
let result = await page
|
let result = await page
|
||||||
.waitToGetProperty(`${selectors.itemNiches.firstWarehouseAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemNiches.firstWarehouseAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Warehouse One');
|
expect(result).toEqual('Warehouse One');
|
||||||
|
|
||||||
result = await page
|
result = await page
|
||||||
.waitToGetProperty(`${selectors.itemNiches.firstCodeInput} input`, 'value');
|
.waitToGetProperty(selectors.itemNiches.firstCodeInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('A1');
|
expect(result).toEqual('A1');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the second niche is the expected one`, async() => {
|
it(`should confirm the second niche is the expected one`, async() => {
|
||||||
let result = await page
|
let result = await page
|
||||||
.waitToGetProperty(`${selectors.itemNiches.secondWarehouseAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemNiches.secondWarehouseAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Warehouse Three');
|
expect(result).toEqual('Warehouse Three');
|
||||||
result = await page
|
result = await page
|
||||||
.waitToGetProperty(`${selectors.itemNiches.secondCodeInput} input`, 'value');
|
.waitToGetProperty(selectors.itemNiches.secondCodeInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('A3');
|
expect(result).toEqual('A3');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the third niche is the expected one`, async() => {
|
it(`should confirm the third niche is the expected one`, async() => {
|
||||||
let result = await page
|
let result = await page
|
||||||
.waitToGetProperty(`${selectors.itemNiches.thirdWarehouseAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemNiches.thirdWarehouseAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Warehouse Two');
|
expect(result).toEqual('Warehouse Two');
|
||||||
result = await page
|
result = await page
|
||||||
.waitToGetProperty(`${selectors.itemNiches.thirdCodeInput} input`, 'value');
|
.waitToGetProperty(selectors.itemNiches.thirdCodeInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('A4');
|
expect(result).toEqual('A4');
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,24 +28,24 @@ describe('Item Create botanical path', () => {
|
||||||
|
|
||||||
it(`should confirm the botanical for the item was created`, async() => {
|
it(`should confirm the botanical for the item was created`, async() => {
|
||||||
await page.reloadSection('item.card.botanical');
|
await page.reloadSection('item.card.botanical');
|
||||||
await page.waitForTextInInput(selectors.itemBotanical.botanicalInput, 'Cicuta maculata');
|
await page.waitForTextInField(selectors.itemBotanical.botanicalInput, 'Cicuta maculata');
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBotanical.botanicalInput} input`, 'value');
|
.waitToGetProperty(selectors.itemBotanical.botanicalInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Cicuta maculata');
|
expect(result).toEqual('Cicuta maculata');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the Genus for the item was created`, async() => {
|
it(`should confirm the Genus for the item was created`, async() => {
|
||||||
await page.waitForTextInInput(selectors.itemBotanical.genusAutocomplete, 'Abelia');
|
await page.waitForTextInField(selectors.itemBotanical.genusAutocomplete, 'Abelia');
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBotanical.genusAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemBotanical.genusAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Abelia');
|
expect(result).toEqual('Abelia');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the Species for the item was created`, async() => {
|
it(`should confirm the Species for the item was created`, async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBotanical.speciesAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemBotanical.speciesAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('dealbata');
|
expect(result).toEqual('dealbata');
|
||||||
});
|
});
|
||||||
|
@ -63,24 +63,24 @@ describe('Item Create botanical path', () => {
|
||||||
|
|
||||||
it(`should confirm the botanical for the item was edited`, async() => {
|
it(`should confirm the botanical for the item was edited`, async() => {
|
||||||
await page.reloadSection('item.card.botanical');
|
await page.reloadSection('item.card.botanical');
|
||||||
await page.waitForTextInInput(selectors.itemBotanical.botanicalInput, 'Herp Derp');
|
await page.waitForTextInField(selectors.itemBotanical.botanicalInput, 'Herp Derp');
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBotanical.botanicalInput} input`, 'value');
|
.waitToGetProperty(selectors.itemBotanical.botanicalInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Herp Derp');
|
expect(result).toEqual('Herp Derp');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the Genus for the item was edited`, async() => {
|
it(`should confirm the Genus for the item was edited`, async() => {
|
||||||
await page.waitForTextInInput(selectors.itemBotanical.genusAutocomplete, 'Abies');
|
await page.waitForTextInField(selectors.itemBotanical.genusAutocomplete, 'Abies');
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBotanical.genusAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemBotanical.genusAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Abies');
|
expect(result).toEqual('Abies');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the Species for the item was edited`, async() => {
|
it(`should confirm the Species for the item was edited`, async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBotanical.speciesAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemBotanical.speciesAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('decurrens');
|
expect(result).toEqual('decurrens');
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,9 +28,9 @@ describe('Item Create barcodes path', () => {
|
||||||
|
|
||||||
it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, async() => {
|
it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, async() => {
|
||||||
await page.reloadSection('item.card.itemBarcode');
|
await page.reloadSection('item.card.itemBarcode');
|
||||||
await page.waitForTextInInput(selectors.itemBarcodes.thirdCodeInput, '5');
|
await page.waitForTextInField(selectors.itemBarcodes.thirdCodeInput, '5');
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBarcodes.thirdCodeInput} input`, 'value');
|
.waitToGetProperty(selectors.itemBarcodes.thirdCodeInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('5');
|
expect(result).toEqual('5');
|
||||||
});
|
});
|
||||||
|
|
|
@ -63,23 +63,23 @@ describe('Item Create/Clone path', () => {
|
||||||
|
|
||||||
it('should confirm Infinity Gauntlet item was created', async() => {
|
it('should confirm Infinity Gauntlet item was created', async() => {
|
||||||
let result = await page
|
let result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBasicData.nameInput} input`, 'value');
|
.waitToGetProperty(selectors.itemBasicData.nameInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Infinity Gauntlet');
|
expect(result).toEqual('Infinity Gauntlet');
|
||||||
|
|
||||||
|
|
||||||
result = await page
|
result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBasicData.typeAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemBasicData.typeAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Crisantemo');
|
expect(result).toEqual('Crisantemo');
|
||||||
|
|
||||||
result = await page
|
result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBasicData.intrastatAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemBasicData.intrastatAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('5080000 Coral y materiales similares');
|
expect(result).toEqual('5080000 Coral y materiales similares');
|
||||||
|
|
||||||
result = await page
|
result = await page
|
||||||
.waitToGetProperty(`${selectors.itemBasicData.originAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.itemBasicData.originAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Holand');
|
expect(result).toEqual('Holand');
|
||||||
});
|
});
|
||||||
|
|
|
@ -25,7 +25,7 @@ describe('Item regularize path', () => {
|
||||||
|
|
||||||
it('should check the local settings were saved', async() => {
|
it('should check the local settings were saved', async() => {
|
||||||
const userLocalWarehouse = await page
|
const userLocalWarehouse = await page
|
||||||
.waitToGetProperty(`${selectors.globalItems.userLocalWarehouse} input`, 'value');
|
.waitToGetProperty(selectors.globalItems.userLocalWarehouse, 'value');
|
||||||
|
|
||||||
await page.keyboard.press('Escape');
|
await page.keyboard.press('Escape');
|
||||||
await page.waitForSelector('.user-popover.vn-popover', {hidden: true});
|
await page.waitForSelector('.user-popover.vn-popover', {hidden: true});
|
||||||
|
@ -55,7 +55,7 @@ describe('Item regularize path', () => {
|
||||||
it('should open the regularize dialog and check the warehouse matches the local user settings', async() => {
|
it('should open the regularize dialog and check the warehouse matches the local user settings', async() => {
|
||||||
await page.waitToClick(selectors.itemDescriptor.moreMenu);
|
await page.waitToClick(selectors.itemDescriptor.moreMenu);
|
||||||
await page.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton);
|
await page.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton);
|
||||||
const result = await page.waitToGetProperty(`${selectors.itemDescriptor.regularizeWarehouseAutocomplete} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.itemDescriptor.regularizeWarehouseAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Warehouse Four');
|
expect(result).toEqual('Warehouse Four');
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,12 +31,12 @@ describe('Ticket Create notes path', () => {
|
||||||
it('should confirm the note is the expected one', async() => {
|
it('should confirm the note is the expected one', async() => {
|
||||||
await page.reloadSection('ticket.card.observation');
|
await page.reloadSection('ticket.card.observation');
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.ticketNotes.firstNoteTypeAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.ticketNotes.firstNoteTypeAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('observation one');
|
expect(result).toEqual('observation one');
|
||||||
|
|
||||||
const firstDescription = await page
|
const firstDescription = await page
|
||||||
.waitToGetProperty(`${selectors.ticketNotes.firstDescriptionInput} input`, 'value');
|
.waitToGetProperty(selectors.ticketNotes.firstDescriptionInput, 'value');
|
||||||
|
|
||||||
expect(firstDescription).toEqual('description');
|
expect(firstDescription).toEqual('description');
|
||||||
});
|
});
|
||||||
|
|
|
@ -56,15 +56,15 @@ describe('Ticket Create packages path', () => {
|
||||||
|
|
||||||
it(`should confirm the first select is the expected one`, async() => {
|
it(`should confirm the first select is the expected one`, async() => {
|
||||||
await page.reloadSection('ticket.card.package');
|
await page.reloadSection('ticket.card.package');
|
||||||
await page.waitForTextInInput(selectors.ticketPackages.firstPackageAutocomplete, 'Container medical box 1m');
|
await page.waitForTextInField(selectors.ticketPackages.firstPackageAutocomplete, 'Container medical box 1m');
|
||||||
const result = await page.waitToGetProperty(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.ticketPackages.firstPackageAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('7 : Container medical box 1m');
|
expect(result).toEqual('7 : Container medical box 1m');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the first quantity is just a number and the string part was ignored by the imput number`, async() => {
|
it(`should confirm the first quantity is just a number and the string part was ignored by the imput number`, async() => {
|
||||||
await page.waitForTextInInput(selectors.ticketPackages.firstQuantityInput, '-99');
|
await page.waitForTextInField(selectors.ticketPackages.firstQuantityInput, '-99');
|
||||||
const result = await page.waitToGetProperty(`${selectors.ticketPackages.firstQuantityInput} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.ticketPackages.firstQuantityInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('-99');
|
expect(result).toEqual('-99');
|
||||||
});
|
});
|
||||||
|
|
|
@ -70,7 +70,7 @@ describe('Ticket Create new tracking state path', () => {
|
||||||
it(`should make sure the worker gets autocomplete uppon selecting the assigned state`, async() => {
|
it(`should make sure the worker gets autocomplete uppon selecting the assigned state`, async() => {
|
||||||
await page.autocompleteSearch(selectors.createStateView.stateAutocomplete, 'asignado');
|
await page.autocompleteSearch(selectors.createStateView.stateAutocomplete, 'asignado');
|
||||||
let result = await page
|
let result = await page
|
||||||
.waitToGetProperty(`${selectors.createStateView.workerAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.createStateView.workerAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('salesPersonNick');
|
expect(result).toEqual('salesPersonNick');
|
||||||
});
|
});
|
||||||
|
|
|
@ -44,7 +44,7 @@ describe('Ticket Edit basic data path', () => {
|
||||||
|
|
||||||
it(`should check the zone is for Silla247`, async() => {
|
it(`should check the zone is for Silla247`, async() => {
|
||||||
let zone = await page
|
let zone = await page
|
||||||
.waitToGetProperty(`${selectors.ticketBasicData.zoneAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.ticketBasicData.zoneAutocomplete, 'value');
|
||||||
|
|
||||||
expect(zone).toContain('Zone 247 A');
|
expect(zone).toContain('Zone 247 A');
|
||||||
});
|
});
|
||||||
|
@ -52,7 +52,7 @@ describe('Ticket Edit basic data path', () => {
|
||||||
it(`should edit the ticket agency then check there are no zones for it`, async() => {
|
it(`should edit the ticket agency then check there are no zones for it`, async() => {
|
||||||
await page.autocompleteSearch(selectors.ticketBasicData.agencyAutocomplete, 'Entanglement');
|
await page.autocompleteSearch(selectors.ticketBasicData.agencyAutocomplete, 'Entanglement');
|
||||||
let zone = await page
|
let zone = await page
|
||||||
.getProperty(`${selectors.ticketBasicData.zoneAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.ticketBasicData.zoneAutocomplete, 'value');
|
||||||
|
|
||||||
expect(zone.length).toEqual(0);
|
expect(zone.length).toEqual(0);
|
||||||
});
|
});
|
||||||
|
@ -60,7 +60,7 @@ describe('Ticket Edit basic data path', () => {
|
||||||
it(`should edit the ticket zone then check the agency is for the new zone`, async() => {
|
it(`should edit the ticket zone then check the agency is for the new zone`, async() => {
|
||||||
await page.autocompleteSearch(selectors.ticketBasicData.zoneAutocomplete, 'Zone expensive A');
|
await page.autocompleteSearch(selectors.ticketBasicData.zoneAutocomplete, 'Zone expensive A');
|
||||||
let zone = await page
|
let zone = await page
|
||||||
.waitToGetProperty(`${selectors.ticketBasicData.agencyAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.ticketBasicData.agencyAutocomplete, 'value');
|
||||||
|
|
||||||
expect(zone).toContain('Silla247Expensive');
|
expect(zone).toContain('Silla247Expensive');
|
||||||
});
|
});
|
||||||
|
|
|
@ -51,7 +51,7 @@ describe('Ticket descriptor path', () => {
|
||||||
|
|
||||||
it('should confirm the ticket 11 was added to thursday', async() => {
|
it('should confirm the ticket 11 was added to thursday', async() => {
|
||||||
await page.accessToSection('ticket.weekly.index');
|
await page.accessToSection('ticket.weekly.index');
|
||||||
const result = await page.waitToGetProperty(`${selectors.ticketsIndex.sixthWeeklyTicket} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.ticketsIndex.sixthWeeklyTicket, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Thursday');
|
expect(result).toEqual('Thursday');
|
||||||
});
|
});
|
||||||
|
@ -107,7 +107,7 @@ describe('Ticket descriptor path', () => {
|
||||||
|
|
||||||
it('should confirm the ticket 11 was added on saturday', async() => {
|
it('should confirm the ticket 11 was added on saturday', async() => {
|
||||||
await page.accessToSection('ticket.weekly.index');
|
await page.accessToSection('ticket.weekly.index');
|
||||||
const result = await page.waitToGetProperty(`${selectors.ticketsIndex.sixthWeeklyTicket} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.ticketsIndex.sixthWeeklyTicket, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Saturday');
|
expect(result).toEqual('Saturday');
|
||||||
});
|
});
|
||||||
|
|
|
@ -95,28 +95,28 @@ describe('Ticket services path', () => {
|
||||||
it('should confirm the service description was created correctly', async() => {
|
it('should confirm the service description was created correctly', async() => {
|
||||||
await page.reloadSection('ticket.card.service');
|
await page.reloadSection('ticket.card.service');
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.ticketService.firstServiceTypeAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.ticketService.firstServiceTypeAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Documentos');
|
expect(result).toEqual('Documentos');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the service quantity was created correctly', async() => {
|
it('should confirm the service quantity was created correctly', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.ticketService.firstQuantityInput} input`, 'value');
|
.waitToGetProperty(selectors.ticketService.firstQuantityInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('1');
|
expect(result).toEqual('1');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the service price was created correctly', async() => {
|
it('should confirm the service price was created correctly', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.ticketService.firstPriceInput} input`, 'value');
|
.waitToGetProperty(selectors.ticketService.firstPriceInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('999');
|
expect(result).toEqual('999');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the service VAT was created correctly', async() => {
|
it('should confirm the service VAT was created correctly', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.ticketService.firstVatTypeAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.ticketService.firstVatTypeAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('General VAT');
|
expect(result).toEqual('General VAT');
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,10 +27,10 @@ describe('Ticket create from client path', () => {
|
||||||
|
|
||||||
it('should check if the client details are the expected ones', async() => {
|
it('should check if the client details are the expected ones', async() => {
|
||||||
const client = await page
|
const client = await page
|
||||||
.waitToGetProperty(`${selectors.createTicketView.clientAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.createTicketView.clientAutocomplete, 'value');
|
||||||
|
|
||||||
const address = await page
|
const address = await page
|
||||||
.waitToGetProperty(`${selectors.createTicketView.addressAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.createTicketView.addressAutocomplete, 'value');
|
||||||
|
|
||||||
|
|
||||||
expect(client).toContain('Petter Parker');
|
expect(client).toContain('Petter Parker');
|
||||||
|
|
|
@ -8,19 +8,22 @@ describe('Claim edit basic data path', () => {
|
||||||
beforeAll(async() => {
|
beforeAll(async() => {
|
||||||
browser = await getBrowser();
|
browser = await getBrowser();
|
||||||
page = browser.page;
|
page = browser.page;
|
||||||
await page.loginAndModule('salesAssistant', 'claim');
|
|
||||||
await page.accessToSearchResult('1');
|
|
||||||
await page.accessToSection('claim.card.basicData');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async() => {
|
afterAll(async() => {
|
||||||
await browser.close();
|
await browser.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it(`should log in as salesAssistant then reach basic data of the target claim`, async() => {
|
||||||
|
await page.loginAndModule('salesAssistant', 'claim');
|
||||||
|
await page.accessToSearchResult('1');
|
||||||
|
await page.accessToSection('claim.card.basicData');
|
||||||
|
});
|
||||||
|
|
||||||
it(`should edit claim state and observation fields`, async() => {
|
it(`should edit claim state and observation fields`, async() => {
|
||||||
await page.autocompleteSearch(selectors.claimBasicData.claimStateAutocomplete, 'Gestionado');
|
await page.autocompleteSearch(selectors.claimBasicData.claimStateAutocomplete, 'Gestionado');
|
||||||
await page.clearTextarea(selectors.claimBasicData.observationInput);
|
await page.clearTextarea(selectors.claimBasicData.observationInput);
|
||||||
await page.type(selectors.claimBasicData.observationInput, 'edited observation');
|
await page.write(selectors.claimBasicData.observationInput, 'edited observation');
|
||||||
await page.waitToClick(selectors.claimBasicData.saveButton);
|
await page.waitToClick(selectors.claimBasicData.saveButton);
|
||||||
const result = await page.waitForLastSnackbar();
|
const result = await page.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -37,7 +40,7 @@ describe('Claim edit basic data path', () => {
|
||||||
it('should confirm the claim state was edited', async() => {
|
it('should confirm the claim state was edited', async() => {
|
||||||
await page.reloadSection('claim.card.basicData');
|
await page.reloadSection('claim.card.basicData');
|
||||||
await page.wait(selectors.claimBasicData.claimStateAutocomplete);
|
await page.wait(selectors.claimBasicData.claimStateAutocomplete);
|
||||||
const result = await page.waitToGetProperty(`${selectors.claimBasicData.claimStateAutocomplete} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.claimBasicData.claimStateAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Gestionado');
|
expect(result).toEqual('Gestionado');
|
||||||
});
|
});
|
||||||
|
@ -52,7 +55,7 @@ describe('Claim edit basic data path', () => {
|
||||||
it(`should edit the claim to leave it untainted`, async() => {
|
it(`should edit the claim to leave it untainted`, async() => {
|
||||||
await page.autocompleteSearch(selectors.claimBasicData.claimStateAutocomplete, 'Pendiente');
|
await page.autocompleteSearch(selectors.claimBasicData.claimStateAutocomplete, 'Pendiente');
|
||||||
await page.clearTextarea(selectors.claimBasicData.observationInput);
|
await page.clearTextarea(selectors.claimBasicData.observationInput);
|
||||||
await page.type(selectors.claimBasicData.observationInput, 'Observation one');
|
await page.write(selectors.claimBasicData.observationInput, 'Observation one');
|
||||||
await page.waitToClick(selectors.claimBasicData.saveButton);
|
await page.waitToClick(selectors.claimBasicData.saveButton);
|
||||||
const result = await page.waitForLastSnackbar();
|
const result = await page.waitForLastSnackbar();
|
||||||
|
|
||||||
|
|
|
@ -54,19 +54,19 @@ describe('Claim development', () => {
|
||||||
it('should confirm the first development is the expected one', async() => {
|
it('should confirm the first development is the expected one', async() => {
|
||||||
await page.reloadSection('claim.card.development');
|
await page.reloadSection('claim.card.development');
|
||||||
const reason = await page
|
const reason = await page
|
||||||
.waitToGetProperty(`${selectors.claimDevelopment.firstClaimReasonAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.claimDevelopment.firstClaimReasonAutocomplete, 'value');
|
||||||
|
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.claimDevelopment.firstClaimResultAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.claimDevelopment.firstClaimResultAutocomplete, 'value');
|
||||||
|
|
||||||
const responsible = await page
|
const responsible = await page
|
||||||
.waitToGetProperty(`${selectors.claimDevelopment.firstClaimResponsibleAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.claimDevelopment.firstClaimResponsibleAutocomplete, 'value');
|
||||||
|
|
||||||
const worker = await page
|
const worker = await page
|
||||||
.waitToGetProperty(`${selectors.claimDevelopment.firstClaimWorkerAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.claimDevelopment.firstClaimWorkerAutocomplete, 'value');
|
||||||
|
|
||||||
const redelivery = await page
|
const redelivery = await page
|
||||||
.waitToGetProperty(`${selectors.claimDevelopment.firstClaimRedeliveryAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.claimDevelopment.firstClaimRedeliveryAutocomplete, 'value');
|
||||||
|
|
||||||
expect(reason).toEqual('Calor');
|
expect(reason).toEqual('Calor');
|
||||||
expect(result).toEqual('Cocido');
|
expect(result).toEqual('Cocido');
|
||||||
|
@ -77,19 +77,19 @@ describe('Claim development', () => {
|
||||||
|
|
||||||
it('should confirm the second development is the expected one', async() => {
|
it('should confirm the second development is the expected one', async() => {
|
||||||
const reason = await page
|
const reason = await page
|
||||||
.waitToGetProperty(`${selectors.claimDevelopment.secondClaimReasonAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.claimDevelopment.secondClaimReasonAutocomplete, 'value');
|
||||||
|
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.claimDevelopment.secondClaimResultAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.claimDevelopment.secondClaimResultAutocomplete, 'value');
|
||||||
|
|
||||||
const responsible = await page
|
const responsible = await page
|
||||||
.waitToGetProperty(`${selectors.claimDevelopment.secondClaimResponsibleAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.claimDevelopment.secondClaimResponsibleAutocomplete, 'value');
|
||||||
|
|
||||||
const worker = await page
|
const worker = await page
|
||||||
.waitToGetProperty(`${selectors.claimDevelopment.secondClaimWorkerAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.claimDevelopment.secondClaimWorkerAutocomplete, 'value');
|
||||||
|
|
||||||
const redelivery = await page
|
const redelivery = await page
|
||||||
.waitToGetProperty(`${selectors.claimDevelopment.secondClaimRedeliveryAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.claimDevelopment.secondClaimRedeliveryAutocomplete, 'value');
|
||||||
|
|
||||||
expect(reason).toEqual('Baja calidad');
|
expect(reason).toEqual('Baja calidad');
|
||||||
expect(result).toEqual('Deshidratacion');
|
expect(result).toEqual('Deshidratacion');
|
||||||
|
|
|
@ -49,7 +49,7 @@ describe('Claim action path', () => {
|
||||||
|
|
||||||
it('should refresh the view to check the remaining line is the expected one', async() => {
|
it('should refresh the view to check the remaining line is the expected one', async() => {
|
||||||
await page.reloadSection('claim.card.action');
|
await page.reloadSection('claim.card.action');
|
||||||
const result = await page.waitToGetProperty(`${selectors.claimAction.firstLineDestination} input`, 'value');
|
const result = await page.waitToGetProperty(selectors.claimAction.firstLineDestination, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Bueno');
|
expect(result).toEqual('Bueno');
|
||||||
});
|
});
|
||||||
|
|
|
@ -101,14 +101,14 @@ describe('Order edit basic data path', () => {
|
||||||
it('should now confirm the client have been edited', async() => {
|
it('should now confirm the client have been edited', async() => {
|
||||||
await page.reloadSection('order.card.basicData');
|
await page.reloadSection('order.card.basicData');
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.orderBasicData.clientAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.orderBasicData.clientAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('104: Tony Stark');
|
expect(result).toEqual('104: Tony Stark');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now confirm the agency have been edited', async() => {
|
it('should now confirm the agency have been edited', async() => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(`${selectors.orderBasicData.agencyAutocomplete} input`, 'value');
|
.waitToGetProperty(selectors.orderBasicData.agencyAutocomplete, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('7: Silla247');
|
expect(result).toEqual('7: Silla247');
|
||||||
});
|
});
|
||||||
|
|
|
@ -35,26 +35,26 @@ describe('Route basic Data path', () => {
|
||||||
|
|
||||||
it('should confirm the worker was edited', async() => {
|
it('should confirm the worker was edited', async() => {
|
||||||
await page.reloadSection('route.card.basicData');
|
await page.reloadSection('route.card.basicData');
|
||||||
const worker = await page.waitToGetProperty(`${selectors.routeBasicData.workerAutoComplete} input`, 'value');
|
const worker = await page.waitToGetProperty(selectors.routeBasicData.workerAutoComplete, 'value');
|
||||||
|
|
||||||
|
|
||||||
expect(worker).toEqual('adminBoss - adminBossNick');
|
expect(worker).toEqual('adminBoss - adminBossNick');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the vehicle was edited', async() => {
|
it('should confirm the vehicle was edited', async() => {
|
||||||
const vehicle = await page.waitToGetProperty(`${selectors.routeBasicData.vehicleAutoComplete} input`, 'value');
|
const vehicle = await page.waitToGetProperty(selectors.routeBasicData.vehicleAutoComplete, 'value');
|
||||||
|
|
||||||
expect(vehicle).toEqual('1111-IMK');
|
expect(vehicle).toEqual('1111-IMK');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the km start was edited', async() => {
|
it('should confirm the km start was edited', async() => {
|
||||||
const kmStart = await page.waitToGetProperty(`${selectors.routeBasicData.kmStartInput} input`, 'value');
|
const kmStart = await page.waitToGetProperty(selectors.routeBasicData.kmStartInput, 'value');
|
||||||
|
|
||||||
expect(kmStart).toEqual('1');
|
expect(kmStart).toEqual('1');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the km end was edited', async() => {
|
it('should confirm the km end was edited', async() => {
|
||||||
const kmEnd = await page.waitToGetProperty(`${selectors.routeBasicData.kmEndInput} input`, 'value');
|
const kmEnd = await page.waitToGetProperty(selectors.routeBasicData.kmEndInput, 'value');
|
||||||
|
|
||||||
expect(kmEnd).toEqual('2');
|
expect(kmEnd).toEqual('2');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue