From 91a2f603cd0c4b29f86b3626dba3541d80b6631d Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 29 Oct 2026 07:51:58 +0800 Subject: [PATCH] gui tests: list-sort reads the Library's servers without the MCP hub's row (#2679) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit e0ea15b8e put the MCP hub's row (.lib-hublist) under the Library's server list. list-sort's serverNames read every .lib-list's rows, so it got "MCP hub" / "MCP 聚合" after the three servers and was red in both engines and both languages (6 of 6) since then, on mote and on the Linux box. Found by the whole GUI suite run for 85d159a28. The hub row is no server and isn't sorted, so the selector leaves .lib-hublist out. Run: node --test list-sort on mote (chromium + webkit, en + zh): 6/6; the same on WSL magpie-desktop: 6/6. Red on the old selector: 6/6 on WSL at fa2dfc145. No other GUI test reads .lib-list rows that way (grep). The rest of that suite's reds are already filed and red before 85d159a28 too (same files at fa2dfc145 on mote and Linux): gateway-key-models #4081, routing-* #4121 #3789 #3799, rest-try-now #4127, key-replace #4126, mobile-web #3952, search-first #3795. --- internal/gui/tests/list-sort.test.cjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/gui/tests/list-sort.test.cjs b/internal/gui/tests/list-sort.test.cjs index b5b4c1ee5..0e9345379 100644 --- a/internal/gui/tests/list-sort.test.cjs +++ b/internal/gui/tests/list-sort.test.cjs @@ -94,7 +94,8 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", const tips = (sort) => page.locator(`.segs.sortby[data-sort="${sort}"] .opt`).evaluateAll((os) => os.map((o) => o.title)); // the Library's MCP servers: A→Z first, whatever order magpie gave them in - const serverNames = () => names("#view-library .lib-list .lib-row > .who > .name"); + // (the MCP hub's row below them is no server, and isn't sorted) + const serverNames = () => names("#view-library .lib-list:not(.lib-hublist) .lib-row > .who > .name"); const openLib = async () => { await page.goto("http://magpie.test/"); await page.locator('button[data-view="library"]').click();