#1351 e2e order.catalog
This commit is contained in:
parent
8bfcdf435f
commit
46756dfdcb
|
@ -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');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue