From 9d6e5286925c405470c50e0779d56700c6ff1b99 Mon Sep 17 00:00:00 2001 From: cryptotavares Date: Thu, 3 Dec 2026 16:03:36 +0000 Subject: [PATCH 1/2] docs(mobile-visual-testing): update for @metamask/client-mcp-core 0.16.1 and @metamask/device-mcp 0.10.0 --- .../references/cli-reference.md | 8 ++++---- .../references/error-recovery.md | 12 ++++++------ .../references/runtime-monitoring.md | 2 +- .../repos/metamask-mobile.md | 18 ++++++++++-------- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/domains/testing/skills/mobile-visual-testing/references/cli-reference.md b/domains/testing/skills/mobile-visual-testing/references/cli-reference.md index aee08df9..caf132a4 100644 --- a/domains/testing/skills/mobile-visual-testing/references/cli-reference.md +++ b/domains/testing/skills/mobile-visual-testing/references/cli-reference.md @@ -79,7 +79,7 @@ These flags work with every command and can appear anywhere in the command line. Observations contain `testIds` and `a11y` only, no app state. The mobile a11y tree is flat: layout-only nodes, the status bar, the navigation bar and the Expo dev-launcher "Tools" button are filtered out (the button is still drawn, and can cover a target). The Android soft keyboard is not: while it is open, its `com.google.android.inputmethod.latin:id/*` IDs appear. -A mobile ref is resolved again at tap time, by the node's test ID or, without one, by its label and type, and the first matching element in the tree is tapped. A node with `"ambiguous": true` shares that identity with other nodes, so its ref can tap another one; a label-only ref can also match an element that has a test ID and the same text. Prefer a unique `--testid`. +A mobile ref of a node with a test ID, label or text that no other node shares is resolved again at action time by that identity. Two kinds of ref only work with `mm click`: refs of nodes with no test ID, label or text, and refs marked `"ambiguous": true` (another node has the same test ID, or the same label or text and type). `mm click` taps the listed element at its `bounds`, and the result's `target` ends in ` (bounds)`. If the element is no longer at those bounds, the click fails with `MM_TARGET_NOT_FOUND` and taps nothing: run `describe-screen` again. `type`, `wait-for`, `get-text`, `scroll-to-element` and `long-press` refuse such a ref with `MM_TARGET_NOT_FOUND` (exit 4) and send nothing to the device; the `hint` says what to use instead (a unique `--testid`, `mm click `, or `mm tap-coordinates `). After a mutating call, an observation that takes longer than 8 s does not fail the call: it is `{"timedOut": true}` with no tree and does not replace the diff baseline. Run `describe-screen` before you use refs. @@ -104,7 +104,7 @@ Branch on `error.code` or the exit code, never on the message text. `error.retry | 5 | timeout (click, type, queue and request timeouts: state unknown) | | 6 | platform, device, Metro or Hermes not available | -Exit 0 is success. Exit 7 is reserved for a daemon version mismatch. Without a daemon, any command that needs one, including an unknown command, exits 3 (`MM_DAEMON_NOT_RUNNING`) before it is validated. +Exit 0 is success. Exit 7 is reserved for a daemon version mismatch. An unknown command, or a bad `launch` value such as `--platform foo`, exits 2 with `MM_INVALID_INPUT` before any daemon starts. A numeric flag whose value is not an integer also exits 2 (`--timeout expects an integer, got "abc"`), but only once a daemon runs; with no daemon, that command exits 3 (`MM_DAEMON_NOT_RUNNING`). `mm stop` is the exception: it prints plain text, not JSON (`Daemon stopped (was PID on port ).`). With no daemon it prints `No daemon is running.` on stderr and exits 0. See [error-recovery.md](error-recovery.md#reading-a-failure) for recovery per code. @@ -179,7 +179,7 @@ The generic core package may display environment-selection and test-state comman | Command | Description | | --- | --- | | `mm click ` | Click by accessibility reference or test ID | -| `mm type ` | Clear and type into an editable element. `""` clears it (Android: exit 0; iOS: the field is cleared, but the call exits 4 with `MM_TYPE_FAILED`) | +| `mm type ` | Clear and type into an editable element. `""` clears it and exits 0 with `textLength: 0` | | `mm get-text ` | Read an element's text | | `mm wait-for ` | Wait for an element to become visible | | `mm scroll-to-element ` | Swipe until the element is inside the viewport | @@ -290,7 +290,7 @@ mm cdp Runtime.evaluate '{"expression":"1+1","returnByValue":true}' --timeout 30 | `--app-id ` | Use this app identity for this call only (`io.metamask.MetaMask` on iOS, `io.metamask` on Android) | | `--target hermes\|android-webview` | `hermes` (default): the React Native runtime. `android-webview`: a debuggable in-app WebView (Android only, not validated) | -`cdp` uses the Metro port of the session: the launch `--metro-port ` or `MM_METRO_PORT`, else `HERMES_METRO_PORT`, else 8081. The session keeps one Hermes connection: the first call connects, so it can take a bit longer, and later calls reuse it. A call with `--metro-port` or `--app-id` uses a one-shot connection and leaves the session's connection alone. A failure names the port: `MM_CDP_FAILED` (exit 1), `[HERMES_CONNECTION_FAILED] Hermes CDP connection failed: fetch failed (Metro port 8099)`. +`cdp` uses the Metro port of the session: the launch `--metro-port `, else the port the launch resolved from `MM_METRO_PORT`, else `HERMES_METRO_PORT`, else 8081. The session keeps one Hermes connection: the first call connects, so it can take a bit longer, and later calls reuse it. A call with `--metro-port` or `--app-id` uses a one-shot connection and leaves the session's connection alone. A failure names the port: `MM_CDP_FAILED` (exit 1), `[HERMES_CONNECTION_FAILED] Hermes CDP connection failed: fetch failed (Metro port 8099)`. ### `mm hermes-targets [flags]` diff --git a/domains/testing/skills/mobile-visual-testing/references/error-recovery.md b/domains/testing/skills/mobile-visual-testing/references/error-recovery.md index 3e578b05..67e03075 100644 --- a/domains/testing/skills/mobile-visual-testing/references/error-recovery.md +++ b/domains/testing/skills/mobile-visual-testing/references/error-recovery.md @@ -43,7 +43,7 @@ A failed command prints **one JSON line on stdout** and exits non-zero: - `error.hint` is optional. `error.retryable` is always present and is `true` only when running the same command again, unchanged, is safe (reads and waits). It is `false` for click, type, queue and request timeouts, because the action state is unknown. - `meta` is present when the daemon answered. A usage error the CLI rejects before sending (exit 2) and a missing daemon (exit 3) have none; a daemon-side schema `VALIDATION_ERROR` does. - A successful result has **no** `ok` field. `mm stop` still prints plain text (`Daemon stopped (was PID on port ).`, or `No daemon is running.` on stderr with exit 0). -- Without a daemon, an unknown command exits 3 (`MM_DAEMON_NOT_RUNNING`), not 2: the daemon check runs first. +- An unknown command, or a bad `launch` value, exits 2 (`MM_INVALID_INPUT`) before any daemon starts. A non-integer numeric flag (`--timeout abc`) exits 2 once a daemon runs, and 3 (`MM_DAEMON_NOT_RUNNING`) with no daemon. | Exit | Meaning | Codes (examples) | | --- | --- | --- | @@ -64,13 +64,13 @@ Launch errors use the core `ErrorCode` set. `launch` preserves any consumer-thro | Code | Exit | Meaning and recovery | | --- | --- | --- | -| `MM_TARGET_NOT_FOUND` | 4 | The element is not in the UI tree, or the reference is stale or not targetable (`Unknown a11yRef`; for `scroll-to-element`: never found). Run `mm describe-screen` and target again; a conditionally rendered section can unmount a test ID that an earlier snapshot had. A message that says `Use device_snapshot` names an MCP tool; the CLI equivalent is `mm describe-screen`. | +| `MM_TARGET_NOT_FOUND` | 4 | The element is not in the UI tree, or the reference is stale (`Unknown a11yRef`; for `scroll-to-element`: never found). A ref of a node with no test ID, label or text, or marked `ambiguous`, works only with `mm click`: other commands refuse it at once and send nothing (follow the `hint`), and a click fails when the element is no longer at its `bounds` (`not found at its snapshot bounds`; nothing was tapped). Run `mm describe-screen` and target again; a conditionally rendered section can unmount a test ID that an earlier snapshot had. A message that says `Use device_snapshot` names an MCP tool; the CLI equivalent is `mm describe-screen`. | | `MM_TARGET_NOT_VISIBLE` | 4 | The element was found but is outside the viewport: a tap on an off-screen element, or `scroll-to-element` that could not bring it into view. Run `mm scroll-to-element`, then tap. When the failing command **is** `scroll-to-element`, its hint is not useful: run `describe-screen`, check the element still exists and its `bounds`, try the other `--direction`, or tap the center of `bounds` with `mm tap-coordinates`. | | `MM_WAIT_TIMEOUT` | 5 | The element did not appear before the deadline. `retryable: true`. Verify the screen and increase `--timeout` if the app is still transitioning. | | `MM_TARGET_OBSCURED` | 4 | iOS and Android: another element (keyboard, sheet, overlay, the Expo "Tools" button of dev builds) covers the tap point, so nothing was tapped. The message names the cover. Close the keyboard with `mm click … --dismiss-keyboard`, or close or move the overlay first. | | `MM_CLICK_FAILED` | 4 | The click failed for another reason. On mobile a `--testid` that never appeared usually ends here (the driver's wait timed out) rather than in `MM_TARGET_NOT_FOUND` / `MM_CLICK_TIMEOUT`. Check the test ID with `list-testids`, then re-describe. | | `MM_CLICK_TIMEOUT` | 5 | The click hung after the element was found; the state is unknown. Describe the screen before retrying. | -| `MM_TYPE_FAILED` | 4 | The target may not be editable. Verify the selected element and keyboard state. On iOS, `mm type ""` ends here (`idb ui text` rejects empty text) after the field was cleared. | +| `MM_TYPE_FAILED` | 4 | The target may not be editable. Verify the selected element and keyboard state. | | `MM_TYPE_TIMEOUT` | 5 | Input stalled; the state is unknown. Describe the screen, obtain a fresh target, and retry. | | `MM_GETTEXT_FAILED` | 4 | The target detached or does not expose text. Re-describe and re-target. | | `MM_GETTEXT_TIMEOUT` | 5 | Text retrieval exceeded the deadline. Retry with a fresh target or larger `--timeout`. | @@ -135,10 +135,10 @@ On mobile the screenshot is written to device-mcp's own temporary directory (` | `MM_TARGET_NOT_VISIBLE` from `scroll-to-element` (exit 4) | The element is in the tree but never came into the viewport | `describe-screen`, check its `bounds`, try the other `--direction`, raise `--maxAttempts`, or tap the center of `bounds` with `mm tap-coordinates` | | `MM_TARGET_NOT_FOUND` from `scroll-to-element` (exit 4) | The element left the tree (conditionally rendered section) or the ID is wrong | `describe-screen` to confirm it still exists; re-open the screen that renders it | | `MM_TARGET_OBSCURED` (exit 4) | The keyboard, a sheet or an overlay covers the tap point; nothing was tapped | `mm click … --dismiss-keyboard`, or close the overlay first. In a dev build, the cover can be the Expo "Tools" button; see the overlay's Gotchas | -| The tap opened another screen than expected | A ref that is `ambiguous` or has no test ID matched another element with the same identity | Go back without acting on the new screen; tap by a unique `--testid` | +| The tap opened another screen than expected | A `--testid` with no exact match matched a longer test ID by substring, or a stale ref | Go back without acting on the new screen; check `list-testids` and tap by a unique `--testid` | | `observations: {"timedOut": true}` | The observation took longer than 8 s; the action itself succeeded | `mm describe-screen` before you use refs | | `MM_TOOL_NOT_SUPPORTED_ON_PLATFORM` (exit 6) | A browser-only command on a mobile session | Use visible mobile UI interactions; see [cli-reference.md](cli-reference.md#browser-only) | -| Interaction timeout | Animation, overlay, or stale/ambiguous target | Re-`describe-screen`, target by a unique test ID or fresh a11y ref (no `--within` on mobile), and increase `--timeout` only when appropriate | +| Interaction timeout | Animation, overlay, or stale target | Re-`describe-screen`, target by a unique test ID or fresh a11y ref (no `--within` on mobile), and increase `--timeout` only when appropriate | | `--testId` times out | Incorrect capitalization | Use `--testid` in lowercase | | Daemon address already in use | Stale daemon state (`MM_PORT_IN_USE`) | Run `mm stop --force`, then `mm launch` | @@ -159,7 +159,7 @@ If the CLI hangs or returns connection errors: 1. Check status: `mm status`. 2. Stop stale state: `mm stop --force`. -3. Inspect `.mm-daemon.log`. Every request line ends with the outcome, for example `POST /tool/scroll_to_element 200 ok=false code=MM_TARGET_NOT_VISIBLE 15957ms`; `grep ok=false .mm-daemon.log` lists the failed calls of a run. +3. Inspect `.mm-daemon.log`. Every request line has the outcome and what the call acted on (`testid=`, `ref=`, `direction=`, …), for example `POST /tool/scroll_to_element 200 ok=false code=MM_TARGET_NOT_VISIBLE testid=import-token-button 15957ms`; `grep ok=false .mm-daemon.log` lists the failed calls of a run. 4. Restart with `mm launch`. The daemon shuts down after 30 minutes of inactivity. Its state is stored in `.mm-server` at the project root, isolated per worktree. diff --git a/domains/testing/skills/mobile-visual-testing/references/runtime-monitoring.md b/domains/testing/skills/mobile-visual-testing/references/runtime-monitoring.md index 290d0f1e..3332e6ed 100644 --- a/domains/testing/skills/mobile-visual-testing/references/runtime-monitoring.md +++ b/domains/testing/skills/mobile-visual-testing/references/runtime-monitoring.md @@ -246,7 +246,7 @@ Two additional log sources complement the JS interceptors: ### Daemon log -Records CLI events, session lifecycle, and tool execution timing. +Records CLI events, session lifecycle, and tool execution timing. Each request line has the outcome and what the call acted on (`testid=`, `ref=`, `method=`, …); typed text is never logged. ```bash # Read last 50 lines diff --git a/domains/testing/skills/mobile-visual-testing/repos/metamask-mobile.md b/domains/testing/skills/mobile-visual-testing/repos/metamask-mobile.md index f918e59b..aa3c49d9 100644 --- a/domains/testing/skills/mobile-visual-testing/repos/metamask-mobile.md +++ b/domains/testing/skills/mobile-visual-testing/repos/metamask-mobile.md @@ -89,14 +89,16 @@ Session metadata is written to `test-artifacts//session.json`. Set `M mm describe-screen ``` -Use fresh output after navigation. Accessibility refs (`e1`, `e2`, ...) are ephemeral: always take refs from the latest response (`describe-screen` or the `observations` of your last action). Every observation renumbers the refs, so a ref from the call before last can now name another element. A node with no test ID, name or value can be listed with a ref that is not targetable (`MM_TARGET_NOT_FOUND`, `Unknown a11yRef: e6. Available refs: …`): use a named child or sibling from the `Available refs` list. +Use fresh output after navigation. Accessibility refs (`e1`, `e2`, ...) are ephemeral: always take refs from the latest response (`describe-screen` or the `observations` of your last action). Every observation renumbers the refs, so a ref from the call before last can now name another element. -**A mobile ref is not tied to its node.** It is resolved again at tap time: by the node's test ID, or, without one, by its label and type. The tap goes to the **first** element in the tree that matches. So: +**Which refs work where.** A ref of a node with a test ID, label or text that no other node shares works with every target command; it is resolved again at action time by that identity. Two kinds of ref only work with `mm click`: -- A node with `"ambiguous": true` shares its test ID or label with other nodes, and its ref can tap another one. Do not tap it by ref. -- A label-only ref (a node with no `testId`) also matches an element with a test ID and the same text. +- refs of nodes with no test ID, label or text (unlabelled views, spinners, unnamed controls); +- refs marked `"ambiguous": true` (another node has the same test ID, or the same label or text and type). -On a real-funds wallet, tap by a unique `--testid`. Use a ref only for a node with a unique name and no `ambiguous` flag, taken from the latest response. Check the result's `target` and the next screen. +`mm click` taps such a ref at the listed node's `bounds`, and the result's `target` ends in ` (bounds)` (`"target":"a11yRef:e6 (bounds)"`). If the element is no longer at those bounds (the screen changed), the click fails with `MM_TARGET_NOT_FOUND` and taps nothing: run `describe-screen` again. `type`, `wait-for`, `get-text`, `scroll-to-element` and `long-press` refuse such a ref with `MM_TARGET_NOT_FOUND` (exit 4) before any device call; the `hint` names what to use instead (a unique `--testid`, `mm click `, or `mm tap-coordinates ` at the center of `bounds`). + +On a real-funds wallet, tap by a unique `--testid` when there is one. Take refs from the latest response, and check the result's `target` and the next screen. **Observation efficiency:** mutating actions (`click`, `type`, ...) and `run-steps` return a compact diff of what changed. Reads, discovery commands and `mm cdp` return no observation. Use the global `--observe ` flag to change the observation of one call: @@ -133,7 +135,7 @@ mm type e2 "text" `--selector` (CSS) and `--within` (scoped search) are **rejected by the mobile driver** on both platforms even though the shared CLI accepts the flags — see Gotchas. To disambiguate duplicate targets, use a unique test ID or the exact element's fresh a11y ref. -The CLI flag is `--testid` (all lowercase); `--testId` is silently mis-parsed as a positional target and hits the wrong element. `mm type` clears the field before typing, so a retype replaces the text. To clear a field, run `mm type ""`. It clears on both platforms: on Android it exits 0 (`textLength: 0`); on iOS it exits 4 with `MM_TYPE_FAILED` (`idb ui text` rejects empty text), but the field is already empty. On iOS, `get-text` of a text field returns its placeholder, not what you typed: read the field's `textContent` in `describe-screen`. +The CLI flag is `--testid` (all lowercase); `--testId` is silently mis-parsed as a positional target and hits the wrong element. `mm type` clears the field before typing, so a retype replaces the text. To clear a field, run `mm type ""`: it exits 0 with `textLength: 0` on both platforms. On iOS, `get-text` of a text field returns its placeholder, not what you typed: read the field's `textContent` in `describe-screen`. **Covered targets.** Before the tap, the device hit-tests the tap point on **iOS and Android**. A covered target fails with `MM_TARGET_OBSCURED` (exit 4) and nothing is tapped. The message names the cover, for example `… is covered at (937, 1903) by the keyboard: android.widget.TextView` or `… by android.view.View around android.widget.ImageView label="Tools"` (the Expo dev button, see Gotchas). When the keyboard is the cover, add `--dismiss-keyboard`: the driver closes the keyboard and taps once more, and the result has `keyboardDismissed: true`: @@ -289,7 +291,7 @@ Pattern: discover with `mm describe-screen` → batch known steps with `mm run-s ## Mobile Limitations and Gotchas - **Only `--testid` and a11y refs target elements.** `--selector` throws (`CSS selectors are not supported on mobile`) and `--within` throws (`Scoped element search (within) is not supported on mobile`) at the driver on both iOS and Android, even though the shared CLI parses both flags. Do not use them. -- **A non-numeric flag value is dropped without an error.** `click --testid x --timeout abc` runs with the default timeout and still taps. Check numeric flag values before you run the command. +- **A non-integer numeric flag fails before anything runs.** `click --testid x --timeout abc` exits 2 with `MM_INVALID_INPUT` (`--timeout expects an integer, got "abc"`) when a daemon runs, and 3 (`MM_DAEMON_NOT_RUNNING`) when none does. An unknown command, or a bad `launch` value such as `--platform foo`, exits 2 before any daemon starts. - **The `--testid` flag is lowercase.** `--testId` is not recognized as a flag; the value is treated as a positional target and silently hits the wrong element (usually timing out). - **Element matching is exact first, then a case-insensitive substring.** `@metamask/device-mcp` looks for an element whose identifier `equals` the value somewhere in the tree before it falls back to a substring match (iOS: the accessibility identifier, `AXUniqueId`; Android: `resource-id`), so `--testid account-picker` resolves to `account-picker`, not `account-picker-avatar`. When no exact match exists the substring fallback still applies: `--testid Confirm` can match `Confirm Transaction`. Prefer exact, unique test IDs. If the screen after a tap is not the expected one, check `list-testids` for longer IDs that contain your value, and use `mm tap-coordinates` at the center of the element's `bounds` from `describe-screen` (Android: pixels). - **`mm type` clears first** on both platforms, so there is no need to clear the field manually (`mm type ""` clears it, see [Interact](#3-interact)). There is no trailing-newline submit trick; to submit, tap the on-screen keyboard action button (a fresh a11y ref) or the form's submit control. @@ -301,7 +303,7 @@ Pattern: discover with `mm describe-screen` → batch known steps with `mm run-s - **After a call with `--observe none`, refs are not refreshed.** Target by `--testid`, or run `describe-screen` before you use refs again: a stale ref can tap a different element. - **Output is one line of JSON** when stdout is not a terminal. Parse it as JSON. A success has no `ok` field; a failure is `{"ok":false,"error":{"code","message","hint"?,"retryable"}}` with a class exit code. Add `--pretty` (or set `MM_PRETTY=1`) only when a human reads the output. - **Observations carry no app state**, and `mm get-state` on mobile only reports whether the app is loaded (`source: "stub"`). Identify the screen from `describe-screen` test IDs: `login-password-input` = unlock; wallet home = `wallet-screen` on Android, `account-picker` on iOS (the iOS tree can have no `wallet-screen`, so `wait-for --testid wallet-screen` can time out after a good unlock). Read wallet state (account, network, balance) from the screen or through `mm cdp`. The `launch` result's `state` can also carry `isUnlocked` and a generic `prerequisites` list written for the extension; do not rely on either. -- **Dev builds: the Expo dev "Tools" button can cover a target.** A Metro-attached dev build can show a floating "Tools" button over the app. Not every setup shows it, and it can be dragged anywhere on the screen, so where it sits depends on the setup. It is not in `testIds` or `a11y`. A click on a target under it is refused with `MM_TARGET_OBSCURED`, and the message names the button (`… by android.view.View around android.widget.ImageView label="Tools"`). A `tap-coordinates` near the target can still hit the button and open the Expo dev menu (Reload / Go home / …). To clear the target, drag the button away with `mm device-swipe` from the button's position (take it from a screenshot), then click again. If the dev menu opens, close it with `mm tap-coordinates` at the center of its close (X) button: the `Close` ref is itself refused as covered by its button, and the button has no name, so it has no usable ref. Never tap **Reload** or **Go home** on a real-funds wallet. +- **Dev builds: the Expo dev "Tools" button can cover a target.** A Metro-attached dev build can show a floating "Tools" button over the app. Not every setup shows it, and it can be dragged anywhere on the screen, so where it sits depends on the setup. It is not in `testIds` or `a11y`. A click on a target under it is refused with `MM_TARGET_OBSCURED`, and the message names the button (`… by android.view.View around android.widget.ImageView label="Tools"`). A `tap-coordinates` near the target can still hit the button and open the Expo dev menu (Reload / Go home / …). To clear the target, drag the button away with `mm device-swipe` from the button's position (take it from a screenshot), then click again. If the dev menu opens, close it with `mm click ` of the unnamed button around its close (X) icon (it taps at the button's `bounds`), or `mm tap-coordinates` at its center: the `Close` ref is itself refused as covered by that button. Never tap **Reload** or **Go home** on a real-funds wallet. - **A navigation can finish after the observation.** See [Slow first screens](#slow-first-screens-android): confirm with `mm wait-for --testid `, and do not tap again. - **iOS: the tab bar items are not in the tree.** On the iPhone 17 Pro, `describe-screen` lists only the `Tab Bar` group (y 791–874 points), not `tab-bar-item-*`, so `click --testid tab-bar-item-Trending` fails with `MM_CLICK_FAILED` after 15 s. Tap the tab with `mm tap-coordinates` from a screenshot of the tab bar (Home, Explore, Money, Social, then the `+` Actions button: never tap `+` on a real-funds wallet). Android lists `tab-bar-item-Wallet`, `tab-bar-item-Trending`, `tab-bar-item-Money` and `tab-bar-item-Social`. - **iOS wallet home actions are in the tree.** `@metamask/device-mcp` supplements the iOS `axbridge` snapshot with the identified elements the `ax` API reports, so `wallet-buy-button`, `wallet-swap-button`, `wallet-send-button` and `wallet-receive-button` appear in `list-testids` and `describe-screen` (verified on iPhone 17 Pro). Clicking them was not verified: if a click fails or times out, fall back to `mm tap-coordinates ` (points) using the element's `bounds` or the `mm screenshot` image. From ef1c1c63fc5dd2cf7b3af2f66d3d1d8c91358c37 Mon Sep 17 00:00:00 2001 From: cryptotavares Date: Thu, 3 Dec 2026 16:14:04 +0000 Subject: [PATCH 2/2] docs(changelog): add the mobile-visual-testing 0.16.1 entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index efb6a3f2..c583fc55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Use the task-bound Harness for compact tool discovery in Recipe Cook. Verify the adapter and checkout at setup, then look up only the recipe or action needed. For a dev or fix-bug debrief requested directly in chat, identify the instruction or tool output that would have saved the most time. ([#311](https://github.com/MetaMask/skills/pull/311)) - Record Recipe Cook's final PR proof from the clean commit proposed for publication. Preserve the selected attempt's screenshot paths when Pretty PR packages evidence. ([#311](https://github.com/MetaMask/skills/pull/311)) +- Update `testing/mobile-visual-testing` for `@metamask/client-mcp-core` 0.16.1 and `@metamask/device-mcp` 0.10.0. Refs of unnamed or `ambiguous` nodes only work with `mm click`, which taps them at their bounds (`target` ends in ` (bounds)`); other target commands refuse them with `MM_TARGET_NOT_FOUND` and a `hint`. An unknown command or a bad `launch` value exits 2 before any daemon starts, and a non-integer numeric flag such as `--timeout abc` exits 2 instead of being dropped. iOS `mm type ""` exits 0, `mm cdp` and `mm hermes-targets` keep the Metro port the launch resolved from `MM_METRO_PORT`, and daemon log lines name the call's target. ([#329](https://github.com/MetaMask/skills/pull/329)) - Update `testing/visual-testing` for `@metamask/client-mcp-core` 0.16.0. An unknown command or a bad `launch` value exits 2 with `MM_INVALID_INPUT`, a target that matches several elements fails with `MM_TARGET_NOT_FOUND`, `mm screenshot --selector` takes `--timeout` and fails after 2 s with `MM_TARGET_NOT_FOUND` when nothing matches, a `--frame` wrapper with one iframe resolves to that iframe, `mm mock-network requests` redacts URLs, and daemon log lines name the call's target. ([#316](https://github.com/MetaMask/skills/pull/316)) - Update `testing/visual-testing` for `@metamask/client-mcp-core` 0.15.0. Add `mm events mark`, `mm logs` and `mm network` with a per-flow recipe in place of `console.error` hooks and CDP network capture, `mm cdp --target sw` and `--fresh`, iframe refs and `--frame`, `mm screenshot --selector`, mock-network request bodies and service-worker, offscreen and snap matching, the hidden-checkbox `clickedLabel` click, the `ref` shorthand in `run-steps`, and the one timeout budget with `MM_QUEUE_TIMEOUT`. ([#297](https://github.com/MetaMask/skills/pull/297)) - Update `testing/mobile-visual-testing` for `@metamask/client-mcp-core` 0.15.0 and `@metamask/device-mcp` 0.9.0. Android taps on a covered target now fail with `MM_TARGET_OBSCURED`, `visible: false` now marks off-screen elements on Android too, `mm type ""` clears a field, and `mm cdp` reuses the launch Metro port over one persistent connection. The "Android `visible` is always `true`", "pass `--metro-port` on every `cdp` call" and `press-button back` keyboard workarounds are removed. The skill adds the slow-first-screen recipe (`wait-for` the new screen, do not tap again), the `run-steps` `ref` shorthand, the shared timeout budget with `MM_QUEUE_TIMEOUT`, the iOS tab bar that is not in the tree, and a warning that a mobile ref is resolved again at tap time and can tap another element with the same test ID or label ([#298](https://github.com/MetaMask/skills/pull/298)).