@reventlessdev/online-shop-dcb-ordering 1.0.0-alpha.250 → 1.0.0-alpha.252
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/CHANGELOG.md +16 -0
- package/lib/bs/.compiler.log +2 -2
- package/lib/bs/OrderingPlugin.cmi +0 -0
- package/lib/bs/OrderingPlugin.cmt +0 -0
- package/lib/bs/OrderingPlugin.mlmap +1 -0
- package/lib/bs/compiler-info.json +1 -1
- package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/CatalogProduct/StateView/AvailableProducts_Projection-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/StateView/AvailableProducts_Projection-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateChange/RegisterCustomer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/RegisterCustomer_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateView/Customers_Projection-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateView/Customers_Projection-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Automation/AutoShipOrder_Automation-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/Automation/AutoShipOrder_Automation-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChange/CancelOrder-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/CancelOrder-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChange/CancelOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/CancelOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChange/ShipOrder-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/ShipOrder-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChange/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateView/Orders_Projection-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateView/Orders_Projection-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Plugin-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Plugin-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.ast +0 -0
- package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res +14 -10
- package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res.mjs +13 -16
- package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.ast +0 -0
- package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.res +8 -6
- package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.res.mjs +10 -12
- package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.ast +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.res +13 -9
- package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.res.mjs +14 -17
- package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.ast +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.res +13 -9
- package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.res.mjs +14 -17
- package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.ast +0 -0
- package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.res +8 -5
- package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.res.mjs +5 -8
- package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.ast +0 -0
- package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.res +6 -6
- package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.res.mjs +8 -11
- package/lib/bs/tests/Customer/StateView/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateView/Customers_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateView/Customers_GWT.ast +0 -0
- package/lib/bs/tests/Customer/StateView/Customers_GWT.res +16 -20
- package/lib/bs/tests/Customer/StateView/Customers_GWT.res.mjs +30 -32
- package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT.ast +0 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT.res +7 -7
- package/lib/bs/tests/Extension/Products_Extension_GWT.res.mjs +5 -8
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.ast +0 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res +7 -7
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +8 -19
- package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.ast +0 -0
- package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.res +13 -8
- package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.res.mjs +8 -11
- package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.ast +0 -0
- package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res +7 -6
- package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res.mjs +9 -16
- package/lib/bs/tests/Order/StateChange/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChange/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.ast +0 -0
- package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.res +13 -10
- package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.res.mjs +12 -19
- package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.ast +0 -0
- package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.res +19 -18
- package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.res.mjs +31 -42
- package/lib/bs/tests/Order/StateChange/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChange/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.ast +0 -0
- package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.res +10 -6
- package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.res.mjs +6 -9
- package/lib/bs/tests/Order/StateView/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateView/Orders_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateView/Orders_GWT.ast +0 -0
- package/lib/bs/tests/Order/StateView/Orders_GWT.res +14 -21
- package/lib/bs/tests/Order/StateView/Orders_GWT.res.mjs +23 -33
- package/lib/bs/tests/Ordering_Examples-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Ordering_Examples-OrderingPlugin.cmj +0 -0
- package/lib/bs/tests/Ordering_Examples-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Ordering_Examples.ast +0 -0
- package/lib/bs/tests/Ordering_Examples.res +15 -0
- package/lib/bs/tests/Ordering_Examples.res.mjs +39 -0
- package/lib/ocaml/.compiler.log +2 -2
- package/lib/ocaml/AutoShipOrder_Automation-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AutoShipOrder_Automation-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AutoShipOrder_GWT.ast +0 -0
- package/lib/ocaml/AutoShipOrder_GWT.res +13 -8
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AvailableProducts_GWT.ast +0 -0
- package/lib/ocaml/AvailableProducts_GWT.res +8 -6
- package/lib/ocaml/AvailableProducts_Projection-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts_Projection-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder_GWT.ast +0 -0
- package/lib/ocaml/CancelOrder_GWT.res +13 -10
- package/lib/ocaml/ChangeAddress_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeAddress_GWT.ast +0 -0
- package/lib/ocaml/ChangeAddress_GWT.res +13 -9
- package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeEmail_GWT.ast +0 -0
- package/lib/ocaml/ChangeEmail_GWT.res +13 -9
- package/lib/ocaml/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customers_GWT.ast +0 -0
- package/lib/ocaml/Customers_GWT.res +16 -20
- package/lib/ocaml/Customers_Projection-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_Projection-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/DeactivateCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/DeactivateCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/DeactivateCustomer_GWT.ast +0 -0
- package/lib/ocaml/DeactivateCustomer_GWT.res +8 -5
- package/lib/ocaml/OrderingPlugin.cmi +0 -0
- package/lib/ocaml/OrderingPlugin.cmt +0 -0
- package/lib/ocaml/OrderingPlugin.mlmap +1 -0
- package/lib/ocaml/Ordering_Examples-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Ordering_Examples-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Ordering_Examples-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Ordering_Examples.ast +0 -0
- package/lib/ocaml/Ordering_Examples.res +15 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT.ast +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT.res +7 -7
- package/lib/ocaml/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_GWT.ast +0 -0
- package/lib/ocaml/Orders_GWT.res +14 -21
- package/lib/ocaml/Orders_Projection-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_Projection-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/PlaceOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/PlaceOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/PlaceOrder_GWT.ast +0 -0
- package/lib/ocaml/PlaceOrder_GWT.res +19 -18
- package/lib/ocaml/Plugin-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Plugin-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Products_Extension-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Products_Extension-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Products_Extension_GWT.ast +0 -0
- package/lib/ocaml/Products_Extension_GWT.res +7 -7
- package/lib/ocaml/RegisterCustomer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/RegisterCustomer_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/RegisterCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/RegisterCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/RegisterCustomer_GWT.ast +0 -0
- package/lib/ocaml/RegisterCustomer_GWT.res +6 -6
- package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SendOrderConfirmation_GWT.ast +0 -0
- package/lib/ocaml/SendOrderConfirmation_GWT.res +7 -6
- package/lib/ocaml/SendOrderConfirmation_Translation-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SendOrderConfirmation_Translation-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder_GWT.ast +0 -0
- package/lib/ocaml/ShipOrder_GWT.res +10 -6
- package/lib/ocaml/SyncCatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SyncCatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT.ast +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT.res +14 -10
- package/package.json +8 -8
- package/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res +14 -10
- package/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res.mjs +13 -16
- package/tests/CatalogProduct/StateView/AvailableProducts_GWT.res +8 -6
- package/tests/CatalogProduct/StateView/AvailableProducts_GWT.res.mjs +10 -12
- package/tests/Customer/StateChange/ChangeAddress_GWT.res +13 -9
- package/tests/Customer/StateChange/ChangeAddress_GWT.res.mjs +14 -17
- package/tests/Customer/StateChange/ChangeEmail_GWT.res +13 -9
- package/tests/Customer/StateChange/ChangeEmail_GWT.res.mjs +14 -17
- package/tests/Customer/StateChange/DeactivateCustomer_GWT.res +8 -5
- package/tests/Customer/StateChange/DeactivateCustomer_GWT.res.mjs +5 -8
- package/tests/Customer/StateChange/RegisterCustomer_GWT.res +6 -6
- package/tests/Customer/StateChange/RegisterCustomer_GWT.res.mjs +8 -11
- package/tests/Customer/StateView/Customers_GWT.res +16 -20
- package/tests/Customer/StateView/Customers_GWT.res.mjs +30 -32
- package/tests/Extension/Products_Extension_GWT.res +7 -7
- package/tests/Extension/Products_Extension_GWT.res.mjs +5 -8
- package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res +7 -7
- package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +8 -19
- package/tests/Order/Automation/AutoShipOrder_GWT.res +13 -8
- package/tests/Order/Automation/AutoShipOrder_GWT.res.mjs +8 -11
- package/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res +7 -6
- package/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res.mjs +9 -16
- package/tests/Order/StateChange/CancelOrder_GWT.res +13 -10
- package/tests/Order/StateChange/CancelOrder_GWT.res.mjs +12 -19
- package/tests/Order/StateChange/PlaceOrder_GWT.res +19 -18
- package/tests/Order/StateChange/PlaceOrder_GWT.res.mjs +31 -42
- package/tests/Order/StateChange/ShipOrder_GWT.res +10 -6
- package/tests/Order/StateChange/ShipOrder_GWT.res.mjs +6 -9
- package/tests/Order/StateView/Orders_GWT.res +14 -21
- package/tests/Order/StateView/Orders_GWT.res.mjs +23 -33
- package/tests/Ordering_Examples.res +15 -0
- package/tests/Ordering_Examples.res.mjs +39 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as Customers$OrderingPlugin from "../../../src/Customer/StateView/Customers.res.mjs";
|
|
4
4
|
import * as CustomerId$OrderingPlugin from "../../../src/Customer/CustomerId.res.mjs";
|
|
5
5
|
import * as Projection_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Projection_GWT.res.mjs";
|
|
6
|
+
import * as Ordering_Examples$OrderingPlugin from "../../Ordering_Examples.res.mjs";
|
|
6
7
|
import * as Customers_Projection$OrderingPlugin from "../../../src/Customer/StateView/Customers_Projection.res.mjs";
|
|
7
8
|
|
|
8
9
|
let include = Projection_GWT$ReventlessGwt.Make({
|
|
@@ -28,57 +29,57 @@ let thenStateWithId = include.thenStateWithId;
|
|
|
28
29
|
describe("Customers StateViewSlice", () => {
|
|
29
30
|
test("CustomerRegistered creates a row", undefined, () => thenStateWithId(whenEvent(givenEvents([]), {
|
|
30
31
|
TAG: "CustomerRegistered",
|
|
31
|
-
customerId:
|
|
32
|
-
email:
|
|
33
|
-
address:
|
|
32
|
+
customerId: Ordering_Examples$OrderingPlugin.c1,
|
|
33
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
34
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
34
35
|
}), "c1", {
|
|
35
|
-
customerId:
|
|
36
|
-
email:
|
|
37
|
-
address:
|
|
36
|
+
customerId: Ordering_Examples$OrderingPlugin.c1,
|
|
37
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
38
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet,
|
|
38
39
|
deactivated: false
|
|
39
40
|
}));
|
|
40
41
|
test("EmailChanged updates the email", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
41
42
|
TAG: "CustomerRegistered",
|
|
42
|
-
customerId:
|
|
43
|
-
email:
|
|
44
|
-
address:
|
|
43
|
+
customerId: Ordering_Examples$OrderingPlugin.c1,
|
|
44
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
45
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
45
46
|
}]), {
|
|
46
47
|
TAG: "EmailChanged",
|
|
47
|
-
customerId:
|
|
48
|
-
email:
|
|
48
|
+
customerId: Ordering_Examples$OrderingPlugin.c1,
|
|
49
|
+
email: Ordering_Examples$OrderingPlugin.aliceNewEmail
|
|
49
50
|
}), "c1", {
|
|
50
|
-
customerId:
|
|
51
|
-
email:
|
|
52
|
-
address:
|
|
51
|
+
customerId: Ordering_Examples$OrderingPlugin.c1,
|
|
52
|
+
email: Ordering_Examples$OrderingPlugin.aliceNewEmail,
|
|
53
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet,
|
|
53
54
|
deactivated: false
|
|
54
55
|
}));
|
|
55
56
|
test("AddressChanged updates the address", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
56
57
|
TAG: "CustomerRegistered",
|
|
57
|
-
customerId:
|
|
58
|
-
email:
|
|
59
|
-
address:
|
|
58
|
+
customerId: Ordering_Examples$OrderingPlugin.c1,
|
|
59
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
60
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
60
61
|
}]), {
|
|
61
62
|
TAG: "AddressChanged",
|
|
62
|
-
customerId:
|
|
63
|
-
address:
|
|
63
|
+
customerId: Ordering_Examples$OrderingPlugin.c1,
|
|
64
|
+
address: Ordering_Examples$OrderingPlugin.pineStreet
|
|
64
65
|
}), "c1", {
|
|
65
|
-
customerId:
|
|
66
|
-
email:
|
|
67
|
-
address:
|
|
66
|
+
customerId: Ordering_Examples$OrderingPlugin.c1,
|
|
67
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
68
|
+
address: Ordering_Examples$OrderingPlugin.pineStreet,
|
|
68
69
|
deactivated: false
|
|
69
70
|
}));
|
|
70
71
|
test("CustomerDeactivated sets deactivated flag", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
71
72
|
TAG: "CustomerRegistered",
|
|
72
|
-
customerId:
|
|
73
|
-
email:
|
|
74
|
-
address:
|
|
73
|
+
customerId: Ordering_Examples$OrderingPlugin.c1,
|
|
74
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
75
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
75
76
|
}]), {
|
|
76
77
|
TAG: "CustomerDeactivated",
|
|
77
|
-
customerId:
|
|
78
|
+
customerId: Ordering_Examples$OrderingPlugin.c1
|
|
78
79
|
}), "c1", {
|
|
79
|
-
customerId:
|
|
80
|
-
email:
|
|
81
|
-
address:
|
|
80
|
+
customerId: Ordering_Examples$OrderingPlugin.c1,
|
|
81
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
82
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet,
|
|
82
83
|
deactivated: true
|
|
83
84
|
}));
|
|
84
85
|
});
|
|
@@ -105,8 +106,6 @@ let thenThrow = include.thenThrow;
|
|
|
105
106
|
|
|
106
107
|
let thenFail = include.thenFail;
|
|
107
108
|
|
|
108
|
-
let cid = CustomerId$OrderingPlugin.make;
|
|
109
|
-
|
|
110
109
|
export {
|
|
111
110
|
Spec,
|
|
112
111
|
describe,
|
|
@@ -124,6 +123,5 @@ export {
|
|
|
124
123
|
thenNoState,
|
|
125
124
|
thenThrow,
|
|
126
125
|
thenFail,
|
|
127
|
-
cid,
|
|
128
126
|
}
|
|
129
127
|
/* include Not a pure module */
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
// SyncCatalogProduct commands on Ordering's local shadow slice.
|
|
3
3
|
@@reventless.gwt
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
open Ordering_Examples
|
|
6
6
|
|
|
7
7
|
// `Mapping` is brought into scope by the PPX `open Products_Extension`; opening
|
|
8
8
|
// it surfaces the extension point's events and the delegate's commands.
|
|
9
9
|
open Mapping
|
|
10
10
|
|
|
11
11
|
describe("Products Extension delegate", () => {
|
|
12
|
+
// scenario-id: a4680fe3-1546-4669-9334-d8971e2b7162
|
|
12
13
|
test("ProductBecameAvailable issues SyncNewProduct", () =>
|
|
13
14
|
whenIncomingEvent(
|
|
14
|
-
ExtensionPoint.ProductBecameAvailable({productId:
|
|
15
|
-
)->thenPublishesCommand(
|
|
16
|
-
Delegate.SyncNewProduct({productId: pid("p1"), name: "Book", price: 9.99}),
|
|
17
|
-
)
|
|
15
|
+
ExtensionPoint.ProductBecameAvailable({productId: p1, name: "Book", price: 9.99}),
|
|
16
|
+
)->thenPublishesCommand(Delegate.SyncNewProduct({productId: p1, name: "Book", price: 9.99}))
|
|
18
17
|
)
|
|
19
18
|
|
|
19
|
+
// scenario-id: b8178540-b81e-4d82-9b93-9f2f68b968c6
|
|
20
20
|
test("ProductPriceChanged issues ChangeSyncedPrice", () =>
|
|
21
21
|
whenIncomingEvent(
|
|
22
|
-
ExtensionPoint.ProductPriceChanged({productId:
|
|
23
|
-
)->thenPublishesCommand(Delegate.ChangeSyncedPrice({productId:
|
|
22
|
+
ExtensionPoint.ProductPriceChanged({productId: p1, price: 7.5}),
|
|
23
|
+
)->thenPublishesCommand(Delegate.ChangeSyncedPrice({productId: p1, price: 7.5}))
|
|
24
24
|
)
|
|
25
25
|
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
3
|
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
|
-
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/ProductId.res.mjs";
|
|
5
4
|
import * as Delegate_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Delegate_GWT.res.mjs";
|
|
5
|
+
import * as Ordering_Examples$OrderingPlugin from "../Ordering_Examples.res.mjs";
|
|
6
6
|
import * as Products_Extension$OrderingPlugin from "../../src/Extension/Products_Extension.res.mjs";
|
|
7
7
|
import * as SyncCatalogProduct$OrderingPlugin from "../../src/CatalogProduct/StateChange/SyncCatalogProduct.res.mjs";
|
|
8
8
|
import * as Products_ExtensionPoint$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/Products_ExtensionPoint.res.mjs";
|
|
@@ -45,22 +45,22 @@ let thenPublishesCommand = include.thenPublishesCommand;
|
|
|
45
45
|
describe("Products Extension delegate", () => {
|
|
46
46
|
test("ProductBecameAvailable issues SyncNewProduct", undefined, () => thenPublishesCommand(whenIncomingEvent({
|
|
47
47
|
TAG: "ProductBecameAvailable",
|
|
48
|
-
productId:
|
|
48
|
+
productId: Ordering_Examples$OrderingPlugin.p1,
|
|
49
49
|
name: "Book",
|
|
50
50
|
price: 9.99
|
|
51
51
|
}), {
|
|
52
52
|
TAG: "SyncNewProduct",
|
|
53
|
-
productId:
|
|
53
|
+
productId: Ordering_Examples$OrderingPlugin.p1,
|
|
54
54
|
name: "Book",
|
|
55
55
|
price: 9.99
|
|
56
56
|
}));
|
|
57
57
|
test("ProductPriceChanged issues ChangeSyncedPrice", undefined, () => thenPublishesCommand(whenIncomingEvent({
|
|
58
58
|
TAG: "ProductPriceChanged",
|
|
59
|
-
productId:
|
|
59
|
+
productId: Ordering_Examples$OrderingPlugin.p1,
|
|
60
60
|
price: 7.5
|
|
61
61
|
}), {
|
|
62
62
|
TAG: "ChangeSyncedPrice",
|
|
63
|
-
productId:
|
|
63
|
+
productId: Ordering_Examples$OrderingPlugin.p1,
|
|
64
64
|
price: 7.5
|
|
65
65
|
}));
|
|
66
66
|
});
|
|
@@ -91,8 +91,6 @@ let thenHandlesDirectives = include.thenHandlesDirectives;
|
|
|
91
91
|
|
|
92
92
|
let thenHandlesNoDirective = include.thenHandlesNoDirective;
|
|
93
93
|
|
|
94
|
-
let pid = ProductId$CatalogSpec.make;
|
|
95
|
-
|
|
96
94
|
export {
|
|
97
95
|
encCmd,
|
|
98
96
|
encEpCmd,
|
|
@@ -111,6 +109,5 @@ export {
|
|
|
111
109
|
thenHandlesDirective,
|
|
112
110
|
thenHandlesDirectives,
|
|
113
111
|
thenHandlesNoDirective,
|
|
114
|
-
pid,
|
|
115
112
|
}
|
|
116
113
|
/* include Not a pure module */
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
// into one public per-product event each (one-to-many fan-out).
|
|
3
3
|
@@reventless.gwt
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
let oid = OrderId.make
|
|
7
|
-
let pid = CatalogSpec.ProductId.make
|
|
5
|
+
open Ordering_Examples
|
|
8
6
|
|
|
9
7
|
describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
8
|
+
// scenario-id: 1a9119c4-48fe-4f5f-b357-a3326dcd4ae9
|
|
10
9
|
test("OrderPlaced fans out to one ItemOrdered per product", () =>
|
|
11
10
|
whenDelegateEvent(
|
|
12
11
|
Delegate.OrderPlaced({
|
|
13
|
-
orderId:
|
|
14
|
-
customerId:
|
|
15
|
-
productIds: [
|
|
12
|
+
orderId: o1,
|
|
13
|
+
customerId: c1,
|
|
14
|
+
productIds: [p1, p2],
|
|
16
15
|
}),
|
|
17
16
|
)->thenPublishesEvents([
|
|
18
17
|
("p1", ExtensionPoint.ItemOrdered({productId: "p1", orderId: "o1", customerId: "c1"})),
|
|
@@ -20,9 +19,10 @@ describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
|
20
19
|
])
|
|
21
20
|
)
|
|
22
21
|
|
|
22
|
+
// scenario-id: c8a2bb56-33d0-4f1d-a9f0-220e4e04f755
|
|
23
23
|
test("OrderCancelled fans out to one ItemOrderCancelled per product", () =>
|
|
24
24
|
whenDelegateEvent(
|
|
25
|
-
Delegate.OrderCancelled({orderId:
|
|
25
|
+
Delegate.OrderCancelled({orderId: o1, productIds: [p1, p2]}),
|
|
26
26
|
)->thenPublishesEvents([
|
|
27
27
|
("p1", ExtensionPoint.ItemOrderCancelled({productId: "p1", orderId: "o1"})),
|
|
28
28
|
("p2", ExtensionPoint.ItemOrderCancelled({productId: "p2", orderId: "o1"})),
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
3
|
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
|
-
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/ProductId.res.mjs";
|
|
5
|
-
import * as OrderId$OrderingPlugin from "../../src/Order/OrderId.res.mjs";
|
|
6
|
-
import * as CustomerId$OrderingPlugin from "../../src/Customer/CustomerId.res.mjs";
|
|
7
4
|
import * as Delegate_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Delegate_GWT.res.mjs";
|
|
5
|
+
import * as Ordering_Examples$OrderingPlugin from "../Ordering_Examples.res.mjs";
|
|
8
6
|
import * as Orders_ExtensionPoint$OrderingSpec from "@reventlessdev/online-shop-dcb-ordering-spec/src/Orders_ExtensionPoint.res.mjs";
|
|
9
7
|
import * as Orders_ExtensionPointMapping$OrderingPlugin from "../../src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs";
|
|
10
8
|
|
|
@@ -45,11 +43,11 @@ let thenPublishesEvents = include.thenPublishesEvents;
|
|
|
45
43
|
describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
46
44
|
test("OrderPlaced fans out to one ItemOrdered per product", undefined, () => thenPublishesEvents(whenDelegateEvent({
|
|
47
45
|
TAG: "OrderPlaced",
|
|
48
|
-
orderId:
|
|
49
|
-
customerId:
|
|
46
|
+
orderId: Ordering_Examples$OrderingPlugin.o1,
|
|
47
|
+
customerId: Ordering_Examples$OrderingPlugin.c1,
|
|
50
48
|
productIds: [
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
Ordering_Examples$OrderingPlugin.p1,
|
|
50
|
+
Ordering_Examples$OrderingPlugin.p2
|
|
53
51
|
]
|
|
54
52
|
}), [
|
|
55
53
|
[
|
|
@@ -73,10 +71,10 @@ describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
|
73
71
|
]));
|
|
74
72
|
test("OrderCancelled fans out to one ItemOrderCancelled per product", undefined, () => thenPublishesEvents(whenDelegateEvent({
|
|
75
73
|
TAG: "OrderCancelled",
|
|
76
|
-
orderId:
|
|
74
|
+
orderId: Ordering_Examples$OrderingPlugin.o1,
|
|
77
75
|
productIds: [
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
Ordering_Examples$OrderingPlugin.p1,
|
|
77
|
+
Ordering_Examples$OrderingPlugin.p2
|
|
80
78
|
]
|
|
81
79
|
}), [
|
|
82
80
|
[
|
|
@@ -124,12 +122,6 @@ let thenHandlesDirectives = include.thenHandlesDirectives;
|
|
|
124
122
|
|
|
125
123
|
let thenHandlesNoDirective = include.thenHandlesNoDirective;
|
|
126
124
|
|
|
127
|
-
let cid = CustomerId$OrderingPlugin.make;
|
|
128
|
-
|
|
129
|
-
let oid = OrderId$OrderingPlugin.make;
|
|
130
|
-
|
|
131
|
-
let pid = ProductId$CatalogSpec.make;
|
|
132
|
-
|
|
133
125
|
export {
|
|
134
126
|
encEvent,
|
|
135
127
|
encCommand,
|
|
@@ -148,8 +140,5 @@ export {
|
|
|
148
140
|
thenHandlesDirective,
|
|
149
141
|
thenHandlesDirectives,
|
|
150
142
|
thenHandlesNoDirective,
|
|
151
|
-
cid,
|
|
152
|
-
oid,
|
|
153
|
-
pid,
|
|
154
143
|
}
|
|
155
144
|
/* include Not a pure module */
|
|
@@ -22,36 +22,41 @@ module AutoShipOrderSlice = {
|
|
|
22
22
|
|
|
23
23
|
@@reventless.gwt
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
open Ordering_Examples
|
|
26
26
|
|
|
27
27
|
describe("AutoShipOrder AutomationSlice", () => {
|
|
28
|
+
// scenario-id: 02131883-ffbd-430f-a186-86d79daf5fb4
|
|
28
29
|
test("collect: OrderPlaced creates a pending TODO", () =>
|
|
29
|
-
givenEvent(OrderPlaced({orderId:
|
|
30
|
+
givenEvent(OrderPlaced({orderId: o1}))
|
|
30
31
|
->whenCollect
|
|
31
|
-
->thenTodos([("o1", {orderId:
|
|
32
|
+
->thenTodos([("o1", {orderId: o1})])
|
|
32
33
|
)
|
|
33
34
|
|
|
35
|
+
// scenario-id: 9f6c8137-a3ee-4bcd-8f22-59c028d3859e
|
|
34
36
|
test("collect: OrderShipped is ignored (no TODO)", () =>
|
|
35
|
-
givenEvent(OrderShipped({orderId:
|
|
37
|
+
givenEvent(OrderShipped({orderId: o1}))
|
|
36
38
|
->whenCollect
|
|
37
39
|
->thenTodos([])
|
|
38
40
|
)
|
|
39
41
|
|
|
42
|
+
// scenario-id: 0d773a65-4422-45d1-a861-a3b61d144bc5
|
|
40
43
|
test("resolve: OrderShipped marks the TODO done", () =>
|
|
41
|
-
givenEvent(OrderShipped({orderId:
|
|
44
|
+
givenEvent(OrderShipped({orderId: o1}))
|
|
42
45
|
->whenResolve
|
|
43
46
|
->thenResolved(Some("o1"))
|
|
44
47
|
)
|
|
45
48
|
|
|
49
|
+
// scenario-id: def98dd4-ed82-4d4b-9d93-7fd6f77278a4
|
|
46
50
|
test("resolve: OrderPlaced does not mark anything done", () =>
|
|
47
|
-
givenEvent(OrderPlaced({orderId:
|
|
51
|
+
givenEvent(OrderPlaced({orderId: o1}))
|
|
48
52
|
->whenResolve
|
|
49
53
|
->thenResolved(None)
|
|
50
54
|
)
|
|
51
55
|
|
|
56
|
+
// scenario-id: c33672f2-3c0a-489f-baed-79eb15963354
|
|
52
57
|
test("process: pending TODO emits ShipOrder for the same id", () =>
|
|
53
|
-
givenTodo("o1", {orderId:
|
|
58
|
+
givenTodo("o1", {orderId: o1})
|
|
54
59
|
->whenProcess
|
|
55
|
-
->thenCommand("o1", ShipOrder({orderId:
|
|
60
|
+
->thenCommand("o1", ShipOrder({orderId: o1}))
|
|
56
61
|
)
|
|
57
62
|
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as OrderId$OrderingPlugin from "../../../src/Order/OrderId.res.mjs";
|
|
4
3
|
import * as AutoShipOrder$OrderingPlugin from "../../../src/Order/Automation/AutoShipOrder.res.mjs";
|
|
5
4
|
import * as Automation_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Automation_GWT.res.mjs";
|
|
5
|
+
import * as Ordering_Examples$OrderingPlugin from "../../Ordering_Examples.res.mjs";
|
|
6
6
|
import * as AutoShipOrder_Automation$OrderingPlugin from "../../../src/Order/Automation/AutoShipOrder_Automation.res.mjs";
|
|
7
7
|
|
|
8
8
|
let testContext = {
|
|
@@ -71,30 +71,30 @@ let thenCommand = include.thenCommand;
|
|
|
71
71
|
describe("AutoShipOrder AutomationSlice", () => {
|
|
72
72
|
test("collect: OrderPlaced creates a pending TODO", () => thenTodos(whenCollect(givenEvent({
|
|
73
73
|
TAG: "OrderPlaced",
|
|
74
|
-
orderId:
|
|
74
|
+
orderId: Ordering_Examples$OrderingPlugin.o1
|
|
75
75
|
})), [[
|
|
76
76
|
"o1",
|
|
77
77
|
{
|
|
78
|
-
orderId:
|
|
78
|
+
orderId: Ordering_Examples$OrderingPlugin.o1
|
|
79
79
|
}
|
|
80
80
|
]]));
|
|
81
81
|
test("collect: OrderShipped is ignored (no TODO)", () => thenTodos(whenCollect(givenEvent({
|
|
82
82
|
TAG: "OrderShipped",
|
|
83
|
-
orderId:
|
|
83
|
+
orderId: Ordering_Examples$OrderingPlugin.o1
|
|
84
84
|
})), []));
|
|
85
85
|
test("resolve: OrderShipped marks the TODO done", () => thenResolved(whenResolve(givenEvent({
|
|
86
86
|
TAG: "OrderShipped",
|
|
87
|
-
orderId:
|
|
87
|
+
orderId: Ordering_Examples$OrderingPlugin.o1
|
|
88
88
|
})), "o1"));
|
|
89
89
|
test("resolve: OrderPlaced does not mark anything done", () => thenResolved(whenResolve(givenEvent({
|
|
90
90
|
TAG: "OrderPlaced",
|
|
91
|
-
orderId:
|
|
91
|
+
orderId: Ordering_Examples$OrderingPlugin.o1
|
|
92
92
|
})), undefined));
|
|
93
93
|
test("process: pending TODO emits ShipOrder for the same id", () => thenCommand(whenProcess(givenTodo("o1", {
|
|
94
|
-
orderId:
|
|
94
|
+
orderId: Ordering_Examples$OrderingPlugin.o1
|
|
95
95
|
})), "o1", {
|
|
96
96
|
TAG: "ShipOrder",
|
|
97
|
-
orderId:
|
|
97
|
+
orderId: Ordering_Examples$OrderingPlugin.o1
|
|
98
98
|
}));
|
|
99
99
|
});
|
|
100
100
|
|
|
@@ -112,8 +112,6 @@ let andThenEvents = include.andThenEvents;
|
|
|
112
112
|
|
|
113
113
|
let thenScenarioTodos = include.thenScenarioTodos;
|
|
114
114
|
|
|
115
|
-
let oid = OrderId$OrderingPlugin.make;
|
|
116
|
-
|
|
117
115
|
export {
|
|
118
116
|
testContext,
|
|
119
117
|
AutoShipOrderSlice,
|
|
@@ -134,6 +132,5 @@ export {
|
|
|
134
132
|
thenCommands,
|
|
135
133
|
andThenEvents,
|
|
136
134
|
thenScenarioTodos,
|
|
137
|
-
oid,
|
|
138
135
|
}
|
|
139
136
|
/* include Not a pure module */
|
|
@@ -12,24 +12,25 @@ module SendOrderConfirmationSlice = {
|
|
|
12
12
|
|
|
13
13
|
@@reventless.gwt
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
let oid = OrderId.make
|
|
15
|
+
open Ordering_Examples
|
|
17
16
|
|
|
18
17
|
describe("SendOrderConfirmation OutboundTranslationSlice", () => {
|
|
19
18
|
testSync("collect: OrderPlaced queues an outbound TODO", () =>
|
|
20
|
-
givenEvent(OrderPlaced({orderId:
|
|
19
|
+
givenEvent(OrderPlaced({orderId: o1, customerId: c1}))
|
|
21
20
|
->whenCollect
|
|
22
|
-
->thenTodos([("o1", {orderId:
|
|
21
|
+
->thenTodos([("o1", {orderId: o1, customerId: c1})])
|
|
23
22
|
)
|
|
24
23
|
|
|
24
|
+
// scenario-id: f72032f8-25ba-482e-be6e-4c765908bb70
|
|
25
25
|
test("translate success marks the TODO Completed", () =>
|
|
26
|
-
givenTodo("o1", {orderId:
|
|
26
|
+
givenTodo("o1", {orderId: o1, customerId: c1})
|
|
27
27
|
->whenTranslateMocked((_id, _item) => Promise.resolve(Ok(None)))
|
|
28
28
|
->thenTodoStatus("o1", #Completed)
|
|
29
29
|
)
|
|
30
30
|
|
|
31
|
+
// scenario-id: a4563058-8777-4756-8e12-983fcd0e8f20
|
|
31
32
|
test("translate failure leaves the TODO Pending for retry", () =>
|
|
32
|
-
givenTodo("o1", {orderId:
|
|
33
|
+
givenTodo("o1", {orderId: o1, customerId: c1})
|
|
33
34
|
->whenTranslateMocked((_id, _item) => Promise.resolve(Error("smtp down")))
|
|
34
35
|
->thenTodoStatus("o1", #Pending)
|
|
35
36
|
)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
4
|
-
import * as CustomerId$OrderingPlugin from "../../../src/Customer/CustomerId.res.mjs";
|
|
3
|
+
import * as Ordering_Examples$OrderingPlugin from "../../Ordering_Examples.res.mjs";
|
|
5
4
|
import * as SendOrderConfirmation$OrderingPlugin from "../../../src/Order/OutboundTranslation/SendOrderConfirmation.res.mjs";
|
|
6
5
|
import * as OutboundTranslation_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/OutboundTranslation_GWT.res.mjs";
|
|
7
6
|
import * as SendOrderConfirmation_Translation$OrderingPlugin from "../../../src/Order/OutboundTranslation/SendOrderConfirmation_Translation.res.mjs";
|
|
@@ -52,25 +51,25 @@ let thenTodoStatus = include.thenTodoStatus;
|
|
|
52
51
|
describe("SendOrderConfirmation OutboundTranslationSlice", () => {
|
|
53
52
|
testSync("collect: OrderPlaced queues an outbound TODO", () => thenTodos(whenCollect(givenEvent({
|
|
54
53
|
TAG: "OrderPlaced",
|
|
55
|
-
orderId:
|
|
56
|
-
customerId:
|
|
54
|
+
orderId: Ordering_Examples$OrderingPlugin.o1,
|
|
55
|
+
customerId: Ordering_Examples$OrderingPlugin.c1
|
|
57
56
|
}), undefined), [[
|
|
58
57
|
"o1",
|
|
59
58
|
{
|
|
60
|
-
orderId:
|
|
61
|
-
customerId:
|
|
59
|
+
orderId: Ordering_Examples$OrderingPlugin.o1,
|
|
60
|
+
customerId: Ordering_Examples$OrderingPlugin.c1
|
|
62
61
|
}
|
|
63
62
|
]]));
|
|
64
63
|
test("translate success marks the TODO Completed", undefined, () => thenTodoStatus(whenTranslateMocked(givenTodo("o1", {
|
|
65
|
-
orderId:
|
|
66
|
-
customerId:
|
|
64
|
+
orderId: Ordering_Examples$OrderingPlugin.o1,
|
|
65
|
+
customerId: Ordering_Examples$OrderingPlugin.c1
|
|
67
66
|
}), (_id, _item) => Promise.resolve({
|
|
68
67
|
TAG: "Ok",
|
|
69
68
|
_0: undefined
|
|
70
69
|
})), "o1", "Completed"));
|
|
71
70
|
test("translate failure leaves the TODO Pending for retry", undefined, () => thenTodoStatus(whenTranslateMocked(givenTodo("o1", {
|
|
72
|
-
orderId:
|
|
73
|
-
customerId:
|
|
71
|
+
orderId: Ordering_Examples$OrderingPlugin.o1,
|
|
72
|
+
customerId: Ordering_Examples$OrderingPlugin.c1
|
|
74
73
|
}), (_id, _item) => Promise.resolve({
|
|
75
74
|
TAG: "Error",
|
|
76
75
|
_0: "smtp down"
|
|
@@ -87,10 +86,6 @@ let thenNoCommand = include.thenNoCommand;
|
|
|
87
86
|
|
|
88
87
|
let thenRetryRecorded = include.thenRetryRecorded;
|
|
89
88
|
|
|
90
|
-
let cid = CustomerId$OrderingPlugin.make;
|
|
91
|
-
|
|
92
|
-
let oid = OrderId$OrderingPlugin.make;
|
|
93
|
-
|
|
94
89
|
export {
|
|
95
90
|
SendOrderConfirmationSlice,
|
|
96
91
|
Spec,
|
|
@@ -107,7 +102,5 @@ export {
|
|
|
107
102
|
thenNoCommand,
|
|
108
103
|
thenRetryRecorded,
|
|
109
104
|
thenTodoStatus,
|
|
110
|
-
cid,
|
|
111
|
-
oid,
|
|
112
105
|
}
|
|
113
106
|
/* include Not a pure module */
|
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
@@reventless.gwt
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
let pid = CatalogSpec.ProductId.make
|
|
3
|
+
open Ordering_Examples
|
|
5
4
|
|
|
6
5
|
describe("CancelOrder StateChangeSlice", () => {
|
|
6
|
+
// scenario-id: 8ec10480-8490-4004-a83c-1efa3d94695c
|
|
7
7
|
test("non-existent order returns OrderNotFound", () =>
|
|
8
8
|
givenEvents([])
|
|
9
|
-
->whenCmd(CancelOrder({orderId:
|
|
9
|
+
->whenCmd(CancelOrder({orderId: o1}))
|
|
10
10
|
->thenError(OrderNotFound)
|
|
11
11
|
)
|
|
12
12
|
|
|
13
|
+
// scenario-id: df6a7117-bfed-4393-ae46-a35b13339e32
|
|
13
14
|
test("placed order produces OrderCancelled with productIds carried over", () =>
|
|
14
|
-
givenEvents([OrderPlaced({productIds: [
|
|
15
|
-
->whenCmd(CancelOrder({orderId:
|
|
16
|
-
->thenEvent(OrderCancelled({orderId:
|
|
15
|
+
givenEvents([OrderPlaced({productIds: [p1, p2]})])
|
|
16
|
+
->whenCmd(CancelOrder({orderId: o1}))
|
|
17
|
+
->thenEvent(OrderCancelled({orderId: o1, productIds: [p1, p2]}))
|
|
17
18
|
)
|
|
18
19
|
|
|
20
|
+
// scenario-id: e639ee37-866c-45f9-ac7b-d2a902703578
|
|
19
21
|
test("already cancelled order produces no events (idempotent)", () =>
|
|
20
|
-
givenEvents([OrderPlaced({productIds: [
|
|
21
|
-
->whenCmd(CancelOrder({orderId:
|
|
22
|
+
givenEvents([OrderPlaced({productIds: [p1]}), OrderCancelled])
|
|
23
|
+
->whenCmd(CancelOrder({orderId: o1}))
|
|
22
24
|
->thenNoEvent
|
|
23
25
|
)
|
|
24
26
|
|
|
27
|
+
// scenario-id: eb8ae949-bd89-4b4c-9b4c-25992727e172
|
|
25
28
|
test("shipped order returns OrderAlreadyShipped", () =>
|
|
26
|
-
givenEvents([OrderPlaced({productIds: [
|
|
27
|
-
->whenCmd(CancelOrder({orderId:
|
|
29
|
+
givenEvents([OrderPlaced({productIds: [p1]}), OrderShipped])
|
|
30
|
+
->whenCmd(CancelOrder({orderId: o1}))
|
|
28
31
|
->thenError(OrderAlreadyShipped)
|
|
29
32
|
)
|
|
30
33
|
})
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/ProductId.res.mjs";
|
|
4
|
-
import * as OrderId$OrderingPlugin from "../../../src/Order/OrderId.res.mjs";
|
|
5
3
|
import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
|
|
6
4
|
import * as CancelOrder$OrderingPlugin from "../../../src/Order/StateChange/CancelOrder.res.mjs";
|
|
5
|
+
import * as Ordering_Examples$OrderingPlugin from "../../Ordering_Examples.res.mjs";
|
|
7
6
|
import * as CancelOrder_Behavior$OrderingPlugin from "../../../src/Order/StateChange/CancelOrder_Behavior.res.mjs";
|
|
8
7
|
|
|
9
8
|
let include = Behavior_GWT$ReventlessGwt.Make({
|
|
@@ -35,44 +34,44 @@ let thenError = include.thenError;
|
|
|
35
34
|
describe("CancelOrder StateChangeSlice", () => {
|
|
36
35
|
test("non-existent order returns OrderNotFound", () => thenError(whenCmd(givenEvents([]), {
|
|
37
36
|
TAG: "CancelOrder",
|
|
38
|
-
orderId:
|
|
37
|
+
orderId: Ordering_Examples$OrderingPlugin.o1
|
|
39
38
|
}), "OrderNotFound"));
|
|
40
39
|
test("placed order produces OrderCancelled with productIds carried over", () => thenEvent(whenCmd(givenEvents([{
|
|
41
40
|
TAG: "OrderPlaced",
|
|
42
41
|
productIds: [
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
Ordering_Examples$OrderingPlugin.p1,
|
|
43
|
+
Ordering_Examples$OrderingPlugin.p2
|
|
45
44
|
]
|
|
46
45
|
}]), {
|
|
47
46
|
TAG: "CancelOrder",
|
|
48
|
-
orderId:
|
|
47
|
+
orderId: Ordering_Examples$OrderingPlugin.o1
|
|
49
48
|
}), {
|
|
50
49
|
TAG: "OrderCancelled",
|
|
51
|
-
orderId:
|
|
50
|
+
orderId: Ordering_Examples$OrderingPlugin.o1,
|
|
52
51
|
productIds: [
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
Ordering_Examples$OrderingPlugin.p1,
|
|
53
|
+
Ordering_Examples$OrderingPlugin.p2
|
|
55
54
|
]
|
|
56
55
|
}));
|
|
57
56
|
test("already cancelled order produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([
|
|
58
57
|
{
|
|
59
58
|
TAG: "OrderPlaced",
|
|
60
|
-
productIds: [
|
|
59
|
+
productIds: [Ordering_Examples$OrderingPlugin.p1]
|
|
61
60
|
},
|
|
62
61
|
"OrderCancelled"
|
|
63
62
|
]), {
|
|
64
63
|
TAG: "CancelOrder",
|
|
65
|
-
orderId:
|
|
64
|
+
orderId: Ordering_Examples$OrderingPlugin.o1
|
|
66
65
|
})));
|
|
67
66
|
test("shipped order returns OrderAlreadyShipped", () => thenError(whenCmd(givenEvents([
|
|
68
67
|
{
|
|
69
68
|
TAG: "OrderPlaced",
|
|
70
|
-
productIds: [
|
|
69
|
+
productIds: [Ordering_Examples$OrderingPlugin.p1]
|
|
71
70
|
},
|
|
72
71
|
"OrderShipped"
|
|
73
72
|
]), {
|
|
74
73
|
TAG: "CancelOrder",
|
|
75
|
-
orderId:
|
|
74
|
+
orderId: Ordering_Examples$OrderingPlugin.o1
|
|
76
75
|
}), "OrderAlreadyShipped"));
|
|
77
76
|
});
|
|
78
77
|
|
|
@@ -90,10 +89,6 @@ let thenAppendsConditionedOn = include.thenAppendsConditionedOn;
|
|
|
90
89
|
|
|
91
90
|
let thenAppendsConditionedOnExactly = include.thenAppendsConditionedOnExactly;
|
|
92
91
|
|
|
93
|
-
let oid = OrderId$OrderingPlugin.make;
|
|
94
|
-
|
|
95
|
-
let pid = ProductId$CatalogSpec.make;
|
|
96
|
-
|
|
97
92
|
export {
|
|
98
93
|
Spec,
|
|
99
94
|
describe,
|
|
@@ -109,7 +104,5 @@ export {
|
|
|
109
104
|
thenError,
|
|
110
105
|
thenAppendsConditionedOn,
|
|
111
106
|
thenAppendsConditionedOnExactly,
|
|
112
|
-
oid,
|
|
113
|
-
pid,
|
|
114
107
|
}
|
|
115
108
|
/* include Not a pure module */
|