@labdigital/commercetools-mock 2.30.0 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +374 -203
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +374 -203
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/productSearchFilter.test.ts +328 -0
- package/src/lib/productSearchFilter.ts +329 -0
- package/src/product-search.ts +12 -2
- package/src/repositories/order/actions.ts +9 -0
- package/src/services/order.test.ts +14 -0
|
@@ -403,6 +403,20 @@ describe("Order Update Actions", () => {
|
|
|
403
403
|
expect(response.body.paymentState).toBe("Failed");
|
|
404
404
|
});
|
|
405
405
|
|
|
406
|
+
test("changeShipmentState", async () => {
|
|
407
|
+
assert(order, "order not created");
|
|
408
|
+
|
|
409
|
+
const response = await supertest(ctMock.app)
|
|
410
|
+
.post(`/dummy/orders/${order.id}`)
|
|
411
|
+
.send({
|
|
412
|
+
version: 1,
|
|
413
|
+
actions: [{ action: "changeShipmentState", shipmentState: "Delayed" }],
|
|
414
|
+
});
|
|
415
|
+
expect(response.status).toBe(200);
|
|
416
|
+
expect(response.body.version).toBe(2);
|
|
417
|
+
expect(response.body.shipmentState).toBe("Delayed");
|
|
418
|
+
});
|
|
419
|
+
|
|
406
420
|
test("setDeliveryCustomField", async () => {
|
|
407
421
|
const order: Order = {
|
|
408
422
|
...getBaseResourceProperties(),
|