gui tests: agent-panel-name-width's lists tick two models, as menuSaid names them (#4203)
The fixture gave WorkBuddy's and Claude Desktop's lists `shown`/`total`, but /api/state counts them as `listed`, and since6915c8cdemenuSaid names a list's models only while one or two are ticked. So the rows read "Showing 3 / undefined models", words too short to cut, and every case failed at "workbuddy's words not cut" on macOS and Linux alike. The reporter's two long names were never drawn, so the test no longer checked #2447. Each list now ticks two of its `listed` 3 and 9. Cause and patch by R1cK-ChaN on #4203 (c99d001 on their fork), ported as written. Run at origin/mainea51526b6on mote (macOS 27, Playwright 1.62.0): - agent-panel-name-width.test.cjs alone, chromium and webkit: 0/32 before, 32/32 after. - Broken by hand: #2447's grid put back (20px minmax(0, 1fr) auto) with this change, chromium: 0/16, "en 550: workbuddy's name cut to 26.5px of 76", "en 440: ... 0px of 76". Not run: the whole GUI suite (another session's full GUI suite was on mote); a test fixture only, no app code changed. Co-authored-by: Rick Chan <rick.chan.zhikun@gmail.com>
This commit is contained in:
@@ -16,14 +16,17 @@ const { chromium, webkit } = require("playwright");
|
||||
const assets = path.resolve(__dirname, "../assets");
|
||||
const magpie = [{ value: "magpie", label: "magpie", icon: "magpie" }];
|
||||
const LONG = "claude-opus-5-5 · Microsoft Foundry";
|
||||
// A list's words name its models only while one or two are ticked; more read
|
||||
// "Showing x / N models", all of them "All N models" (menuSaid, 6915c8cde).
|
||||
// So each list here has two of its models ticked, to be said by name.
|
||||
const AGENTS = [
|
||||
// the reporter's row, as /api/state had it
|
||||
// the reporter's row: their two models, as menuSaid words them now
|
||||
{ id: "workbuddy", name: "WorkBuddy", icon: "workbuddy-color", path: "/fixture/models.json", wired: true, menu: true,
|
||||
models: { shown: 3, total: 3, names: ["gpt-6.1-sol · Microsoft Foundry", LONG] },
|
||||
models: { shown: 2, listed: 3, names: ["gpt-6.1-sol · Microsoft Foundry", LONG] },
|
||||
fields: [{ key: "provider", label: "provider", value: "magpie", options: magpie }] },
|
||||
// another agent whose own menu lists the models, a longer name
|
||||
{ id: "claude-desktop", name: "Claude Desktop", path: "/fixture/claude-desktop.json", wired: true, menu: true,
|
||||
models: { shown: 5, total: 9, names: [LONG, "gpt-6.1-sol · Microsoft Foundry"] },
|
||||
models: { shown: 2, listed: 9, names: [LONG, "gpt-6.1-sol · Microsoft Foundry"] },
|
||||
fields: [{ key: "provider", label: "provider", value: "magpie", options: magpie }] },
|
||||
// one model, said by a long label, with its logo and effort
|
||||
{ id: "codex", name: "Codex", path: "~/.codex/config.toml",
|
||||
|
||||
Reference in New Issue
Block a user