@deeeed/metamask-harness 0.33.3 → 0.34.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.
- package/CHANGELOG.md +19 -0
- package/adapters/mobile/bridge-runtime/cdp-bridge.cjs +18 -2
- package/adapters/mobile/bridge-runtime/lib/target-discovery.cjs +83 -23
- package/dist/adapters/mobile/prepare.js +14 -0
- package/dist/adapters/mobile/video-recorder.js +282 -0
- package/dist/adapters.js +225 -35
- package/dist/command-contract.js +1 -0
- package/dist/commands/device-target.js +17 -6
- package/dist/commands/launch/index.js +27 -5
- package/dist/commands/launch/mobile.js +9 -2
- package/dist/commands/run-engine.js +34 -2
- package/dist/devices.js +9 -2
- package/dist/heal-bounds.js +10 -0
- package/dist/mm-harness-cli.js +4 -2
- package/dist/recipe-security.js +1 -0
- package/dist/recording-target.js +23 -5
- package/dist/runner.js +107 -6
- package/dist/runtime-context.js +33 -1
- package/docs/RECIPES.md +41 -0
- package/library/actions/mobile/app/network-control.mjs +135 -0
- package/library/actions/mobile/app/network.mjs +4 -0
- package/library/actions/mobile/perps/capture_performance.mjs +4 -0
- package/library/actions/mobile/perps/performance-capture.mjs +383 -0
- package/library/actions/mobile/perps/perps.mjs +16 -0
- package/library/actions/mobile/platform/bridge.mjs +57 -0
- package/library/actions/mobile/wallet/ensure_unlocked.mjs +27 -6
- package/library/actions/mobile/wallet/select_account.mjs +21 -17
- package/library/manifests/mobile.action-manifest.json +130 -1
- package/library/recipes/mobile/perps/performance.homepage.android-background-reconnect.recipe.json +159 -0
- package/library/recipes/mobile/perps/performance.homepage.android-background-short.recipe.json +157 -0
- package/library/recipes/mobile/perps/performance.homepage.android-cold-disk-cache.recipe.json +147 -0
- package/library/recipes/mobile/perps/performance.homepage.android-cold-no-cache.recipe.json +137 -0
- package/library/recipes/mobile/perps/performance.homepage.android-network-recovery.recipe.json +149 -0
- package/library/recipes/mobile/perps/performance.homepage.ios-background-reconnect.recipe.json +110 -0
- package/library/recipes/mobile/perps/performance.homepage.ios-background-short.recipe.json +108 -0
- package/library/recipes/mobile/perps/performance.homepage.ios-cold-disk-cache.recipe.json +122 -0
- package/library/recipes/mobile/perps/performance.homepage.ios-cold-no-cache.recipe.json +95 -0
- package/package.json +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "iOS Homepage Perps cold start without cache proof",
|
|
4
|
+
"description": "Clears only Perps performance caches, restarts the assigned iOS app without replacing wallet state, and validates fresh trending content at the visible Homepage endpoint.",
|
|
5
|
+
"workflow": {
|
|
6
|
+
"entry": "ensure-wallet",
|
|
7
|
+
"nodes": {
|
|
8
|
+
"ensure-wallet": {
|
|
9
|
+
"action": "metamask.wallet.ensure_unlocked",
|
|
10
|
+
"intent": "Preserve and unlock the existing simulator fixture",
|
|
11
|
+
"next": "start-performance-capture"
|
|
12
|
+
},
|
|
13
|
+
"start-performance-capture": {
|
|
14
|
+
"action": "metamask.perps.capture_performance",
|
|
15
|
+
"phase": "start",
|
|
16
|
+
"intent": "Start evidence before cache removal and process restart",
|
|
17
|
+
"next": "clear-perps-caches"
|
|
18
|
+
},
|
|
19
|
+
"clear-perps-caches": {
|
|
20
|
+
"action": "metamask.perps.clear_performance_caches",
|
|
21
|
+
"intent": "Remove only Perps persisted market and user snapshots",
|
|
22
|
+
"next": "restart-app"
|
|
23
|
+
},
|
|
24
|
+
"restart-app": {
|
|
25
|
+
"action": "app.lifecycle",
|
|
26
|
+
"command": "restart",
|
|
27
|
+
"settle_ms": 15000,
|
|
28
|
+
"runtime_ready_timeout_ms": 60000,
|
|
29
|
+
"intent": "Cold-restart the assigned iOS app without deleting wallet state",
|
|
30
|
+
"next": "unlock-after-restart"
|
|
31
|
+
},
|
|
32
|
+
"unlock-after-restart": {
|
|
33
|
+
"action": "metamask.wallet.ensure_unlocked",
|
|
34
|
+
"intent": "Restore the same fixture after the cold process launch",
|
|
35
|
+
"next": "open-wallet-home"
|
|
36
|
+
},
|
|
37
|
+
"open-wallet-home": {
|
|
38
|
+
"action": "ui.navigate",
|
|
39
|
+
"page": "home",
|
|
40
|
+
"intent": "Open Wallet Home after the no-cache cold launch",
|
|
41
|
+
"timeout_ms": 30000,
|
|
42
|
+
"next": "wait-perps-section"
|
|
43
|
+
},
|
|
44
|
+
"wait-perps-section": {
|
|
45
|
+
"action": "ui.wait_for",
|
|
46
|
+
"test_id": "homepage-section-title-perps",
|
|
47
|
+
"expected": "present",
|
|
48
|
+
"intent": "Require the Perps section after cold launch",
|
|
49
|
+
"timeout_ms": 30000,
|
|
50
|
+
"next": "show-perps-section"
|
|
51
|
+
},
|
|
52
|
+
"show-perps-section": {
|
|
53
|
+
"action": "ui.scroll",
|
|
54
|
+
"test_id": "homepage-section-title-perps",
|
|
55
|
+
"scroll_into_view": true,
|
|
56
|
+
"animated": true,
|
|
57
|
+
"settle": true,
|
|
58
|
+
"intent": "Bring fresh Perps content into the viewport",
|
|
59
|
+
"timeout_ms": 30000,
|
|
60
|
+
"next": "capture-after"
|
|
61
|
+
},
|
|
62
|
+
"capture-after": {
|
|
63
|
+
"action": "ui.screenshot",
|
|
64
|
+
"path": "screenshots/ios-homepage-perps-cold-no-cache.png",
|
|
65
|
+
"intent": "Preserve visible cold-no-cache content",
|
|
66
|
+
"next": "settle-frame"
|
|
67
|
+
},
|
|
68
|
+
"settle-frame": {
|
|
69
|
+
"action": "wait",
|
|
70
|
+
"duration_ms": 2500,
|
|
71
|
+
"intent": "Allow the visible next-frame checkpoint to finish",
|
|
72
|
+
"next": "finish-performance-capture"
|
|
73
|
+
},
|
|
74
|
+
"finish-performance-capture": {
|
|
75
|
+
"action": "metamask.perps.capture_performance",
|
|
76
|
+
"phase": "end",
|
|
77
|
+
"required_stages": [
|
|
78
|
+
"viewport_demand",
|
|
79
|
+
"socket_received",
|
|
80
|
+
"react_commit",
|
|
81
|
+
"next_frame_checkpoint"
|
|
82
|
+
],
|
|
83
|
+
"required_lifecycles": ["cold_no_cache"],
|
|
84
|
+
"required_sources": ["fresh_socket"],
|
|
85
|
+
"required_fresh_content_variants": ["trending"],
|
|
86
|
+
"intent": "Require cold-no-cache lifecycle and fresh visible trending content",
|
|
87
|
+
"next": "done"
|
|
88
|
+
},
|
|
89
|
+
"done": {
|
|
90
|
+
"action": "end",
|
|
91
|
+
"status": "pass"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|