Merge branch 'dev' into 6321_negative_tickets

This commit is contained in:
Javier Segarra 2024-07-22 17:30:25 +02:00
parent 0e97c453ed
commit b2d58a1d6f
4 changed files with 7 additions and 6 deletions

View File

@ -233,5 +233,6 @@
"It has been invoiced but the PDF could not be generated": "It has been invoiced but the PDF could not be generated", "It has been invoiced but the PDF could not be generated": "It has been invoiced but the PDF could not be generated",
"It has been invoiced but the PDF of refund not be generated": "It has been invoiced but the PDF of refund not be generated", "It has been invoiced but the PDF of refund not be generated": "It has been invoiced but the PDF of refund not be generated",
"Cannot add holidays on this day": "Cannot add holidays on this day", "Cannot add holidays on this day": "Cannot add holidays on this day",
"Cannot send mail": "Cannot send mail" "Cannot send mail": "Cannot send mail",
"This worker already exists": "This worker already exists"
} }

View File

@ -31,7 +31,7 @@ describe('route getSuggestedTickets()', () => {
const length = result.length; const length = result.length;
const anyResult = result[Math.floor(Math.random() * Math.floor(length))]; const anyResult = result[Math.floor(Math.random() * Math.floor(length))];
expect(result.length).toEqual(4); expect(result.length).toEqual(5);
expect(anyResult.zoneFk).toEqual(1); expect(anyResult.zoneFk).toEqual(1);
expect(anyResult.agencyModeFk).toEqual(8); expect(anyResult.agencyModeFk).toEqual(8);

View File

@ -14,14 +14,14 @@ describe('route unlink()', () => {
let tickets = await models.Route.getSuggestedTickets(routeId, options); let tickets = await models.Route.getSuggestedTickets(routeId, options);
expect(zoneAgencyModes.length).toEqual(4); expect(zoneAgencyModes.length).toEqual(4);
expect(tickets.length).toEqual(3); expect(tickets.length).toEqual(4);
await models.Route.unlink(agencyModeId, zoneId, options); await models.Route.unlink(agencyModeId, zoneId, options);
zoneAgencyModes = await models.ZoneAgencyMode.find(null, options); zoneAgencyModes = await models.ZoneAgencyMode.find(null, options);
tickets = await models.Route.getSuggestedTickets(routeId, options); tickets = await models.Route.getSuggestedTickets(routeId, options);
expect(zoneAgencyModes.length).toEqual(4); expect(zoneAgencyModes.length).toEqual(3);
expect(tickets.length).toEqual(0); expect(tickets.length).toEqual(0);
await tx.rollback(); await tx.rollback();

View File

@ -1,6 +1,6 @@
const models = require('vn-loopback/server/server').models; const models = require('vn-loopback/server/server').models;
fdescribe('Item Lack', () => { describe('Item Lack', () => {
beforeEach(async() => { beforeEach(async() => {
ctx = { ctx = {
req: { req: {
@ -36,7 +36,7 @@ fdescribe('Item Lack', () => {
try { try {
const result = await models.Ticket.itemLack(ctx, filter, options); const result = await models.Ticket.itemLack(ctx, filter, options);
expect(result.length).toEqual(1); expect(result.length).toEqual(2);
await tx.rollback(); await tx.rollback();
} catch (e) { } catch (e) {
await tx.rollback(); await tx.rollback();