refs #7004 fix: test

This commit is contained in:
Javier Segarra 2024-03-08 06:40:19 +01:00
parent 680a8a7123
commit 6c4268d5fc
3 changed files with 6 additions and 7 deletions

View File

@ -1,6 +1,6 @@
import getBrowser from '../../helpers/puppeteer'; import getBrowser from '../../helpers/puppeteer';
describe('Supplier fiscal data path', () => { fdescribe('Supplier fiscal data path', () => {
let browser; let browser;
let page; let page;
@ -32,6 +32,7 @@ describe('Supplier fiscal data path', () => {
}; };
const errorMessage = await page.sendForm(form, { const errorMessage = await page.sendForm(form, {
city: 'Valencia',
taxNumber: 'Wrong tax number' taxNumber: 'Wrong tax number'
}); });
const message = await page.sendForm(form, values); const message = await page.sendForm(form, values);

View File

@ -25,9 +25,7 @@ describe('Supplier newSupplier()', () => {
try { try {
const options = {transaction: tx}; const options = {transaction: tx};
ctx.args = { ctx.args = {
name: 'NEWSUPPLIER', name: 'NEWSUPPLIER'
nif: '12345678Z',
city: 'Gotham'
}; };
const result = await models.Supplier.newSupplier(ctx, options); const result = await models.Supplier.newSupplier(ctx, options);

View File

@ -61,7 +61,7 @@ describe('Supplier updateFiscalData()', () => {
sageTransactionTypeFk, sageTransactionTypeFk,
undefined, undefined,
undefined, undefined,
undefined, city,
provinceFk, provinceFk,
countryFk, countryFk,
supplierActivityFk, supplierActivityFk,
@ -78,7 +78,7 @@ describe('Supplier updateFiscalData()', () => {
const supplier = await models.Supplier.updateFiscalData(ctx, const supplier = await models.Supplier.updateFiscalData(ctx,
supplierId, supplierId,
undefined, undefined,
undefined, nif,
account, account,
phone, phone,
undefined, undefined,
@ -96,9 +96,9 @@ describe('Supplier updateFiscalData()', () => {
options); options);
expect(supplier.account).toEqual(account); expect(supplier.account).toEqual(account);
expect(supplier.nif).toEqual(nif);
expect(supplier.phone).toEqual(phone); expect(supplier.phone).toEqual(phone);
expect(supplier.postCode).toEqual(postCode); expect(supplier.postCode).toEqual(postCode);
expect(supplier.account).toEqual(account);
expect(supplier.city).toEqual(city); expect(supplier.city).toEqual(city);
expect(supplier.provinceFk).toEqual(provinceFk); expect(supplier.provinceFk).toEqual(provinceFk);
}); });