From 46756dfdcb3636ecc611205b592468802f0e1712 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Thu, 2 May 2019 11:41:24 +0200 Subject: [PATCH] #1351 e2e order.catalog --- modules/item/back/methods/item/specs/filter.spec.js | 12 ++++++------ .../back/methods/order/specs/catalogFilter.spec.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/item/back/methods/item/specs/filter.spec.js b/modules/item/back/methods/item/specs/filter.spec.js index 7344b3116..22cb5913e 100644 --- a/modules/item/back/methods/item/specs/filter.spec.js +++ b/modules/item/back/methods/item/specs/filter.spec.js @@ -22,12 +22,12 @@ describe('item filter()', () => { order: 'isActive ASC, name', limit: 8 }; - let tags = [{value: 'combat fist', tagFk: 58}]; - let result = await app.models.Item.filter({args: {filter: filter, typeFk: 2, tags: tags}}); + let tags = [{value: 'medical box', tagFk: 58}]; + let result = await app.models.Item.filter({args: {filter: filter, typeFk: 5, tags: tags}}); - expect(result.length).toEqual(1); - expect(result[0].id).toEqual(2); - expect(result[0].name).toEqual('Melee weapon combat fist 15cm'); - expect(result[0].type).toEqual('Anthurium'); + expect(result.length).toEqual(2); + expect(result[0].id).toEqual(14); + expect(result[0].name).toEqual('Chest medical box 1m'); + expect(result[1].name).toEqual('Container medical box 1m'); }); }); diff --git a/modules/order/back/methods/order/specs/catalogFilter.spec.js b/modules/order/back/methods/order/specs/catalogFilter.spec.js index 5a1ed6274..f0b57f93e 100644 --- a/modules/order/back/methods/order/specs/catalogFilter.spec.js +++ b/modules/order/back/methods/order/specs/catalogFilter.spec.js @@ -13,7 +13,7 @@ describe('order catalogFilter()', () => { let result = await app.models.Order.catalogFilter(orderFk, orderBy, filter, tags); let firstItemId = result[0].id; - expect(result.length).toEqual(2); + expect(result.length).toEqual(4); expect(firstItemId).toEqual(1); });