From b2d58a1d6f854d0bdb3e89ab7e588e4cfdb61971 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 22 Jul 2024 17:30:25 +0200 Subject: [PATCH] Merge branch 'dev' into 6321_negative_tickets --- loopback/locale/en.json | 3 ++- .../back/methods/route/specs/getSuggestedTickets.spec.js | 2 +- modules/route/back/methods/route/specs/unlink.spec.js | 4 ++-- modules/ticket/back/methods/ticket/specs/itemLack.spec.js | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/loopback/locale/en.json b/loopback/locale/en.json index 382a2824c..f071c9162 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -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 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 send mail": "Cannot send mail" + "Cannot send mail": "Cannot send mail", + "This worker already exists": "This worker already exists" } \ No newline at end of file diff --git a/modules/route/back/methods/route/specs/getSuggestedTickets.spec.js b/modules/route/back/methods/route/specs/getSuggestedTickets.spec.js index 0acc6c1a7..3d6702482 100644 --- a/modules/route/back/methods/route/specs/getSuggestedTickets.spec.js +++ b/modules/route/back/methods/route/specs/getSuggestedTickets.spec.js @@ -31,7 +31,7 @@ describe('route getSuggestedTickets()', () => { const length = result.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.agencyModeFk).toEqual(8); diff --git a/modules/route/back/methods/route/specs/unlink.spec.js b/modules/route/back/methods/route/specs/unlink.spec.js index a543ab416..9d1f48be8 100644 --- a/modules/route/back/methods/route/specs/unlink.spec.js +++ b/modules/route/back/methods/route/specs/unlink.spec.js @@ -14,14 +14,14 @@ describe('route unlink()', () => { let tickets = await models.Route.getSuggestedTickets(routeId, options); expect(zoneAgencyModes.length).toEqual(4); - expect(tickets.length).toEqual(3); + expect(tickets.length).toEqual(4); await models.Route.unlink(agencyModeId, zoneId, options); zoneAgencyModes = await models.ZoneAgencyMode.find(null, options); tickets = await models.Route.getSuggestedTickets(routeId, options); - expect(zoneAgencyModes.length).toEqual(4); + expect(zoneAgencyModes.length).toEqual(3); expect(tickets.length).toEqual(0); await tx.rollback(); diff --git a/modules/ticket/back/methods/ticket/specs/itemLack.spec.js b/modules/ticket/back/methods/ticket/specs/itemLack.spec.js index 2fe928774..93dce11b2 100644 --- a/modules/ticket/back/methods/ticket/specs/itemLack.spec.js +++ b/modules/ticket/back/methods/ticket/specs/itemLack.spec.js @@ -1,6 +1,6 @@ const models = require('vn-loopback/server/server').models; -fdescribe('Item Lack', () => { +describe('Item Lack', () => { beforeEach(async() => { ctx = { req: { @@ -36,7 +36,7 @@ fdescribe('Item Lack', () => { try { const result = await models.Ticket.itemLack(ctx, filter, options); - expect(result.length).toEqual(1); + expect(result.length).toEqual(2); await tx.rollback(); } catch (e) { await tx.rollback();