@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,158 +0,0 @@
1
- {
2
- "$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
3
- "title": "Perps release order entry",
4
- "description": "Exercises the live Perps order form through semantic visible controls without submitting an order.",
5
- "paramsSchema": {
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": [
9
- "market"
10
- ],
11
- "properties": {
12
- "market": {
13
- "type": "string",
14
- "description": "Perps market with no existing position so the New Long and Short controls are available."
15
- },
16
- "amount": {
17
- "type": "string",
18
- "default": "10"
19
- },
20
- "leverage": {
21
- "type": "string",
22
- "default": "5"
23
- }
24
- }
25
- },
26
- "workflow": {
27
- "entry": "open-perps",
28
- "nodes": {
29
- "open-perps": {
30
- "action": "ui.navigate",
31
- "page": "perps",
32
- "intent": "Reset transient Perps navigation state",
33
- "next": "open-market-list"
34
- },
35
- "open-market-list": {
36
- "action": "ui.navigate",
37
- "page": "perps-market-list",
38
- "intent": "Show the live Perps market list",
39
- "next": "open-market"
40
- },
41
- "open-market": {
42
- "action": "ui.navigate",
43
- "page": "perps-market",
44
- "market": "{{params.market}}",
45
- "intent": "Open the requested Perps market",
46
- "next": "open-long"
47
- },
48
- "open-long": {
49
- "action": "ui.press",
50
- "test_id": "perps-long-cta-button",
51
- "intent": "Open a new long market order",
52
- "next": "wait-order-entry"
53
- },
54
- "wait-order-entry": {
55
- "action": "ui.wait_for",
56
- "test_id": "perps-order-entry-page",
57
- "expected": "visible",
58
- "timeout_ms": 10000,
59
- "intent": "Confirm the order form finished opening",
60
- "next": "assert-long"
61
- },
62
- "assert-long": {
63
- "action": "metamask.perps.read_visible_state",
64
- "surface": "order-entry",
65
- "market": "{{params.market}}",
66
- "direction": "long",
67
- "order_type": "market",
68
- "require_test_ids": [
69
- "direction-tab-long",
70
- "direction-tab-short",
71
- "order-type-market",
72
- "order-type-limit",
73
- "amount-input-field",
74
- "leverage-input",
75
- "auto-close-toggle",
76
- "submit-order-button"
77
- ],
78
- "max_items": 150,
79
- "intent": "Prove the long market form and its semantic controls",
80
- "next": "set-amount"
81
- },
82
- "set-amount": {
83
- "action": "ui.set_input",
84
- "selector": "[data-testid=\"amount-input-field\"] input",
85
- "value": "{{params.amount}}",
86
- "intent": "Enter the USD order amount through the amount field",
87
- "next": "set-leverage"
88
- },
89
- "set-leverage": {
90
- "action": "ui.set_input",
91
- "selector": "[data-testid=\"leverage-input\"] input",
92
- "value": "{{params.leverage}}",
93
- "intent": "Enter leverage through the leverage field",
94
- "next": "assert-configured"
95
- },
96
- "assert-configured": {
97
- "action": "metamask.perps.read_visible_state",
98
- "surface": "order-entry",
99
- "market": "{{params.market}}",
100
- "direction": "long",
101
- "order_type": "market",
102
- "amount": "{{params.amount}}",
103
- "leverage": "{{params.leverage}}",
104
- "submit_enabled": true,
105
- "max_items": 150,
106
- "intent": "Prove amount, leverage, and submit eligibility update together",
107
- "next": "select-short"
108
- },
109
- "select-short": {
110
- "action": "ui.press",
111
- "test_id": "direction-tab-short",
112
- "intent": "Switch the same order form to Short",
113
- "next": "assert-short"
114
- },
115
- "assert-short": {
116
- "action": "metamask.perps.read_visible_state",
117
- "surface": "order-entry",
118
- "market": "{{params.market}}",
119
- "direction": "short",
120
- "order_type": "market",
121
- "amount": "{{params.amount}}",
122
- "submit_enabled": true,
123
- "max_items": 150,
124
- "intent": "Prove direction changes without losing configured values",
125
- "next": "select-limit"
126
- },
127
- "select-limit": {
128
- "action": "ui.press",
129
- "test_id": "order-type-limit",
130
- "intent": "Switch the order form to Limit",
131
- "next": "assert-limit"
132
- },
133
- "assert-limit": {
134
- "action": "metamask.perps.read_visible_state",
135
- "surface": "order-entry",
136
- "market": "{{params.market}}",
137
- "direction": "short",
138
- "order_type": "limit",
139
- "amount": "{{params.amount}}",
140
- "require_test_ids": ["limit-price-input", "limit-price-mid-button"],
141
- "max_items": 150,
142
- "intent": "Prove Limit mode exposes its price controls",
143
- "next": "capture"
144
- },
145
- "capture": {
146
- "action": "ui.screenshot",
147
- "path": "screenshots/perps-order-entry.png",
148
- "label": "Perps release order entry",
149
- "intent": "Preserve reviewer-visible proof of the configured order form",
150
- "next": "done"
151
- },
152
- "done": {
153
- "action": "end",
154
- "status": "pass"
155
- }
156
- }
157
- }
158
- }
@@ -1,259 +0,0 @@
1
- {
2
- "$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
3
- "title": "Perps release order validation",
4
- "description": "Exercises Perps minimum amount, percent, leverage, keyboard, and auto-close validation through semantic visible controls without submitting an order.",
5
- "paramsSchema": {
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": [
9
- "market"
10
- ],
11
- "properties": {
12
- "market": {
13
- "type": "string",
14
- "description": "Perps market with no existing position so the New Long order form can be validated."
15
- },
16
- "below_minimum_amount": {
17
- "type": "string",
18
- "default": "1"
19
- },
20
- "valid_amount": {
21
- "type": "string",
22
- "default": "10"
23
- },
24
- "percent": {
25
- "type": "string",
26
- "default": "50"
27
- },
28
- "minimum_leverage": {
29
- "type": "string",
30
- "default": "1"
31
- },
32
- "keyboard_leverage": {
33
- "type": "string",
34
- "default": "2"
35
- },
36
- "maximum_leverage": {
37
- "type": "string",
38
- "default": "40"
39
- },
40
- "invalid_take_profit": {
41
- "type": "string",
42
- "default": "1000"
43
- },
44
- "valid_take_profit": {
45
- "type": "string",
46
- "default": "70000"
47
- },
48
- "invalid_stop_loss": {
49
- "type": "string",
50
- "default": "100000"
51
- }
52
- }
53
- },
54
- "workflow": {
55
- "entry": "open-perps",
56
- "nodes": {
57
- "open-perps": {
58
- "action": "ui.navigate",
59
- "page": "perps",
60
- "intent": "Reset transient Perps navigation state",
61
- "next": "open-market-list"
62
- },
63
- "open-market-list": {
64
- "action": "ui.navigate",
65
- "page": "perps-market-list",
66
- "intent": "Show the live Perps market list",
67
- "next": "open-market"
68
- },
69
- "open-market": {
70
- "action": "ui.navigate",
71
- "page": "perps-market",
72
- "market": "{{params.market}}",
73
- "intent": "Open the requested Perps market",
74
- "next": "open-long"
75
- },
76
- "open-long": {
77
- "action": "ui.press",
78
- "test_id": "perps-long-cta-button",
79
- "intent": "Open a new long market order",
80
- "next": "wait-order-entry"
81
- },
82
- "wait-order-entry": {
83
- "action": "ui.wait_for",
84
- "test_id": "perps-order-entry-page",
85
- "expected": "visible",
86
- "timeout_ms": 10000,
87
- "intent": "Confirm the order form finished opening",
88
- "next": "enter-below-minimum"
89
- },
90
- "enter-below-minimum": {
91
- "action": "ui.set_input",
92
- "selector": "[data-testid=\"amount-input-field\"] input",
93
- "value": "{{params.below_minimum_amount}}",
94
- "intent": "Enter an amount below the market minimum",
95
- "next": "assert-below-minimum"
96
- },
97
- "assert-below-minimum": {
98
- "action": "metamask.perps.read_visible_state",
99
- "surface": "order-entry",
100
- "market": "{{params.market}}",
101
- "direction": "long",
102
- "order_type": "market",
103
- "amount": "{{params.below_minimum_amount}}",
104
- "submit_enabled": false,
105
- "max_items": 150,
106
- "intent": "Prove the below-minimum amount cannot be submitted",
107
- "next": "enter-valid-amount"
108
- },
109
- "enter-valid-amount": {
110
- "action": "ui.set_input",
111
- "selector": "[data-testid=\"amount-input-field\"] input",
112
- "value": "{{params.valid_amount}}",
113
- "intent": "Enter the minimum valid USD amount",
114
- "next": "enter-percent"
115
- },
116
- "enter-percent": {
117
- "action": "ui.set_input",
118
- "selector": "[data-testid=\"balance-percent-input\"] input",
119
- "value": "{{params.percent}}",
120
- "intent": "Enter a midpoint balance percentage",
121
- "next": "assert-percent"
122
- },
123
- "assert-percent": {
124
- "action": "metamask.perps.read_visible_state",
125
- "surface": "order-entry",
126
- "market": "{{params.market}}",
127
- "direction": "long",
128
- "order_type": "market",
129
- "percent": "{{params.percent}}",
130
- "submit_enabled": true,
131
- "max_items": 150,
132
- "intent": "Prove percent input updates a valid order summary",
133
- "next": "enter-min-leverage"
134
- },
135
- "enter-min-leverage": {
136
- "action": "ui.set_input",
137
- "selector": "[data-testid=\"leverage-input\"] input",
138
- "value": "{{params.minimum_leverage}}",
139
- "intent": "Enter minimum leverage",
140
- "next": "assert-min-leverage"
141
- },
142
- "assert-min-leverage": {
143
- "action": "metamask.perps.read_visible_state",
144
- "surface": "order-entry",
145
- "market": "{{params.market}}",
146
- "leverage": "{{params.minimum_leverage}}",
147
- "max_items": 150,
148
- "intent": "Prove minimum leverage is accepted",
149
- "next": "raise-with-keyboard"
150
- },
151
- "raise-with-keyboard": {
152
- "action": "ui.key_press",
153
- "key": "ArrowUp",
154
- "intent": "Raise leverage with the keyboard",
155
- "next": "assert-keyboard-leverage"
156
- },
157
- "assert-keyboard-leverage": {
158
- "action": "metamask.perps.read_visible_state",
159
- "surface": "order-entry",
160
- "market": "{{params.market}}",
161
- "leverage": "{{params.keyboard_leverage}}",
162
- "max_items": 150,
163
- "intent": "Prove the keyboard changes leverage by one step",
164
- "next": "enter-max-leverage"
165
- },
166
- "enter-max-leverage": {
167
- "action": "ui.set_input",
168
- "selector": "[data-testid=\"leverage-input\"] input",
169
- "value": "{{params.maximum_leverage}}",
170
- "intent": "Enter the market maximum leverage",
171
- "next": "assert-max-leverage"
172
- },
173
- "assert-max-leverage": {
174
- "action": "metamask.perps.read_visible_state",
175
- "surface": "order-entry",
176
- "market": "{{params.market}}",
177
- "leverage": "{{params.maximum_leverage}}",
178
- "max_items": 150,
179
- "intent": "Prove maximum leverage is accepted",
180
- "next": "enable-auto-close"
181
- },
182
- "enable-auto-close": {
183
- "action": "ui.press",
184
- "selector": "label:has([data-testid=\"auto-close-toggle\"])",
185
- "intent": "Enable take-profit and stop-loss controls",
186
- "next": "assert-auto-close"
187
- },
188
- "assert-auto-close": {
189
- "action": "metamask.perps.read_visible_state",
190
- "surface": "order-entry",
191
- "market": "{{params.market}}",
192
- "auto_close": true,
193
- "require_test_ids": [
194
- "tp-price-input",
195
- "tp-percent-input",
196
- "sl-price-input",
197
- "sl-percent-input"
198
- ],
199
- "max_items": 150,
200
- "intent": "Prove auto-close exposes linked take-profit and stop-loss fields",
201
- "next": "enter-invalid-take-profit"
202
- },
203
- "enter-invalid-take-profit": {
204
- "action": "ui.set_input",
205
- "selector": "[data-testid=\"tp-price-input\"] input",
206
- "value": "{{params.invalid_take_profit}}",
207
- "intent": "Enter a take-profit below the long entry price",
208
- "next": "assert-invalid-take-profit"
209
- },
210
- "assert-invalid-take-profit": {
211
- "action": "metamask.perps.read_visible_state",
212
- "surface": "order-entry",
213
- "market": "{{params.market}}",
214
- "auto_close": true,
215
- "submit_enabled": false,
216
- "require_test_ids": ["tp-validation-error"],
217
- "max_items": 150,
218
- "intent": "Prove an unsafe long take-profit is blocked",
219
- "next": "enter-valid-take-profit"
220
- },
221
- "enter-valid-take-profit": {
222
- "action": "ui.set_input",
223
- "selector": "[data-testid=\"tp-price-input\"] input",
224
- "value": "{{params.valid_take_profit}}",
225
- "intent": "Enter a take-profit above the long entry price",
226
- "next": "enter-invalid-stop-loss"
227
- },
228
- "enter-invalid-stop-loss": {
229
- "action": "ui.set_input",
230
- "selector": "[data-testid=\"sl-price-input\"] input",
231
- "value": "{{params.invalid_stop_loss}}",
232
- "intent": "Enter a stop-loss above the long entry price",
233
- "next": "assert-invalid-stop-loss"
234
- },
235
- "assert-invalid-stop-loss": {
236
- "action": "metamask.perps.read_visible_state",
237
- "surface": "order-entry",
238
- "market": "{{params.market}}",
239
- "auto_close": true,
240
- "submit_enabled": false,
241
- "require_test_ids": ["sl-validation-error"],
242
- "max_items": 150,
243
- "intent": "Prove an unsafe long stop-loss is blocked",
244
- "next": "capture"
245
- },
246
- "capture": {
247
- "action": "ui.screenshot",
248
- "path": "screenshots/perps-order-validation.png",
249
- "label": "Perps release order validation",
250
- "intent": "Preserve reviewer-visible proof of the validation controls",
251
- "next": "done"
252
- },
253
- "done": {
254
- "action": "end",
255
- "status": "pass"
256
- }
257
- }
258
- }
259
- }
@@ -1,47 +0,0 @@
1
- {
2
- "$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
3
- "title": "Perps release visible consistency",
4
- "description": "Proves bounded visible market-list row changes and containment of recent Perps activity across every activity filter on packaged Extension builds; it does not assert other market-detail surfaces.",
5
- "paramsSchema": {
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "sample_count": { "type": "integer", "minimum": 2, "default": 3 },
10
- "sample_interval_ms": { "type": "integer", "minimum": 100, "default": 1000 },
11
- "minimum_changed_count": { "type": "integer", "minimum": 1, "default": 1 },
12
- "minimum_recent_activity_count": { "type": "integer", "minimum": 1, "default": 1 },
13
- "timeout_ms": { "type": "integer", "minimum": 1000, "default": 30000 }
14
- }
15
- },
16
- "workflow": {
17
- "entry": "market-stream",
18
- "nodes": {
19
- "market-stream": {
20
- "action": "metamask.perps.assert_visible_consistency",
21
- "mode": "market-stream",
22
- "sample_count": "{{params.sample_count}}",
23
- "sample_interval_ms": "{{params.sample_interval_ms}}",
24
- "minimum_changed_count": "{{params.minimum_changed_count}}",
25
- "timeout_ms": "{{params.timeout_ms}}",
26
- "intent": "Prove bounded changes in rendered market-row facts",
27
- "next": "activity-containment"
28
- },
29
- "activity-containment": {
30
- "action": "metamask.perps.assert_visible_consistency",
31
- "mode": "activity-containment",
32
- "minimum_recent_activity_count": "{{params.minimum_recent_activity_count}}",
33
- "timeout_ms": "{{params.timeout_ms}}",
34
- "intent": "Prove recent visible activity identities are contained in full activity",
35
- "next": "capture"
36
- },
37
- "capture": {
38
- "action": "ui.screenshot",
39
- "path": "screenshots/perps-visible-consistency.png",
40
- "label": "Perps visible activity consistency",
41
- "intent": "Preserve reviewer-visible proof of the full activity surface",
42
- "next": "done"
43
- },
44
- "done": { "action": "end", "status": "pass" }
45
- }
46
- }
47
- }
@@ -1,76 +0,0 @@
1
- {
2
- "$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
3
- "title": "Perps source-dev snapshot consistency",
4
- "description": "Uses the optional source-dev Extension background hook to sample bounded Perps market data and compare one generic visible activity-card identity with normalized history.",
5
- "paramsSchema": {
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "sample_count": {
10
- "type": "integer",
11
- "minimum": 2,
12
- "default": 3
13
- },
14
- "sample_interval_ms": {
15
- "type": "integer",
16
- "minimum": 100,
17
- "default": 1000
18
- },
19
- "minimum_changed_market_count": {
20
- "type": "integer",
21
- "minimum": 0,
22
- "default": 0,
23
- "description": "Optional live-price movement assertion. Set above zero only when the proof requires observed market changes."
24
- },
25
- "minimum_history_count": {
26
- "type": "integer",
27
- "minimum": 1,
28
- "default": 1
29
- }
30
- }
31
- },
32
- "workflow": {
33
- "entry": "open-activity",
34
- "nodes": {
35
- "open-activity": {
36
- "action": "ui.navigate",
37
- "page": "perps-activity",
38
- "intent": "Open live Perps activity through visible controls",
39
- "next": "show-funds-activity"
40
- },
41
- "show-funds-activity": {
42
- "action": "metamask.perps.select_activity_filter",
43
- "filter": "deposits",
44
- "intent": "Show visible activity cards before generic identity comparison",
45
- "next": "sample"
46
- },
47
- "sample": {
48
- "action": "metamask.perps.read_snapshot",
49
- "include": ["markets", "history"],
50
- "sampling": {
51
- "count": "{{params.sample_count}}",
52
- "interval_ms": "{{params.sample_interval_ms}}"
53
- },
54
- "expect": {
55
- "minimum_changed_market_count": "{{params.minimum_changed_market_count}}",
56
- "minimum_history_count": "{{params.minimum_history_count}}",
57
- "require_activity_history_agreement": true
58
- },
59
- "max_items_per_section": 100,
60
- "intent": "Prove bounded market changes and one exact visible activity-to-history identity",
61
- "next": "capture"
62
- },
63
- "capture": {
64
- "action": "ui.screenshot",
65
- "path": "screenshots/perps-snapshot-consistency.png",
66
- "label": "Perps snapshot activity agreement",
67
- "intent": "Preserve reviewer-visible proof of the compared activity surface",
68
- "next": "done"
69
- },
70
- "done": {
71
- "action": "end",
72
- "status": "pass"
73
- }
74
- }
75
- }
76
- }
@@ -1,110 +0,0 @@
1
- {
2
- "$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
3
- "title": "Assert a foreground Mobile Pro Chase order",
4
- "description": "Keeps MetaMask foregrounded during a dwell and fails if the selected market's running Chase row vanishes.",
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
- "dwell_ms": {
26
- "type": "integer",
27
- "minimum": 1000,
28
- "default": 12000
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 Chase orders.",
45
- "next": "position-tab"
46
- },
47
- "position-tab": {
48
- "action": "ui.scroll",
49
- "test_id": "perps-pro-market-positions-panel-tab-chase",
50
- "scroll_into_view": true,
51
- "intent": "Expose the Chase 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-chase",
57
- "expected": "visible",
58
- "timeout_ms": 15000,
59
- "intent": "Require the Chase 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-chase",
65
- "intent": "Open Chase monitoring.",
66
- "next": "wait-running-before"
67
- },
68
- "wait-running-before": {
69
- "action": "ui.wait_for",
70
- "test_id": "perps-chase-status-active-{{params.market}}",
71
- "expected": "visible",
72
- "timeout_ms": 20000,
73
- "intent": "Require the running Chase row before the foreground dwell.",
74
- "next": "dwell"
75
- },
76
- "dwell": {
77
- "action": "wait",
78
- "duration_ms": "{{params.dwell_ms}}",
79
- "intent": "Keep the app foregrounded while the Chase session reprices.",
80
- "next": "position-running-after"
81
- },
82
- "position-running-after": {
83
- "action": "ui.scroll",
84
- "test_id": "perps-chase-status-active-{{params.market}}",
85
- "offset": 600,
86
- "intent": "Expose the surviving Chase row after the foreground dwell.",
87
- "next": "wait-running-after"
88
- },
89
- "wait-running-after": {
90
- "action": "ui.wait_for",
91
- "test_id": "perps-chase-status-active-{{params.market}}",
92
- "expected": "visible",
93
- "timeout_ms": 5000,
94
- "intent": "Fail if the Chase row vanished during the foreground dwell.",
95
- "next": "capture"
96
- },
97
- "capture": {
98
- "action": "ui.screenshot",
99
- "path": "screenshots/evidence-chase-running-{{params.market}}.png",
100
- "label": "The Chase row is still Running after a foreground dwell.",
101
- "intent": "Preserve the surviving running Chase row for review.",
102
- "next": "done"
103
- },
104
- "done": {
105
- "action": "end",
106
- "status": "pass"
107
- }
108
- }
109
- }
110
- }