@reventlessdev/online-shop-aggregates-ordering 3.0.0-alpha.249 → 3.0.0-alpha.251
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/Aggregate/CatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/Aggregate/Customer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/Aggregate/Customer_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers_Projections-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers_Projections-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/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Aggregate/Order-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/Aggregate/Order-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Mappings-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Mappings-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/ReadModel/Orders_Projections-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/ReadModel/Orders_Projections-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/SideEffect/Order_EmailNotification-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/SideEffect/Order_EmailNotification-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/src/Task/OrderNotifications-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Task/OrderNotifications-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT.ast +0 -0
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT.res +11 -5
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT.res.mjs +6 -5
- package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT.ast +0 -0
- package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT.res +2 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT.ast +0 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT.res +32 -17
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT.res.mjs +31 -30
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT.ast +0 -0
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT.res +4 -0
- 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 +3 -2
- package/lib/bs/tests/Extension/Products_Extension_GWT.res.mjs +3 -5
- 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 +5 -3
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +6 -16
- package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT.ast +0 -0
- package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT.res +4 -0
- package/lib/bs/tests/Order/Aggregate/Order_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/Aggregate/Order_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/Aggregate/Order_GWT.ast +0 -0
- package/lib/bs/tests/Order/Aggregate/Order_GWT.res +24 -5
- package/lib/bs/tests/Order/Aggregate/Order_GWT.res.mjs +6 -5
- package/lib/bs/tests/Order/ReadModel/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/ReadModel/Orders_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/ReadModel/Orders_GWT.ast +0 -0
- package/lib/bs/tests/Order/ReadModel/Orders_GWT.res +4 -0
- package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT-OrderingPlugin.cmt +0 -0
- 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 +13 -0
- package/lib/bs/tests/Ordering_Examples.res.mjs +35 -0
- package/lib/ocaml/.compiler.log +2 -2
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AvailableProducts_GWT.ast +0 -0
- package/lib/ocaml/AvailableProducts_GWT.res +2 -0
- package/lib/ocaml/CatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CatalogProduct_GWT.ast +0 -0
- package/lib/ocaml/CatalogProduct_GWT.res +11 -5
- package/lib/ocaml/Customer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customer_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customer_GWT.ast +0 -0
- package/lib/ocaml/Customer_GWT.res +32 -17
- 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 +4 -0
- package/lib/ocaml/Customers_Projections-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_Projections-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/OrderMappings_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/OrderMappings_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/OrderMappings_GWT.ast +0 -0
- package/lib/ocaml/OrderMappings_GWT.res +4 -0
- package/lib/ocaml/OrderNotifications-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/OrderNotifications-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order_EmailNotification-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order_EmailNotification-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order_EmailNotification_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order_EmailNotification_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order_GWT.ast +0 -0
- package/lib/ocaml/Order_GWT.res +24 -5
- package/lib/ocaml/Order_Mappings-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order_Mappings-OrderingPlugin.cmt +0 -0
- 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 +13 -0
- package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmt +0 -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 +5 -3
- 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 +4 -0
- package/lib/ocaml/Orders_Projections-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_Projections-OrderingPlugin.cmt +0 -0
- 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 +3 -2
- package/package.json +8 -8
- package/tests/CatalogProduct/Aggregate/CatalogProduct_GWT.res +11 -5
- package/tests/CatalogProduct/Aggregate/CatalogProduct_GWT.res.mjs +6 -5
- package/tests/CatalogProduct/ReadModel/AvailableProducts_GWT.res +2 -0
- package/tests/Customer/Aggregate/Customer_GWT.res +32 -17
- package/tests/Customer/Aggregate/Customer_GWT.res.mjs +31 -30
- package/tests/Customer/ReadModel/Customers_GWT.res +4 -0
- package/tests/Extension/Products_Extension_GWT.res +3 -2
- package/tests/Extension/Products_Extension_GWT.res.mjs +3 -5
- package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res +5 -3
- package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +6 -16
- package/tests/Order/Aggregate/OrderMappings_GWT.res +4 -0
- package/tests/Order/Aggregate/Order_GWT.res +24 -5
- package/tests/Order/Aggregate/Order_GWT.res.mjs +6 -5
- package/tests/Order/ReadModel/Orders_GWT.res +4 -0
- package/tests/Ordering_Examples.res +13 -0
- package/tests/Ordering_Examples.res.mjs +35 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 3.0.0-alpha.251 (2026-09-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @reventlessdev/online-shop-aggregates-ordering
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 3.0.0-alpha.250 (2026-09-23)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @reventlessdev/online-shop-aggregates-ordering
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# 3.0.0-alpha.249 (2026-09-22)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @reventlessdev/online-shop-aggregates-ordering
|
package/lib/bs/.compiler.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Start(
|
|
2
|
-
#Done(
|
|
1
|
+
#Start(1790194674831)
|
|
2
|
+
#Done(1790194681122)
|
|
Binary file
|
|
Binary file
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
"bsc_hash": "1006241435e8d5052329c523202a7fe6359a37e1e1688c023d37d6a7ebb5fb6d",
|
|
5
5
|
"rescript_config_hash": "4c884bf958b93b21c77764e35498f269b81377cfcc324135f1ab7a1cc5b569cb",
|
|
6
6
|
"runtime_path": "/home/runner/work/reventless-core/reventless-core/node_modules/@rescript/runtime",
|
|
7
|
-
"generated_at": "
|
|
7
|
+
"generated_at": "1790194681132"
|
|
8
8
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
@@reventless.gwt
|
|
2
2
|
|
|
3
|
+
open Ordering_Examples
|
|
4
|
+
|
|
3
5
|
describe("CatalogProduct Behavior", () => {
|
|
6
|
+
// scenario-id: e0d3dd62-1687-4920-a1ad-d61733936926
|
|
4
7
|
test("Sync on new aggregate produces Synced", () =>
|
|
5
8
|
givenEvents([])
|
|
6
|
-
->whenCmd(Sync({name:
|
|
7
|
-
->thenEvent(Synced({name:
|
|
9
|
+
->whenCmd(Sync({name: laptop, price: 999.99}))
|
|
10
|
+
->thenEvent(Synced({name: laptop, price: 999.99}))
|
|
8
11
|
)
|
|
9
12
|
|
|
13
|
+
// scenario-id: aa7ebc46-2b74-440d-92b1-d5b6262de254
|
|
10
14
|
test("Sync on already-synced aggregate produces no events (idempotent)", () =>
|
|
11
|
-
givenEvents([Synced({name:
|
|
12
|
-
->whenCmd(Sync({name:
|
|
15
|
+
givenEvents([Synced({name: laptop, price: 999.99})])
|
|
16
|
+
->whenCmd(Sync({name: laptop, price: 999.99}))
|
|
13
17
|
->thenNoEvent
|
|
14
18
|
)
|
|
15
19
|
|
|
20
|
+
// scenario-id: 69fe9b40-3a62-497d-b39b-098173ef8cd5
|
|
16
21
|
test("UpdatePrice on never-synced aggregate produces no events (idempotent)", () =>
|
|
17
22
|
givenEvents([])
|
|
18
23
|
->whenCmd(UpdatePrice({price: 1.0}))
|
|
19
24
|
->thenNoEvent
|
|
20
25
|
)
|
|
21
26
|
|
|
27
|
+
// scenario-id: fef61ceb-02a6-4d0c-a1e9-297c99a4d7d9
|
|
22
28
|
test("UpdatePrice on synced aggregate produces PriceUpdated", () =>
|
|
23
|
-
givenEvents([Synced({name:
|
|
29
|
+
givenEvents([Synced({name: laptop, price: 999.99})])
|
|
24
30
|
->whenCmd(UpdatePrice({price: 899.99}))
|
|
25
31
|
->thenEvent(PriceUpdated({price: 899.99}))
|
|
26
32
|
)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
|
|
4
4
|
import * as CatalogProduct$OrderingPlugin from "../../../src/CatalogProduct/Aggregate/CatalogProduct.res.mjs";
|
|
5
|
+
import * as Ordering_Examples$OrderingPlugin from "../../Ordering_Examples.res.mjs";
|
|
5
6
|
import * as CatalogProduct_Behavior$OrderingPlugin from "../../../src/CatalogProduct/Aggregate/CatalogProduct_Behavior.res.mjs";
|
|
6
7
|
|
|
7
8
|
let include = Behavior_GWT$ReventlessGwt.MakeFromAggregate({
|
|
@@ -38,20 +39,20 @@ let thenNoEvent = include.thenNoEvent;
|
|
|
38
39
|
describe("CatalogProduct Behavior", () => {
|
|
39
40
|
test("Sync on new aggregate produces Synced", () => thenEvent(whenCmd(givenEvents([]), {
|
|
40
41
|
TAG: "Sync",
|
|
41
|
-
name:
|
|
42
|
+
name: Ordering_Examples$OrderingPlugin.laptop,
|
|
42
43
|
price: 999.99
|
|
43
44
|
}), {
|
|
44
45
|
TAG: "Synced",
|
|
45
|
-
name:
|
|
46
|
+
name: Ordering_Examples$OrderingPlugin.laptop,
|
|
46
47
|
price: 999.99
|
|
47
48
|
}));
|
|
48
49
|
test("Sync on already-synced aggregate produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([{
|
|
49
50
|
TAG: "Synced",
|
|
50
|
-
name:
|
|
51
|
+
name: Ordering_Examples$OrderingPlugin.laptop,
|
|
51
52
|
price: 999.99
|
|
52
53
|
}]), {
|
|
53
54
|
TAG: "Sync",
|
|
54
|
-
name:
|
|
55
|
+
name: Ordering_Examples$OrderingPlugin.laptop,
|
|
55
56
|
price: 999.99
|
|
56
57
|
})));
|
|
57
58
|
test("UpdatePrice on never-synced aggregate produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([]), {
|
|
@@ -60,7 +61,7 @@ describe("CatalogProduct Behavior", () => {
|
|
|
60
61
|
})));
|
|
61
62
|
test("UpdatePrice on synced aggregate produces PriceUpdated", () => thenEvent(whenCmd(givenEvents([{
|
|
62
63
|
TAG: "Synced",
|
|
63
|
-
name:
|
|
64
|
+
name: Ordering_Examples$OrderingPlugin.laptop,
|
|
64
65
|
price: 999.99
|
|
65
66
|
}]), {
|
|
66
67
|
TAG: "UpdatePrice",
|
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
@@reventless.gwt(AvailableProducts_Projections.CatalogProductMapping)
|
|
2
2
|
|
|
3
3
|
describe("AvailableProducts ReadModel ← CatalogProduct", () => {
|
|
4
|
+
// scenario-id: 845f7b2c-e29b-469f-a497-654927750d09
|
|
4
5
|
test("Synced sets initial read model state", () =>
|
|
5
6
|
givenEvents([])
|
|
6
7
|
->whenEvent(CatalogProduct.Synced({name: "Laptop", price: 999.99}))
|
|
7
8
|
->thenState({AvailableProducts.name: "Laptop", price: 999.99})
|
|
8
9
|
)
|
|
9
10
|
|
|
11
|
+
// scenario-id: 272d70a8-20d7-4f33-bca1-ec101bd5f702
|
|
10
12
|
test("PriceUpdated updates the price", () =>
|
|
11
13
|
givenEvents([CatalogProduct.Synced({name: "Laptop", price: 999.99})])
|
|
12
14
|
->whenEvent(CatalogProduct.PriceUpdated({price: 899.99}))
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,80 +1,95 @@
|
|
|
1
1
|
@@reventless.gwt
|
|
2
2
|
|
|
3
|
+
open Ordering_Examples
|
|
4
|
+
|
|
3
5
|
describe("Customer Behavior", () => {
|
|
6
|
+
// scenario-id: 5936d064-3500-474f-ac41-619765828d32
|
|
4
7
|
test("Register on new aggregate produces Registered", () =>
|
|
5
8
|
givenEvents([])
|
|
6
|
-
->whenCmd(Register({email:
|
|
7
|
-
->thenEvent(Registered({email:
|
|
9
|
+
->whenCmd(Register({email: aliceEmail, address: mainStreet}))
|
|
10
|
+
->thenEvent(Registered({email: aliceEmail, address: mainStreet}))
|
|
8
11
|
)
|
|
9
12
|
|
|
13
|
+
// scenario-id: 93201f16-17d6-4f94-a096-2dbec3c4306c
|
|
10
14
|
test("Register on existing aggregate returns CustomerAlreadyRegistered", () =>
|
|
11
|
-
givenEvents([Registered({email:
|
|
12
|
-
->whenCmd(Register({email:
|
|
15
|
+
givenEvents([Registered({email: aliceEmail, address: mainStreet})])
|
|
16
|
+
->whenCmd(Register({email: bobEmail, address: oakAvenue}))
|
|
13
17
|
->thenError(CustomerAlreadyRegistered)
|
|
14
18
|
)
|
|
15
19
|
|
|
20
|
+
// scenario-id: fcbc5972-10f0-43ae-a402-21fa7e398e2b
|
|
16
21
|
test("Register on deactivated aggregate returns CustomerAlreadyDeactivated", () =>
|
|
17
|
-
givenEvents([Registered({email:
|
|
18
|
-
->whenCmd(Register({email:
|
|
22
|
+
givenEvents([Registered({email: aliceEmail, address: mainStreet}), Deactivated])
|
|
23
|
+
->whenCmd(Register({email: bobEmail, address: oakAvenue}))
|
|
19
24
|
->thenError(CustomerAlreadyDeactivated)
|
|
20
25
|
)
|
|
21
26
|
|
|
27
|
+
// scenario-id: eb52c72f-448a-47f6-b6dc-1454fb0976a6
|
|
22
28
|
test("UpdateEmail on non-existent aggregate returns CustomerNotFound", () =>
|
|
23
29
|
givenEvents([])
|
|
24
|
-
->whenCmd(UpdateEmail({email:
|
|
30
|
+
->whenCmd(UpdateEmail({email: bobEmail}))
|
|
25
31
|
->thenError(CustomerNotFound)
|
|
26
32
|
)
|
|
27
33
|
|
|
34
|
+
// scenario-id: 0da39fef-7112-4f6b-93d6-f1479d8d384b
|
|
28
35
|
test("UpdateEmail on active customer produces EmailUpdated", () =>
|
|
29
|
-
givenEvents([Registered({email:
|
|
36
|
+
givenEvents([Registered({email: aliceEmail, address: mainStreet})])
|
|
30
37
|
->whenCmd(UpdateEmail({email: "alice2@example.com"}))
|
|
31
38
|
->thenEvent(EmailUpdated({email: "alice2@example.com"}))
|
|
32
39
|
)
|
|
33
40
|
|
|
41
|
+
// scenario-id: 27d8e526-daa8-4b11-be68-c1107394f75d
|
|
34
42
|
test("UpdateEmail to same email produces no events (idempotent)", () =>
|
|
35
|
-
givenEvents([Registered({email:
|
|
36
|
-
->whenCmd(UpdateEmail({email:
|
|
43
|
+
givenEvents([Registered({email: aliceEmail, address: mainStreet})])
|
|
44
|
+
->whenCmd(UpdateEmail({email: aliceEmail}))
|
|
37
45
|
->thenNoEvent
|
|
38
46
|
)
|
|
39
47
|
|
|
48
|
+
// scenario-id: f95d0cde-1011-4566-975b-ef086015d811
|
|
40
49
|
test("UpdateEmail on deactivated customer returns CustomerAlreadyDeactivated", () =>
|
|
41
|
-
givenEvents([Registered({email:
|
|
42
|
-
->whenCmd(UpdateEmail({email:
|
|
50
|
+
givenEvents([Registered({email: aliceEmail, address: mainStreet}), Deactivated])
|
|
51
|
+
->whenCmd(UpdateEmail({email: bobEmail}))
|
|
43
52
|
->thenError(CustomerAlreadyDeactivated)
|
|
44
53
|
)
|
|
45
54
|
|
|
55
|
+
// scenario-id: 856f318e-b0da-4ae8-98bd-0a27c32cfb68
|
|
46
56
|
test("UpdateAddress on non-existent aggregate returns CustomerNotFound", () =>
|
|
47
57
|
givenEvents([])
|
|
48
58
|
->whenCmd(UpdateAddress({address: "x"}))
|
|
49
59
|
->thenError(CustomerNotFound)
|
|
50
60
|
)
|
|
51
61
|
|
|
62
|
+
// scenario-id: 2f4959d6-b687-4659-b5a6-282a6463d1d8
|
|
52
63
|
test("UpdateAddress on active customer produces AddressUpdated", () =>
|
|
53
|
-
givenEvents([Registered({email:
|
|
64
|
+
givenEvents([Registered({email: aliceEmail, address: mainStreet})])
|
|
54
65
|
->whenCmd(UpdateAddress({address: "789 Pine Rd"}))
|
|
55
66
|
->thenEvent(AddressUpdated({address: "789 Pine Rd"}))
|
|
56
67
|
)
|
|
57
68
|
|
|
69
|
+
// scenario-id: 004ce506-1231-43d7-a659-263af800b815
|
|
58
70
|
test("UpdateAddress to same address produces no events (idempotent)", () =>
|
|
59
|
-
givenEvents([Registered({email:
|
|
60
|
-
->whenCmd(UpdateAddress({address:
|
|
71
|
+
givenEvents([Registered({email: aliceEmail, address: mainStreet})])
|
|
72
|
+
->whenCmd(UpdateAddress({address: mainStreet}))
|
|
61
73
|
->thenNoEvent
|
|
62
74
|
)
|
|
63
75
|
|
|
76
|
+
// scenario-id: 8c84e2c8-e77c-497d-bad0-70db6643c3de
|
|
64
77
|
test("Deactivate on non-existent aggregate returns CustomerNotFound", () =>
|
|
65
78
|
givenEvents([])
|
|
66
79
|
->whenCmd(Deactivate)
|
|
67
80
|
->thenError(CustomerNotFound)
|
|
68
81
|
)
|
|
69
82
|
|
|
83
|
+
// scenario-id: 54c0ec8c-f937-41b7-bed0-963c54702564
|
|
70
84
|
test("Deactivate on active customer produces Deactivated", () =>
|
|
71
|
-
givenEvents([Registered({email:
|
|
85
|
+
givenEvents([Registered({email: aliceEmail, address: mainStreet})])
|
|
72
86
|
->whenCmd(Deactivate)
|
|
73
87
|
->thenEvent(Deactivated)
|
|
74
88
|
)
|
|
75
89
|
|
|
90
|
+
// scenario-id: 083c8024-7e68-44d6-b9ff-61a3250202bf
|
|
76
91
|
test("Deactivate on deactivated customer produces no events (idempotent)", () =>
|
|
77
|
-
givenEvents([Registered({email:
|
|
92
|
+
givenEvents([Registered({email: aliceEmail, address: mainStreet}), Deactivated])
|
|
78
93
|
->whenCmd(Deactivate)
|
|
79
94
|
->thenNoEvent
|
|
80
95
|
)
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as Customer$OrderingPlugin from "../../../src/Customer/Aggregate/Customer.res.mjs";
|
|
4
4
|
import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
|
|
5
5
|
import * as Customer_Behavior$OrderingPlugin from "../../../src/Customer/Aggregate/Customer_Behavior.res.mjs";
|
|
6
|
+
import * as Ordering_Examples$OrderingPlugin from "../../Ordering_Examples.res.mjs";
|
|
6
7
|
|
|
7
8
|
let include = Behavior_GWT$ReventlessGwt.MakeFromAggregate({
|
|
8
9
|
name: Customer$OrderingPlugin.name,
|
|
@@ -40,42 +41,42 @@ let thenError = include.thenError;
|
|
|
40
41
|
describe("Customer Behavior", () => {
|
|
41
42
|
test("Register on new aggregate produces Registered", () => thenEvent(whenCmd(givenEvents([]), {
|
|
42
43
|
TAG: "Register",
|
|
43
|
-
email:
|
|
44
|
-
address:
|
|
44
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
45
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
45
46
|
}), {
|
|
46
47
|
TAG: "Registered",
|
|
47
|
-
email:
|
|
48
|
-
address:
|
|
48
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
49
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
49
50
|
}));
|
|
50
51
|
test("Register on existing aggregate returns CustomerAlreadyRegistered", () => thenError(whenCmd(givenEvents([{
|
|
51
52
|
TAG: "Registered",
|
|
52
|
-
email:
|
|
53
|
-
address:
|
|
53
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
54
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
54
55
|
}]), {
|
|
55
56
|
TAG: "Register",
|
|
56
|
-
email:
|
|
57
|
-
address:
|
|
57
|
+
email: Ordering_Examples$OrderingPlugin.bobEmail,
|
|
58
|
+
address: Ordering_Examples$OrderingPlugin.oakAvenue
|
|
58
59
|
}), "CustomerAlreadyRegistered"));
|
|
59
60
|
test("Register on deactivated aggregate returns CustomerAlreadyDeactivated", () => thenError(whenCmd(givenEvents([
|
|
60
61
|
{
|
|
61
62
|
TAG: "Registered",
|
|
62
|
-
email:
|
|
63
|
-
address:
|
|
63
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
64
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
64
65
|
},
|
|
65
66
|
"Deactivated"
|
|
66
67
|
]), {
|
|
67
68
|
TAG: "Register",
|
|
68
|
-
email:
|
|
69
|
-
address:
|
|
69
|
+
email: Ordering_Examples$OrderingPlugin.bobEmail,
|
|
70
|
+
address: Ordering_Examples$OrderingPlugin.oakAvenue
|
|
70
71
|
}), "CustomerAlreadyDeactivated"));
|
|
71
72
|
test("UpdateEmail on non-existent aggregate returns CustomerNotFound", () => thenError(whenCmd(givenEvents([]), {
|
|
72
73
|
TAG: "UpdateEmail",
|
|
73
|
-
email:
|
|
74
|
+
email: Ordering_Examples$OrderingPlugin.bobEmail
|
|
74
75
|
}), "CustomerNotFound"));
|
|
75
76
|
test("UpdateEmail on active customer produces EmailUpdated", () => thenEvent(whenCmd(givenEvents([{
|
|
76
77
|
TAG: "Registered",
|
|
77
|
-
email:
|
|
78
|
-
address:
|
|
78
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
79
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
79
80
|
}]), {
|
|
80
81
|
TAG: "UpdateEmail",
|
|
81
82
|
email: "alice2@example.com"
|
|
@@ -85,22 +86,22 @@ describe("Customer Behavior", () => {
|
|
|
85
86
|
}));
|
|
86
87
|
test("UpdateEmail to same email produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([{
|
|
87
88
|
TAG: "Registered",
|
|
88
|
-
email:
|
|
89
|
-
address:
|
|
89
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
90
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
90
91
|
}]), {
|
|
91
92
|
TAG: "UpdateEmail",
|
|
92
|
-
email:
|
|
93
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail
|
|
93
94
|
})));
|
|
94
95
|
test("UpdateEmail on deactivated customer returns CustomerAlreadyDeactivated", () => thenError(whenCmd(givenEvents([
|
|
95
96
|
{
|
|
96
97
|
TAG: "Registered",
|
|
97
|
-
email:
|
|
98
|
-
address:
|
|
98
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
99
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
99
100
|
},
|
|
100
101
|
"Deactivated"
|
|
101
102
|
]), {
|
|
102
103
|
TAG: "UpdateEmail",
|
|
103
|
-
email:
|
|
104
|
+
email: Ordering_Examples$OrderingPlugin.bobEmail
|
|
104
105
|
}), "CustomerAlreadyDeactivated"));
|
|
105
106
|
test("UpdateAddress on non-existent aggregate returns CustomerNotFound", () => thenError(whenCmd(givenEvents([]), {
|
|
106
107
|
TAG: "UpdateAddress",
|
|
@@ -108,8 +109,8 @@ describe("Customer Behavior", () => {
|
|
|
108
109
|
}), "CustomerNotFound"));
|
|
109
110
|
test("UpdateAddress on active customer produces AddressUpdated", () => thenEvent(whenCmd(givenEvents([{
|
|
110
111
|
TAG: "Registered",
|
|
111
|
-
email:
|
|
112
|
-
address:
|
|
112
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
113
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
113
114
|
}]), {
|
|
114
115
|
TAG: "UpdateAddress",
|
|
115
116
|
address: "789 Pine Rd"
|
|
@@ -119,23 +120,23 @@ describe("Customer Behavior", () => {
|
|
|
119
120
|
}));
|
|
120
121
|
test("UpdateAddress to same address produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([{
|
|
121
122
|
TAG: "Registered",
|
|
122
|
-
email:
|
|
123
|
-
address:
|
|
123
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
124
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
124
125
|
}]), {
|
|
125
126
|
TAG: "UpdateAddress",
|
|
126
|
-
address:
|
|
127
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
127
128
|
})));
|
|
128
129
|
test("Deactivate on non-existent aggregate returns CustomerNotFound", () => thenError(whenCmd(givenEvents([]), "Deactivate"), "CustomerNotFound"));
|
|
129
130
|
test("Deactivate on active customer produces Deactivated", () => thenEvent(whenCmd(givenEvents([{
|
|
130
131
|
TAG: "Registered",
|
|
131
|
-
email:
|
|
132
|
-
address:
|
|
132
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
133
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
133
134
|
}]), "Deactivate"), "Deactivated"));
|
|
134
135
|
test("Deactivate on deactivated customer produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([
|
|
135
136
|
{
|
|
136
137
|
TAG: "Registered",
|
|
137
|
-
email:
|
|
138
|
-
address:
|
|
138
|
+
email: Ordering_Examples$OrderingPlugin.aliceEmail,
|
|
139
|
+
address: Ordering_Examples$OrderingPlugin.mainStreet
|
|
139
140
|
},
|
|
140
141
|
"Deactivated"
|
|
141
142
|
]), "Deactivate")));
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
@@reventless.gwt(Customers_Projections.CustomerMapping)
|
|
2
2
|
|
|
3
3
|
describe("Customers ReadModel ← Customer", () => {
|
|
4
|
+
// scenario-id: d64df451-1238-400b-b146-4bd84dfb232b
|
|
4
5
|
test("Registered sets initial read model state", () =>
|
|
5
6
|
givenEvents([])
|
|
6
7
|
->whenEvent(Customer.Registered({email: "alice@example.com", address: "123 Main St"}))
|
|
7
8
|
->thenState({Customers.email: "alice@example.com", address: "123 Main St", deactivated: false})
|
|
8
9
|
)
|
|
9
10
|
|
|
11
|
+
// scenario-id: 80d62196-a14f-4da6-9993-384996b0be93
|
|
10
12
|
test("EmailUpdated updates the email", () =>
|
|
11
13
|
givenEvents([Customer.Registered({email: "alice@example.com", address: "123 Main St"})])
|
|
12
14
|
->whenEvent(Customer.EmailUpdated({email: "alice2@example.com"}))
|
|
13
15
|
->thenState({Customers.email: "alice2@example.com", address: "123 Main St", deactivated: false})
|
|
14
16
|
)
|
|
15
17
|
|
|
18
|
+
// scenario-id: 55ce1763-d498-440d-8c19-2dc8adfa69e2
|
|
16
19
|
test("AddressUpdated updates the address", () =>
|
|
17
20
|
givenEvents([Customer.Registered({email: "alice@example.com", address: "123 Main St"})])
|
|
18
21
|
->whenEvent(Customer.AddressUpdated({address: "789 Pine Rd"}))
|
|
19
22
|
->thenState({Customers.email: "alice@example.com", address: "789 Pine Rd", deactivated: false})
|
|
20
23
|
)
|
|
21
24
|
|
|
25
|
+
// scenario-id: 9885a011-7448-431f-ae96-629aae5f9823
|
|
22
26
|
test("Deactivated sets deactivated flag", () =>
|
|
23
27
|
givenEvents([Customer.Registered({email: "alice@example.com", address: "123 Main St"})])
|
|
24
28
|
->whenEvent(Customer.Deactivated)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,16 +5,17 @@
|
|
|
5
5
|
// `Mapping` is brought into scope by the PPX `open Products_Extension`; opening
|
|
6
6
|
// it surfaces the extension point's events and the delegate's commands.
|
|
7
7
|
open Mapping
|
|
8
|
-
|
|
9
|
-
let p1 = CatalogSpec.ProductId.make("p1")
|
|
8
|
+
open Ordering_Examples
|
|
10
9
|
|
|
11
10
|
describe("Products Extension delegate", () => {
|
|
11
|
+
// scenario-id: 4c14eb06-02b8-41ae-b0b8-cf33ef430e93
|
|
12
12
|
test("ProductBecameAvailable issues Sync", () =>
|
|
13
13
|
whenIncomingEvent(
|
|
14
14
|
ExtensionPoint.ProductBecameAvailable({productId: p1, name: "Book", price: 9.99}),
|
|
15
15
|
)->thenPublishesAggregateCommand("p1", Delegate.Sync({name: "Book", price: 9.99}))
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
+
// scenario-id: d3760e9e-c4f6-4a2f-bb5a-8e57a965ba68
|
|
18
19
|
test("ProductPriceChanged issues UpdatePrice", () =>
|
|
19
20
|
whenIncomingEvent(
|
|
20
21
|
ExtensionPoint.ProductPriceChanged({productId: p1, price: 7.5}),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-aggregates-catalog-spec/src/ProductId.res.mjs";
|
|
4
4
|
import * as Delegate_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Delegate_GWT.res.mjs";
|
|
5
5
|
import * as CatalogProduct$OrderingPlugin from "../../src/CatalogProduct/Aggregate/CatalogProduct.res.mjs";
|
|
6
|
+
import * as Ordering_Examples$OrderingPlugin from "../Ordering_Examples.res.mjs";
|
|
6
7
|
import * as Products_Extension$OrderingPlugin from "../../src/Extension/Products_Extension.res.mjs";
|
|
7
8
|
import * as Products_ExtensionPoint$CatalogSpec from "@reventlessdev/online-shop-aggregates-catalog-spec/src/Products_ExtensionPoint.res.mjs";
|
|
8
9
|
|
|
@@ -41,12 +42,10 @@ let whenIncomingEvent = include.whenIncomingEvent;
|
|
|
41
42
|
|
|
42
43
|
let thenPublishesAggregateCommand = include.thenPublishesAggregateCommand;
|
|
43
44
|
|
|
44
|
-
let p1 = ProductId$CatalogSpec.make("p1");
|
|
45
|
-
|
|
46
45
|
describe("Products Extension delegate", () => {
|
|
47
46
|
test("ProductBecameAvailable issues Sync", undefined, () => thenPublishesAggregateCommand(whenIncomingEvent({
|
|
48
47
|
TAG: "ProductBecameAvailable",
|
|
49
|
-
productId: p1,
|
|
48
|
+
productId: Ordering_Examples$OrderingPlugin.p1,
|
|
50
49
|
name: "Book",
|
|
51
50
|
price: 9.99
|
|
52
51
|
}), "p1", {
|
|
@@ -56,7 +55,7 @@ describe("Products Extension delegate", () => {
|
|
|
56
55
|
}));
|
|
57
56
|
test("ProductPriceChanged issues UpdatePrice", undefined, () => thenPublishesAggregateCommand(whenIncomingEvent({
|
|
58
57
|
TAG: "ProductPriceChanged",
|
|
59
|
-
productId: p1,
|
|
58
|
+
productId: Ordering_Examples$OrderingPlugin.p1,
|
|
60
59
|
price: 7.5
|
|
61
60
|
}), "p1", {
|
|
62
61
|
TAG: "UpdatePrice",
|
|
@@ -108,6 +107,5 @@ export {
|
|
|
108
107
|
thenHandlesDirective,
|
|
109
108
|
thenHandlesDirectives,
|
|
110
109
|
thenHandlesNoDirective,
|
|
111
|
-
p1,
|
|
112
110
|
}
|
|
113
111
|
/* include Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
// into one public per-product event each (one-to-many fan-out).
|
|
3
3
|
@@reventless.gwt
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
let p1 = CatalogSpec.ProductId.make("p1")
|
|
7
|
-
let p2 = CatalogSpec.ProductId.make("p2")
|
|
5
|
+
open Ordering_Examples
|
|
8
6
|
|
|
9
7
|
describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
8
|
+
// scenario-id: b3fe53fe-84bd-4bb7-aca3-a0f9db5a186f
|
|
10
9
|
test("Placed fans out to one ItemOrdered per product", () =>
|
|
11
10
|
whenDelegateEvent(
|
|
12
11
|
Delegate.Placed({customerId: c1, productIds: [p1, p2]}),
|
|
@@ -16,6 +15,7 @@ describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
|
16
15
|
])
|
|
17
16
|
)
|
|
18
17
|
|
|
18
|
+
// scenario-id: c916b814-2006-4d62-9fff-60bb99ddcfd3
|
|
19
19
|
test("Cancelled fans out to one ItemOrderCancelled per product", () =>
|
|
20
20
|
whenDelegateEvent(Delegate.Cancelled({productIds: [p1, p2]}))->thenPublishesEvents([
|
|
21
21
|
("p1", ExtensionPoint.ItemOrderCancelled({productId: "p1", orderId: "gwt-id"})),
|
|
@@ -23,8 +23,10 @@ describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
|
23
23
|
])
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
+
// scenario-id: 3647a0be-51ed-4d6d-83b3-9fa53a596e49
|
|
26
27
|
test("Shipped publishes nothing", () => whenDelegateEvent(Delegate.Shipped)->thenPublishesNothing)
|
|
27
28
|
|
|
29
|
+
// scenario-id: 0ac71311-60e6-4373-b078-96cfaf91724d
|
|
28
30
|
test("Refunded publishes nothing", () =>
|
|
29
31
|
whenDelegateEvent(Delegate.Refunded({reason: "customer-changed-mind"}))->thenPublishesNothing
|
|
30
32
|
)
|