@deeeed/metamask-harness 0.47.4 → 0.48.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.
Files changed (146) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +3 -2
  3. package/adapters/extension/lib/macos-focus.cjs +2 -2
  4. package/adapters/extension/live.sh +6 -8
  5. package/adapters/mobile/bridge-runtime/lib/bridge-errors.cjs +1 -0
  6. package/adapters/shared/ensure-runner-deps.sh +6 -0
  7. package/dist/adapters/extension/runtime-decision.js +18 -1
  8. package/dist/adapters/extension/runtime.js +5 -5
  9. package/dist/adapters/extension/surface.js +1 -0
  10. package/dist/app-lifecycle.js +3 -1
  11. package/dist/command-contract.js +2 -0
  12. package/dist/commands/call.js +1 -8
  13. package/dist/commands/device-target.js +12 -3
  14. package/dist/commands/doctor.js +7 -5
  15. package/dist/commands/fixtures.js +1 -1
  16. package/dist/commands/launch/index.js +10 -0
  17. package/dist/commands/manifest.js +3 -1
  18. package/dist/commands/mobile-device-view.js +13 -3
  19. package/dist/commands/parse-args.js +2 -0
  20. package/dist/commands/run-engine.js +29 -4
  21. package/dist/commands/run.js +1 -1
  22. package/dist/commands/runtime-launch.js +10 -1
  23. package/dist/commands/status.js +8 -4
  24. package/dist/devices.js +31 -9
  25. package/dist/execution-provenance.js +8 -7
  26. package/dist/funding-execution-context.js +43 -13
  27. package/dist/heal-bounds.js +3 -3
  28. package/dist/live-adapter-contract.js +4 -0
  29. package/dist/manifest.js +2 -13
  30. package/dist/mm-harness-cli.js +2 -1
  31. package/dist/runner.js +14 -3
  32. package/docs/RECIPES.md +133 -22
  33. package/docs/RELEASE-QA-CAPABILITY-MAP.md +3 -2
  34. package/library/actions/core/perps/_controller.mjs +10 -0
  35. package/library/actions/core/perps/close_orders.mjs +13 -17
  36. package/library/actions/extension/assets/home-token-identity.mjs +30 -0
  37. package/library/actions/extension/assets/import_custom_token.mjs +61 -79
  38. package/library/actions/extension/assets/open_details.mjs +18 -7
  39. package/library/actions/extension/assets/read_details.mjs +61 -29
  40. package/library/actions/extension/assets/read_visible_state.mjs +4 -1
  41. package/library/actions/extension/assets/select_network_scope.mjs +16 -9
  42. package/library/actions/extension/assets/set_token_visibility.mjs +84 -17
  43. package/library/actions/extension/assets/verify_sorting.mjs +62 -14
  44. package/library/actions/extension/networks/add_custom.mjs +19 -17
  45. package/library/actions/extension/networks/custom_network.mjs +8 -3
  46. package/library/actions/extension/networks/read_visible_state.mjs +1 -0
  47. package/library/actions/extension/performance/_navigation-memory.mjs +35 -6
  48. package/library/actions/extension/performance/compare_idle_navigation_memory.mjs +3 -2
  49. package/library/actions/extension/performance/measure_detached_dom.mjs +3 -2
  50. package/library/actions/extension/performance/measure_navigation_memory.mjs +3 -2
  51. package/library/actions/extension/perps/assert_visible_consistency.mjs +9 -4
  52. package/library/actions/extension/perps/close_visible_position.mjs +3 -3
  53. package/library/actions/extension/perps/edit_margin.mjs +1 -1
  54. package/library/actions/extension/perps/open_balance_action.mjs +16 -7
  55. package/library/actions/extension/perps/perps.mjs +150 -45
  56. package/library/actions/extension/perps/read_funds_confirmation.mjs +8 -0
  57. package/library/actions/extension/perps/read_snapshot.mjs +2 -1
  58. package/library/actions/extension/perps/read_visible_state.mjs +10 -6
  59. package/library/actions/extension/perps/search_markets.mjs +7 -2
  60. package/library/actions/extension/perps/select_activity_filter.mjs +1 -1
  61. package/library/actions/extension/perps/select_market_filter.mjs +74 -45
  62. package/library/actions/extension/perps/set_market_favorite.mjs +6 -3
  63. package/library/actions/extension/perps/state.mjs +1 -0
  64. package/library/actions/extension/perps/update_position_tpsl.mjs +1 -1
  65. package/library/actions/extension/perps/visible-mutation-identity.mjs +4 -2
  66. package/library/actions/extension/platform/cdp.mjs +23 -142
  67. package/library/actions/extension/swap_bridge/quote-state.mjs +54 -0
  68. package/library/actions/extension/swap_bridge/read_visible_state.mjs +4 -1
  69. package/library/actions/extension/swap_bridge/select_assets.mjs +11 -1
  70. package/library/actions/extension/swap_bridge/set_amount.mjs +10 -8
  71. package/library/actions/extension/swap_bridge/set_max_amount.mjs +17 -18
  72. package/library/actions/extension/swap_bridge/set_slippage.mjs +0 -9
  73. package/library/actions/extension/ui/navigate.mjs +58 -14
  74. package/library/actions/extension/wallet/lock.mjs +2 -1
  75. package/library/actions/mobile/assets/import_custom_token.mjs +1 -0
  76. package/library/actions/mobile/assets/read_visible_state.mjs +3 -1
  77. package/library/actions/mobile/assets/set_token_visibility.mjs +13 -9
  78. package/library/actions/mobile/networks/network-management.mjs +22 -15
  79. package/library/actions/mobile/networks/remove_custom.mjs +6 -2
  80. package/library/actions/mobile/perps/perps.mjs +3 -0
  81. package/library/actions/mobile/perps/read-visible-state-loop.mjs +1 -0
  82. package/library/actions/mobile/perps/set_market_favorite.mjs +15 -19
  83. package/library/actions/mobile/platform/native-session.mjs +26 -17
  84. package/library/actions/mobile/platform/observe-ui.mjs +2 -2
  85. package/library/actions/mobile/ui/navigate.mjs +1 -1
  86. package/library/actions/shared/perps/visible-state.mjs +14 -3
  87. package/library/manifests/core.action-manifest.json +14 -2
  88. package/library/manifests/extension.action-manifest.json +49 -16
  89. package/library/manifests/mobile.action-manifest.json +8 -7
  90. package/library/recipes/core/perps/smoke.recipe.json +23 -0
  91. package/library/recipes/core/perps/snapshot.recipe.json +26 -1
  92. package/library/recipes/extension/assets/release-custom-network-token-persistence.recipe.json +25 -8
  93. package/library/recipes/extension/performance/navigation-memory-suite.recipe.json +219 -0
  94. package/library/recipes/extension/performance/navigation-memory.recipe.json +61 -156
  95. package/library/recipes/extension/wallet/smoke.recipe.json +17 -8
  96. package/library/recipes/mobile/app/lifecycle.android-smoke.recipe.json +23 -4
  97. package/library/recipes/mobile/networks/release-custom-network-persistence.recipe.json +31 -6
  98. package/library/recipes/mobile/networks/release-multichain-visibility.recipe.json +5 -4
  99. package/library/recipes/mobile/wallet/smoke.recipe.json +17 -8
  100. package/library/recipes/{assets → shared/assets}/release-token-address-import.recipe.json +7 -0
  101. package/library/recipes/{assets → shared/assets}/release-token-details.recipe.json +2 -2
  102. package/library/recipes/shared/assets/release-token-hide-readd.recipe.json +91 -0
  103. package/library/recipes/{assets → shared/assets}/release-token-persistence.recipe.json +3 -0
  104. package/library/recipes/{assets → shared/assets}/release-token-search-import.recipe.json +4 -1
  105. package/library/recipes/{assets → shared/assets}/release-token-sorting.recipe.json +13 -2
  106. package/library/recipes/{swap-bridge → shared/swap-bridge}/release-quote.recipe.json +29 -3
  107. package/package.json +3 -3
  108. package/site/assets/help-recipes.json +63 -23
  109. package/library/recipes/assets/release-token-hide-readd.recipe.json +0 -57
  110. package/library/recipes/core/perps/clean-market-testnet.recipe.json +0 -44
  111. package/library/recipes/core/perps/order-lifecycle.recipe.json +0 -82
  112. package/library/recipes/core/perps/read-markets.recipe.json +0 -36
  113. package/library/recipes/core/perps/trading-lifecycle.recipe.json +0 -80
  114. package/library/recipes/extension/perps/release-activity-filters.recipe.json +0 -51
  115. package/library/recipes/extension/perps/release-funds-flows.recipe.json +0 -76
  116. package/library/recipes/extension/perps/release-live-limit-order.recipe.json +0 -109
  117. package/library/recipes/extension/perps/release-market-filters.recipe.json +0 -97
  118. package/library/recipes/extension/perps/release-order-entry.recipe.json +0 -158
  119. package/library/recipes/extension/perps/release-order-validation.recipe.json +0 -259
  120. package/library/recipes/extension/perps/release-visible-consistency.recipe.json +0 -47
  121. package/library/recipes/extension/perps/source-dev-snapshot-consistency.recipe.json +0 -76
  122. package/library/recipes/mobile/perps/chase-assert-running.recipe.json +0 -110
  123. package/library/recipes/mobile/perps/chase-place.recipe.json +0 -145
  124. package/library/recipes/mobile/perps/chase-terminate.recipe.json +0 -98
  125. package/library/recipes/mobile/perps/performance.recipe.json +0 -722
  126. package/library/recipes/mobile/perps/pro-order-setup.recipe.json +0 -111
  127. package/library/recipes/mobile/perps/pro-order-start-state.recipe.json +0 -53
  128. package/library/recipes/mobile/perps/scale-assert-orders.recipe.json +0 -126
  129. package/library/recipes/mobile/perps/scale-place.recipe.json +0 -186
  130. package/library/recipes/mobile/perps/twap-assert-active.recipe.json +0 -97
  131. package/library/recipes/mobile/perps/twap-place.recipe.json +0 -146
  132. package/library/recipes/mobile/runner/action-validation.recipe.json +0 -336
  133. package/library/recipes/perps/clean-market-testnet.recipe.json +0 -49
  134. package/library/recipes/perps/lifecycle.recipe.json +0 -144
  135. package/library/recipes/perps/release-live-market-order.recipe.json +0 -139
  136. package/library/recipes/perps/release-watchlist.recipe.json +0 -111
  137. package/library/recipes/swap-bridge/release-max-quote.recipe.json +0 -72
  138. /package/library/recipes/{assets → shared/assets}/release-token-list.recipe.json +0 -0
  139. /package/library/recipes/{perps → shared/perps}/release-market-details.recipe.json +0 -0
  140. /package/library/recipes/{perps → shared/perps}/release-market-search.recipe.json +0 -0
  141. /package/library/recipes/{swap-bridge → shared/swap-bridge}/release-custom-slippage.recipe.json +0 -0
  142. /package/library/recipes/{swap-bridge → shared/swap-bridge}/release-live-max-swap.recipe.json +0 -0
  143. /package/library/recipes/{swap-bridge → shared/swap-bridge}/release-live-swap.recipe.json +0 -0
  144. /package/library/recipes/{swap-bridge → shared/swap-bridge}/release-surface.recipe.json +0 -0
  145. /package/library/recipes/{wallet → shared/wallet}/import.recipe.json +0 -0
  146. /package/library/recipes/{wallet → shared/wallet}/reset-import.recipe.json +0 -0
