gui tests: menu-scroll's fixture answers /api/plugin-pages
menu-scroll has been failing 24 of 24 on main since64b0f3a20(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 onb6533893a: 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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user