gui tests: searcher-pick wheels down to the web search row, which Image recognition's MCP address put past the window's foot (#1745)

Cause: 6c1c0a747. It made image recognition an MCP server of magpie's
own, and added its address row (#visionMcpRow) to Settings › Models.
That is intended. In the "search help preserves ellipsis and hover
titles" case, the row pushes the web search row past the window's foot.
The app puts back Playwright's own scroll, so in WebKit the hover times
out in en, ja and de. Bisected with the test: green on 6c1c0a747^, red
from 6c1c0a747.

Change: wheel to the row's searcher button with reader.cjs's reach
before the hover. The assertions on the help's ellipsis and titles are
unchanged.

Run (playwright 1.62.0, alone):
- On origin/main 31c1e3ab1: 6/6 in chromium and webkit. Before: 3/6 in
  webkit.
- Rebased on accc8c090, which adds searcher-pick's failed-searcher cases
  (50adf78e6, which also names this red as #1745): 11/11 in both engines.
  The other seven of #1672's files and text-size were rerun on that head
  in both engines too, all green: gui-ja, routing-sessions, pick-skills,
  routing-group-fold, library-mcp-tools, profile-in-use.
Not run: the full GUI suite.
This commit is contained in:
yetone
2026-10-13 03:54:48 +08:00
parent cce4960bd3
commit 3869b0a27c
+4 -1
View File
@@ -21,7 +21,7 @@ const fs = require("node:fs/promises");
const path = require("node:path");
const { test } = require("node:test");
const { chromium, webkit } = require("playwright");
const { watchSettingsReads, settingsDrawn } = require("./reader.cjs");
const { watchSettingsReads, settingsDrawn, reach } = require("./reader.cjs");
const assets = path.resolve(__dirname, "../assets");
const choices = [
@@ -342,6 +342,9 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await settingsDrawn(page); // rows found are the ones that stay (#1659)
const row = page.locator("#searchList .searcher-row");
await row.waitFor();
// under Image recognition's MCP address (6c1c0a747) the row is
// past the window's foot: the reader scrolls down to it
await reach(page, row.locator("button.searcher-pick"));
// Hover retries if Settings' startup refresh replaces the row.
await row.locator("button.searcher-pick").hover();
assert((await row.locator(".sub").innerText()).startsWith(h.help));