@@ -1,111 +0,0 @@
1
- {
2
- "$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
3
- "title": "Prepare a Mobile Pro advanced-order form",
4
- "description": "Prepares the current or requested account, cleans only the selected testnet market, and opens the Advanced Pro order picker.",
5
- "paramsSchema": {
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "account": {
10
- "type": "string",
11
- "default": "",
12
- "description": "Optional exact fixture account name, such as Trading or dev1. Omit it to keep the currently selected account."
13
- },
14
- "provider": { "type": "string", "default": "hyperliquid" },
15
- "network": {
16
- "type": "string",
17
- "enum": ["testnet", "mainnet"],
18
- "default": "testnet",
19
- "description": "Mainnet requires an explicit user request and preserves existing trading state."
20
- },
21
- "market": {
22
- "type": "string",
23
- "default": "BTC"
24
- },
25
- "side": {
26
- "type": "string",
27
- "enum": ["long", "short"],
28
- "default": "long"
29
- }
30
- }
31
- },
32
- "workflow": {
33
- "entry": "ensure-state",
34
- "nodes": {
35
- "ensure-state": {
36
- "action": "call",
37
- "ref": "perps.pro-order-start-state",
38
- "params": {
39
- "account": "{{params.account}}",
40
- "provider": "{{params.provider}}",
41
- "network": "{{params.network}}",
42
- "market": "{{params.market}}",
43
- "trading_state": "clean_selected_testnet_market"
44
- },
45
- "intent": "Reach and prove the requested Pro market before placement setup.",
46
- "next": "position-side"
47
- },
48
- "position-side": {
49
- "action": "ui.scroll",
50
- "test_id": "perps-pro-order-form-direction-control",
51
- "scroll_into_view": true,
52
- "intent": "Expose the direction control without resetting an already-matching market route.",
53
- "next": "choose-side"
54
- },
55
- "choose-side": {
56
- "action": "switch",
57
- "value": "{{params.side}}",
58
- "equals": "short",
59
- "cases": {
60
- "match": "select-short"
61
- },
62
- "default": "select-long",
63
- "intent": "Choose the declared order direction."
64
- },
65
- "select-long": {
66
- "action": "ui.press",
67
- "test_id": "perps-pro-order-form-direction-long",
68
- "intent": "Select the long direction explicitly.",
69
- "next": "open-types"
70
- },
71
- "select-short": {
72
- "action": "ui.press",
73
- "test_id": "perps-pro-order-form-direction-short",
74
- "intent": "Select the short direction explicitly.",
75
- "next": "open-types"
76
- },
77
- "open-types": {
78
- "action": "ui.press",
79
- "test_id": "perps-pro-order-form-order-type",
80
- "intent": "Open the order-type picker.",
81
- "next": "wait-advanced-tab"
82
- },
83
- "wait-advanced-tab": {
84
- "action": "ui.wait_for",
85
- "test_id": "perps-order-type-tab-advanced",
86
- "expected": "visible",
87
- "timeout_ms": 10000,
88
- "intent": "Require the Advanced tab before selecting it.",
89
- "next": "open-advanced"
90
- },
91
- "open-advanced": {
92
- "action": "ui.press",
93
- "test_id": "perps-order-type-tab-advanced",
94
- "intent": "Open the Advanced order section.",
95
- "next": "wait-advanced-content"
96
- },
97
- "wait-advanced-content": {
98
- "action": "ui.wait_for",
99
- "test_id": "perps-order-type-twap",
100
- "expected": "visible",
101
- "timeout_ms": 10000,
102
- "intent": "Prove the Advanced order section is open.",
103
- "next": "done"
104
- },
105
- "done": {
106
- "action": "end",
107
- "status": "pass"
108
- }
109
- }
110
- }
111
- }
@@ -1,53 +0,0 @@
1
- {
2
- "$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
3
- "title": "Converge Mobile Pro order start state",
4
- "description": "Idempotently reaches Mobile Pro. An omitted account keeps the current selection; provider, network, and market use the declared smart defaults.",
5
- "paramsSchema": {
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "account": {
10
- "type": "string",
11
- "default": "",
12
- "description": "Optional exact fixture account name, such as Trading or dev1. Omit it to keep the currently selected account."
13
- },
14
- "provider": { "type": "string", "default": "hyperliquid" },
15
- "network": {
16
- "type": "string",
17
- "enum": ["testnet", "mainnet"],
18
- "default": "testnet"
19
- },
20
- "market": {
21
- "type": "string",
22
- "default": "BTC"
23
- },
24
- "trading_state": {
25
- "type": "string",
26
- "enum": ["preserve", "clean_selected_testnet_market"],
27
- "default": "preserve"
28
- }
29
- }
30
- },
31
- "workflow": {
32
- "entry": "ensure-state",
33
- "nodes": {
34
- "ensure-state": {
35
- "action": "metamask.perps.start_state",
36
- "account": "{{params.account}}",
37
- "provider": "{{params.provider}}",
38
- "network": "{{params.network}}",
39
- "market": "{{params.market}}",
40
- "page": "market",
41
- "market_mode": "pro",
42
- "trading_state": "{{params.trading_state}}",
43
- "timeout_ms": 120000,
44
- "intent": "Reach and prove the requested account, provider, network, market, Pro mode, and trading-state policy.",
45
- "next": "done"
46
- },
47
- "done": {
48
- "action": "end",
49
- "status": "pass"
50
- }
51
- }
52
- }
53
- }
@@ -1,126 +0,0 @@
1
- {
2
- "$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
3
- "title": "Assert Mobile Pro Scale child orders",
4
- "description": "Opens the standard Orders tab and proves the selected Scale ladder produced the requested number of child orders.",
5
- "paramsSchema": {
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": ["account"],
9
- "properties": {
10
- "account": {
11
- "type": "string",
12
- "description": "Exact fixture account name, such as Trading or dev1."
13
- },
14
- "provider": { "type": "string", "default": "hyperliquid" },
15
- "network": {
16
- "type": "string",
17
- "enum": ["testnet", "mainnet"],
18
- "default": "testnet",
19
- "description": "Assertions are read-only and may inspect either network."
20
- },
21
- "market": {
22
- "type": "string",
23
- "default": "BTC"
24
- },
25
- "orders": {
26
- "type": "integer",
27
- "enum": [3],
28
- "default": 3
29
- }
30
- }
31
- },
32
- "workflow": {
33
- "entry": "prepare",
34
- "nodes": {
35
- "prepare": {
36
- "action": "call",
37
- "ref": "perps.pro-order-start-state",
38
- "params": {
39
- "account": "{{params.account}}",
40
- "provider": "{{params.provider}}",
41
- "network": "{{params.network}}",
42
- "market": "{{params.market}}"
43
- },
44
- "intent": "Reach and prove the requested Pro market without changing Scale orders.",
45
- "next": "position-tab"
46
- },
47
- "position-tab": {
48
- "action": "ui.scroll",
49
- "test_id": "perps-pro-market-positions-panel-tab-orders",
50
- "scroll_into_view": true,
51
- "intent": "Expose the standard Orders tab for visible review.",
52
- "next": "wait-tab"
53
- },
54
- "wait-tab": {
55
- "action": "ui.wait_for",
56
- "test_id": "perps-pro-market-positions-panel-tab-orders",
57
- "expected": "visible",
58
- "timeout_ms": 15000,
59
- "intent": "Require the standard Orders tab to be visible.",
60
- "next": "open-tab"
61
- },
62
- "open-tab": {
63
- "action": "ui.press",
64
- "test_id": "perps-pro-market-positions-panel-tab-orders",
65
- "intent": "Open the standard order list.",
66
- "next": "wait-first-child"
67
- },
68
- "wait-first-child": {
69
- "action": "ui.wait_for",
70
- "test_id": "perps-pro-market-order-row-{{params.market}}-0",
71
- "expected": "visible",
72
- "timeout_ms": 15000,
73
- "intent": "Require a visible standard child order for the selected market.",
74
- "next": "capture-first-child"
75
- },
76
- "capture-first-child": {
77
- "action": "ui.screenshot",
78
- "path": "screenshots/evidence-scale-orders-first-{{params.market}}.png",
79
- "label": "The standard Orders tab shows the Scale count and first child Limit order.",
80
- "intent": "Preserve the visible Scale order count and first child for review.",
81
- "next": "position-second-child"
82
- },
83
- "position-second-child": {
84
- "action": "ui.scroll",
85
- "test_id": "perps-pro-market-order-row-{{params.market}}-1",
86
- "scroll_into_view": true,
87
- "intent": "Expose the second Scale child order.",
88
- "next": "wait-second-child"
89
- },
90
- "wait-second-child": {
91
- "action": "ui.wait_for",
92
- "test_id": "perps-pro-market-order-row-{{params.market}}-1",
93
- "expected": "visible",
94
- "timeout_ms": 15000,
95
- "intent": "Require the second visible Scale child order for the selected market.",
96
- "next": "position-third-child"
97
- },
98
- "position-third-child": {
99
- "action": "ui.scroll",
100
- "test_id": "perps-pro-market-order-row-{{params.market}}-2",
101
- "scroll_into_view": true,
102
- "intent": "Expose the third Scale child order.",
103
- "next": "wait-third-child"
104
- },
105
- "wait-third-child": {
106
- "action": "ui.wait_for",
107
- "test_id": "perps-pro-market-order-row-{{params.market}}-2",
108
- "expected": "visible",
109
- "timeout_ms": 15000,
110
- "intent": "Require the third visible Scale child order for the selected market.",
111
- "next": "capture"
112
- },
113
- "capture": {
114
- "action": "ui.screenshot",
115
- "path": "screenshots/evidence-scale-orders-{{params.market}}.png",
116
- "label": "The standard Orders tab shows the second and third Scale child Limit orders.",
117
- "intent": "Preserve the visible lower Scale child orders for review.",
118
- "next": "done"
119
- },
120
- "done": {
121
- "action": "end",
122
- "status": "pass"
123
- }
124
- }
125
- }
126
- }
@@ -1,186 +0,0 @@
1
- {
2
- "$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
3
- "title": "Place a Mobile Pro Scale order",
4
- "description": "Places a parameterized Scale ladder through visible Mobile Pro controls, cleaning only the testnet path.",
5
- "paramsSchema": {
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": ["account"],
9
- "properties": {
10
- "account": {
11
- "type": "string",
12
- "description": "Exact fixture account name, such as Trading or dev1."
13
- },
14
- "provider": { "type": "string", "default": "hyperliquid" },
15
- "network": {
16
- "type": "string",
17
- "enum": ["testnet", "mainnet"],
18
- "default": "testnet",
19
- "description": "Mainnet placement requires an explicit user request."
20
- },
21
- "market": {
22
- "type": "string",
23
- "default": "BTC"
24
- },
25
- "side": {
26
- "type": "string",
27
- "enum": [
28
- "long",
29
- "short"
30
- ],
31
- "default": "long"
32
- },
33
- "notional": {
34
- "type": "string",
35
- "default": "100"
36
- },
37
- "orders": {
38
- "type": "string",
39
- "default": "3"
40
- },
41
- "skew": {
42
- "type": "string",
43
- "default": "1"
44
- },
45
- "start_price": {
46
- "type": "string",
47
- "default": "70000",
48
- "description": "Lower ladder price; override when changing market."
49
- },
50
- "end_price": {
51
- "type": "string",
52
- "default": "75000",
53
- "description": "Upper ladder price; override when changing market."
54
- }
55
- }
56
- },
57
- "workflow": {
58
- "entry": "prepare",
59
- "nodes": {
60
- "prepare": {
61
- "action": "call",
62
- "ref": "perps.pro-order-setup",
63
- "params": {
64
- "account": "{{params.account}}",
65
- "provider": "{{params.provider}}",
66
- "network": "{{params.network}}",
67
- "market": "{{params.market}}",
68
- "side": "{{params.side}}"
69
- },
70
- "intent": "Prepare the requested Pro order form and Advanced picker.",
71
- "next": "position-scale"
72
- },
73
- "position-scale": {
74
- "action": "ui.scroll",
75
- "test_id": "perps-order-type-scale",
76
- "scroll_into_view": true,
77
- "intent": "Expose the Scale option for visible selection.",
78
- "next": "wait-scale"
79
- },
80
- "wait-scale": {
81
- "action": "ui.wait_for",
82
- "test_id": "perps-order-type-scale",
83
- "expected": "visible",
84
- "timeout_ms": 10000,
85
- "intent": "Fail closed unless Scale is visibly offered.",
86
- "next": "select-scale"
87
- },
88
- "select-scale": {
89
- "action": "ui.press",
90
- "test_id": "perps-order-type-scale",
91
- "intent": "Select Scale.",
92
- "next": "position-fields"
93
- },
94
- "position-fields": {
95
- "action": "ui.scroll",
96
- "test_id": "perps-pro-order-form-scale-fields",
97
- "scroll_into_view": true,
98
- "intent": "Expose the Scale inputs for visible entry.",
99
- "next": "wait-fields"
100
- },
101
- "wait-fields": {
102
- "action": "ui.wait_for",
103
- "test_id": "perps-pro-order-form-scale-fields",
104
- "expected": "visible",
105
- "timeout_ms": 10000,
106
- "intent": "Confirm the Scale ladder inputs are visible.",
107
- "next": "set-start"
108
- },
109
- "set-start": {
110
- "action": "ui.set_input",
111
- "test_id": "perps-pro-order-form-scale-start-price",
112
- "value": "{{params.start_price}}",
113
- "intent": "Define the first price in the ladder.",
114
- "next": "set-end"
115
- },
116
- "set-end": {
117
- "action": "ui.set_input",
118
- "test_id": "perps-pro-order-form-scale-end-price",
119
- "value": "{{params.end_price}}",
120
- "intent": "Define the last price in the ladder.",
121
- "next": "set-orders"
122
- },
123
- "set-orders": {
124
- "action": "ui.set_input",
125
- "test_id": "perps-pro-order-form-scale-total-orders",
126
- "value": "{{params.orders}}",
127
- "intent": "Divide the ladder into the requested child count.",
128
- "next": "set-skew"
129
- },
130
- "set-skew": {
131
- "action": "ui.set_input",
132
- "test_id": "perps-pro-order-form-scale-size-skew",
133
- "value": "{{params.skew}}",
134
- "intent": "Distribute notional with the requested size skew.",
135
- "next": "set-size"
136
- },
137
- "set-size": {
138
- "action": "ui.set_input",
139
- "test_id": "perps-pro-order-form-size-input",
140
- "value": "{{params.notional}}",
141
- "intent": "Enter the requested total USD notional.",
142
- "next": "position-preview"
143
- },
144
- "position-preview": {
145
- "action": "ui.scroll",
146
- "test_id": "perps-pro-order-form-scale-preview",
147
- "scroll_into_view": true,
148
- "intent": "Expose the generated Scale preview for review.",
149
- "next": "wait-preview"
150
- },
151
- "wait-preview": {
152
- "action": "ui.wait_for",
153
- "test_id": "perps-pro-order-form-scale-preview",
154
- "expected": "visible",
155
- "timeout_ms": 15000,
156
- "intent": "Require a visible Scale preview before submission.",
157
- "next": "position-submit"
158
- },
159
- "position-submit": {
160
- "action": "ui.scroll",
161
- "test_id": "perps-pro-order-form-scale-preview",
162
- "scroll_into_view": true,
163
- "intent": "Expose the final Scale fee row directly above submission.",
164
- "next": "wait-submit"
165
- },
166
- "wait-submit": {
167
- "action": "ui.wait_for",
168
- "test_id": "perps-pro-order-form-place-order",
169
- "expected": "visible",
170
- "timeout_ms": 10000,
171
- "intent": "Confirm the Scale ladder can be submitted.",
172
- "next": "submit"
173
- },
174
- "submit": {
175
- "action": "ui.press",
176
- "test_id": "perps-pro-order-form-place-order",
177
- "intent": "Submit the Scale ladder to the selected provider and network.",
178
- "next": "done"
179
- },
180
- "done": {
181
- "action": "end",
182
- "status": "pass"
183
- }
184
- }
185
- }
186
- }
@@ -1,97 +0,0 @@
1
- {
2
- "$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
3
- "title": "Assert an active Mobile Pro TWAP",
4
- "description": "Opens the TWAP Active tab and proves the selected market remains visible after placement.",
5
- "paramsSchema": {
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "account": {
10
- "type": "string",
11
- "default": "",
12
- "description": "Optional exact fixture account name, such as Trading or dev1. Omit it to keep the currently selected account."
13
- },
14
- "provider": { "type": "string", "default": "hyperliquid" },
15
- "network": {
16
- "type": "string",
17
- "enum": ["testnet", "mainnet"],
18
- "default": "testnet",
19
- "description": "Assertions are read-only and may inspect either network."
20
- },
21
- "market": {
22
- "type": "string",
23
- "default": "BTC"
24
- }
25
- }
26
- },
27
- "workflow": {
28
- "entry": "prepare",
29
- "nodes": {
30
- "prepare": {
31
- "action": "call",
32
- "ref": "perps.pro-order-start-state",
33
- "params": {
34
- "account": "{{params.account}}",
35
- "provider": "{{params.provider}}",
36
- "network": "{{params.network}}",
37
- "market": "{{params.market}}"
38
- },
39
- "intent": "Reach and prove the requested Pro market without changing orders.",
40
- "next": "position-tab"
41
- },
42
- "position-tab": {
43
- "action": "ui.scroll",
44
- "test_id": "perps-pro-market-positions-panel-tab-twap",
45
- "scroll_into_view": true,
46
- "intent": "Expose the TWAP management tab for visible review.",
47
- "next": "wait-tab"
48
- },
49
- "wait-tab": {
50
- "action": "ui.wait_for",
51
- "test_id": "perps-pro-market-positions-panel-tab-twap",
52
- "expected": "visible",
53
- "timeout_ms": 15000,
54
- "intent": "Require the TWAP management tab to be visible.",
55
- "next": "open-tab"
56
- },
57
- "open-tab": {
58
- "action": "ui.press",
59
- "test_id": "perps-pro-market-positions-panel-tab-twap",
60
- "intent": "Open TWAP management.",
61
- "next": "open-active"
62
- },
63
- "open-active": {
64
- "action": "ui.press",
65
- "test_id": "perps-pro-market-twap-view-tab-active",
66
- "intent": "Select Active explicitly so History cannot satisfy the assertion.",
67
- "next": "position-market"
68
- },
69
- "position-market": {
70
- "action": "ui.scroll",
71
- "test_id": "perps-pro-market-twap-market-{{params.market}}",
72
- "offset": 600,
73
- "intent": "Expose an active card for the selected market.",
74
- "next": "wait-market"
75
- },
76
- "wait-market": {
77
- "action": "ui.wait_for",
78
- "test_id": "perps-pro-market-twap-market-{{params.market}}",
79
- "expected": "visible",
80
- "timeout_ms": 20000,
81
- "intent": "Require an active card for the selected market to remain visible.",
82
- "next": "capture"
83
- },
84
- "capture": {
85
- "action": "ui.screenshot",
86
- "path": "screenshots/evidence-twap-active-{{params.market}}.png",
87
- "label": "The selected market is visible in the TWAP Active tab.",
88
- "intent": "Preserve the visible active TWAP card for review.",
89
- "next": "done"
90
- },
91
- "done": {
92
- "action": "end",
93
- "status": "pass"
94
- }
95
- }
96
- }
97
- }