waygraph 0.10.8 → 0.11.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.
@@ -1,4 +1,4 @@
1
- import { Engine, start, end, withTitle } from "waygraph";
1
+ import { Engine, start, end, withTitle, withHighlightFixtures } from "waygraph";
2
2
  import type {
3
3
  LoginPage,
4
4
  LoggedIn,
@@ -21,25 +21,64 @@ const engine = new Engine({ headless: false, slowMo: 250 });
21
21
  // Atomic nav/action per real URL - the shape `waygraph auto` discovers.
22
22
  // Explicit type args: AddToCartBlock's In is Checkpoint<string> (wildcard),
23
23
  // which trips defineFlow overload inference across a long array.
24
- export const checkoutFlow = withTitle(
25
- engine.defineFlow<
26
- LoginPage,
27
- LoggedIn,
28
- ItemInCart,
29
- CartPage,
30
- CheckoutInfoPage,
31
- CheckoutOverviewPage,
32
- OrderComplete
33
- >([
34
- start,
35
- NavLoginBlock,
36
- SubmitLoginForFlow,
37
- AddToCartBlock,
38
- NavCartBlock,
39
- NavCheckoutInfoBlock,
40
- SubmitCheckoutInfoBlock,
41
- FinishOrderBlock,
42
- end,
43
- ]),
44
- "Owner: Full Checkout",
24
+ //
25
+ // Demo narration showcase (waygraph 0.11+):
26
+ // - Block stubs: submit-login stubBefore, add-to-cart / finish-order stubAfter
27
+ // - Flow fixtures: ticket-style captions (unlimited purposes on .flow.ts)
28
+ // - Slides on finish-order: multi-step yap with Next between slides
29
+ export const checkoutFlow = withHighlightFixtures(
30
+ withTitle(
31
+ engine.defineFlow<
32
+ LoginPage,
33
+ LoggedIn,
34
+ ItemInCart,
35
+ CartPage,
36
+ CheckoutInfoPage,
37
+ CheckoutOverviewPage,
38
+ OrderComplete
39
+ >([
40
+ start,
41
+ NavLoginBlock,
42
+ SubmitLoginForFlow,
43
+ AddToCartBlock,
44
+ NavCartBlock,
45
+ NavCheckoutInfoBlock,
46
+ SubmitCheckoutInfoBlock,
47
+ FinishOrderBlock,
48
+ end,
49
+ ]),
50
+ "Owner: Full Checkout",
51
+ ),
52
+ {
53
+ "submit-login": {
54
+ stubBefore: {
55
+ username: {
56
+ label: "Demo user",
57
+ detail: "standard_user from Mem — library block stays neutral.",
58
+ tag: "AC",
59
+ },
60
+ password: { label: "Password", detail: "Filled from Mem credentials." },
61
+ submit: { label: "Sign in", tag: "GATE" },
62
+ },
63
+ },
64
+ "add-to-cart": {
65
+ stubAfter: {
66
+ badge: {
67
+ label: "Cart now has the item",
68
+ detail: "Badge updates after Add to cart.",
69
+ tag: "AC",
70
+ },
71
+ },
72
+ },
73
+ "finish-order": {
74
+ stubAfter: {
75
+ thanks: {
76
+ label: "Order placed",
77
+ detail: "Completion header is the durable proof.",
78
+ tag: "GATE",
79
+ },
80
+ },
81
+ // Optional: fixture can replace block slides; leave unset to use block slides.
82
+ },
83
+ },
45
84
  );
@@ -18,7 +18,7 @@
18
18
  "baseUrl": "https://example.com"
19
19
  },
20
20
  "dependencies": {
21
- "waygraph": "^0.10.6"
21
+ "waygraph": "^0.11.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@playwright/test": "^1.55.0",