From a61a6f954695e65e7a55dbf4148eb4b2617bd51c Mon Sep 17 00:00:00 2001 From: yetone Date: Fri, 16 Oct 2026 02:01:16 +0800 Subject: [PATCH] gui tests: menu-scroll's fixture answers /api/plugin-pages menu-scroll has been failing 24 of 24 on main since 64b0f3a20 (10-15). That commit has the sidebar ask /api/plugin-pages for community plugins' pages. menu-scroll's route handler asserts on any API it doesn't serve, so it threw "Unexpected API: /api/plugin-pages" and closed the browser under every case. The fixture now answers with an empty list, meaning no plugin pages. This changes the test only, not the app. Run on b6533893a: menu-scroll failed 24 of 24 before the change. After it, the test passed 24 of 24, twice in a row, in chromium and webkit. --- internal/gui/tests/menu-scroll.test.cjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/gui/tests/menu-scroll.test.cjs b/internal/gui/tests/menu-scroll.test.cjs index 051814824..fa999e424 100644 --- a/internal/gui/tests/menu-scroll.test.cjs +++ b/internal/gui/tests/menu-scroll.test.cjs @@ -42,6 +42,8 @@ async function serve(route) { if (url.pathname === "/api/usage/quotas" || url.pathname === "/api/usage/quotas/history" || url.pathname === "/api/agents/install") return json([]); if (url.pathname === "/api/whatsnew") return json({}); if (url.pathname === "/api/upstream") return json({ vendors: [], providers: {} }); + // the sidebar's plugin pages: none + if (url.pathname === "/api/plugin-pages") return json([]); // the sidebar's gateway line, when no page has read the providers if (url.pathname === "/api/providers") return json({ providers: [], gateway: { url: "http://127.0.0.1:3425", running: true } }); assert(!url.pathname.startsWith("/api/"), "Unexpected API: " + url.pathname);