This commit is contained in:
parent
aedd551371
commit
0fd012930e
|
@ -22,7 +22,7 @@ describe('Item Component vnClaimDescriptor', () => {
|
||||||
};
|
};
|
||||||
const serializedParams = $httpParamSerializer(params);
|
const serializedParams = $httpParamSerializer(params);
|
||||||
let expectedPath = `api/report/claim-pickup-order?${serializedParams}`;
|
let expectedPath = `api/report/claim-pickup-order?${serializedParams}`;
|
||||||
jest.spyOn(window, 'open');
|
jest.spyOn(window, 'open').mockReturnThis();
|
||||||
controller.showPickupOrder();
|
controller.showPickupOrder();
|
||||||
|
|
||||||
expect(window.open).toHaveBeenCalledWith(expectedPath);
|
expect(window.open).toHaveBeenCalledWith(expectedPath);
|
||||||
|
|
|
@ -31,7 +31,7 @@ describe('Client', () => {
|
||||||
it('should apply the filters on he models and get the client balance', () => {
|
it('should apply the filters on he models and get the client balance', () => {
|
||||||
controller._companyId = 442;
|
controller._companyId = 442;
|
||||||
controller.$stateParams.id = 101;
|
controller.$stateParams.id = 101;
|
||||||
jest.spyOn(controller, 'getBalances');
|
jest.spyOn(controller, 'getBalances').mockReturnThis();
|
||||||
jest.spyOn(controller.$.model, 'applyFilter').mockReturnValue(Promise.resolve());
|
jest.spyOn(controller.$.model, 'applyFilter').mockReturnValue(Promise.resolve());
|
||||||
jest.spyOn(controller.$.riskModel, 'applyFilter').mockReturnValue(Promise.resolve());
|
jest.spyOn(controller.$.riskModel, 'applyFilter').mockReturnValue(Promise.resolve());
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ describe('Entry Component vnEntryDescriptor', () => {
|
||||||
};
|
};
|
||||||
const serializedParams = $httpParamSerializer(params);
|
const serializedParams = $httpParamSerializer(params);
|
||||||
let expectedPath = `api/report/entry-order?${serializedParams}`;
|
let expectedPath = `api/report/entry-order?${serializedParams}`;
|
||||||
jest.spyOn(window, 'open');
|
jest.spyOn(window, 'open').mockReturnThis();
|
||||||
controller.showEntryReport();
|
controller.showEntryReport();
|
||||||
|
|
||||||
expect(window.open).toHaveBeenCalledWith(expectedPath);
|
expect(window.open).toHaveBeenCalledWith(expectedPath);
|
||||||
|
|
|
@ -119,7 +119,7 @@ describe('Route', () => {
|
||||||
|
|
||||||
describe('goToBuscaman()', () => {
|
describe('goToBuscaman()', () => {
|
||||||
it('should open buscaman with the given arguments', () => {
|
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';
|
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};
|
controller.route = {vehicleFk: 1};
|
||||||
const url = `Routes/${controller.route.vehicleFk}/getDeliveryPoint`;
|
const url = `Routes/${controller.route.vehicleFk}/getDeliveryPoint`;
|
||||||
|
|
|
@ -90,7 +90,7 @@ describe('Ticket Component vnTicketDescriptor', () => {
|
||||||
};
|
};
|
||||||
const serializedParams = $httpParamSerializer(params);
|
const serializedParams = $httpParamSerializer(params);
|
||||||
let expectedPath = `api/report/delivery-note?${serializedParams}`;
|
let expectedPath = `api/report/delivery-note?${serializedParams}`;
|
||||||
jest.spyOn(window, 'open');
|
jest.spyOn(window, 'open').mockReturnThis();
|
||||||
controller.showDeliveryNote();
|
controller.showDeliveryNote();
|
||||||
|
|
||||||
expect(window.open).toHaveBeenCalledWith(expectedPath);
|
expect(window.open).toHaveBeenCalledWith(expectedPath);
|
||||||
|
|
Loading…
Reference in New Issue