diff --git a/modules/claim/front/descriptor/index.spec.js b/modules/claim/front/descriptor/index.spec.js index 53fa289e0..a64d5ecc1 100644 --- a/modules/claim/front/descriptor/index.spec.js +++ b/modules/claim/front/descriptor/index.spec.js @@ -22,7 +22,7 @@ describe('Item Component vnClaimDescriptor', () => { }; const serializedParams = $httpParamSerializer(params); let expectedPath = `api/report/claim-pickup-order?${serializedParams}`; - jest.spyOn(window, 'open'); + jest.spyOn(window, 'open').mockReturnThis(); controller.showPickupOrder(); expect(window.open).toHaveBeenCalledWith(expectedPath); diff --git a/modules/client/front/balance/index/index.spec.js b/modules/client/front/balance/index/index.spec.js index 769164def..265c3176b 100644 --- a/modules/client/front/balance/index/index.spec.js +++ b/modules/client/front/balance/index/index.spec.js @@ -31,7 +31,7 @@ describe('Client', () => { it('should apply the filters on he models and get the client balance', () => { controller._companyId = 442; controller.$stateParams.id = 101; - jest.spyOn(controller, 'getBalances'); + jest.spyOn(controller, 'getBalances').mockReturnThis(); jest.spyOn(controller.$.model, 'applyFilter').mockReturnValue(Promise.resolve()); jest.spyOn(controller.$.riskModel, 'applyFilter').mockReturnValue(Promise.resolve()); diff --git a/modules/entry/front/descriptor/index.spec.js b/modules/entry/front/descriptor/index.spec.js index 69472eae1..f73604d51 100644 --- a/modules/entry/front/descriptor/index.spec.js +++ b/modules/entry/front/descriptor/index.spec.js @@ -26,7 +26,7 @@ describe('Entry Component vnEntryDescriptor', () => { }; const serializedParams = $httpParamSerializer(params); let expectedPath = `api/report/entry-order?${serializedParams}`; - jest.spyOn(window, 'open'); + jest.spyOn(window, 'open').mockReturnThis(); controller.showEntryReport(); expect(window.open).toHaveBeenCalledWith(expectedPath); diff --git a/modules/route/front/tickets/index.spec.js b/modules/route/front/tickets/index.spec.js index d07aa9690..e9278d031 100644 --- a/modules/route/front/tickets/index.spec.js +++ b/modules/route/front/tickets/index.spec.js @@ -119,7 +119,7 @@ describe('Route', () => { describe('goToBuscaman()', () => { it('should open buscaman with the given arguments', () => { - jest.spyOn(window, 'open'); + jest.spyOn(window, 'open').mockReturnThis(); const expectedUrl = 'http://gps.buscalia.com/usuario/localizar.aspx?bmi=true&addr=46460 Av Espioca 100+to:n19 London my street'; controller.route = {vehicleFk: 1}; const url = `Routes/${controller.route.vehicleFk}/getDeliveryPoint`; diff --git a/modules/ticket/front/descriptor/index.spec.js b/modules/ticket/front/descriptor/index.spec.js index 21b4fc0eb..645a9fcf1 100644 --- a/modules/ticket/front/descriptor/index.spec.js +++ b/modules/ticket/front/descriptor/index.spec.js @@ -90,7 +90,7 @@ describe('Ticket Component vnTicketDescriptor', () => { }; const serializedParams = $httpParamSerializer(params); let expectedPath = `api/report/delivery-note?${serializedParams}`; - jest.spyOn(window, 'open'); + jest.spyOn(window, 'open').mockReturnThis(); controller.showDeliveryNote(); expect(window.open).toHaveBeenCalledWith(expectedPath);