#6321 - Negative tickets #1945

Open
jsegarra wants to merge 93 commits from 6321_negative_tickets into dev
4 changed files with 7 additions and 6 deletions
Showing only changes of commit b2d58a1d6f - Show all commits

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();