parent
b8aceba31d
commit
8c5d2d5903
|
@ -620,6 +620,7 @@ let actions = {
|
|||
},
|
||||
|
||||
async setInput(selector, value) {
|
||||
await this.waitForSelector(selector);
|
||||
const input = await this.$(selector);
|
||||
const tagName = (await input.evaluate(e => e.tagName)).toLowerCase();
|
||||
|
||||
|
|
|
@ -1,20 +1,5 @@
|
|||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
const $ = {
|
||||
saveButton: 'vn-supplier-fiscal-data button[type="submit"]',
|
||||
};
|
||||
const $inputs = {
|
||||
province: 'vn-supplier-fiscal-data [name="province"]',
|
||||
country: 'vn-supplier-fiscal-data [name="country"]',
|
||||
postcode: 'vn-supplier-fiscal-data [name="postcode"]',
|
||||
city: 'vn-supplier-fiscal-data [name="city"]',
|
||||
socialName: 'vn-supplier-fiscal-data [name="socialName"]',
|
||||
taxNumber: 'vn-supplier-fiscal-data [name="taxNumber"]',
|
||||
account: 'vn-supplier-fiscal-data [name="account"]',
|
||||
sageWithholding: 'vn-supplier-fiscal-data [ng-model="$ctrl.supplier.sageWithholdingFk"]',
|
||||
sageTaxType: 'vn-supplier-fiscal-data [ng-model="$ctrl.supplier.sageTaxTypeFk"]'
|
||||
};
|
||||
|
||||
describe('Supplier fiscal data path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
@ -30,7 +15,7 @@ describe('Supplier fiscal data path', () => {
|
|||
await browser.close();
|
||||
});
|
||||
|
||||
it('should attempt to edit the fiscal data and check data is saved', async() => {
|
||||
it('should attempt to edit the fiscal data and check data iss saved', async() => {
|
||||
await page.accessToSection('supplier.card.fiscalData');
|
||||
|
||||
const form = 'vn-supplier-fiscal-data form';
|
||||
|
@ -40,16 +25,16 @@ describe('Supplier fiscal data path', () => {
|
|||
postcode: null,
|
||||
city: 'Valencia',
|
||||
socialName: 'Farmer King SL',
|
||||
taxNumber: 'Wrong tax number',
|
||||
taxNumber: '12345678Z',
|
||||
account: '0123456789',
|
||||
sageWithholding: 'retencion estimacion objetiva',
|
||||
sageTaxType: 'operaciones no sujetas'
|
||||
};
|
||||
|
||||
const errorMessage = await page.sendForm(form, values);
|
||||
const message = await page.sendForm(form, {
|
||||
taxNumber: '12345678Z'
|
||||
const errorMessage = await page.sendForm(form, {
|
||||
taxNumber: 'Wrong tax number'
|
||||
});
|
||||
const message = await page.sendForm(form, values);
|
||||
|
||||
await page.reloadSection('supplier.card.fiscalData');
|
||||
const formValues = await page.fetchForm(form, Object.keys(values));
|
||||
|
|
Loading…
Reference in New Issue