From b2b72ea026fde11516b48831e9173278a7d2c35c Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 6 Oct 2026 14:25:14 +0800 Subject: [PATCH] =?UTF-8?q?menu-scroll=20test:=20its=20fixture=20answers?= =?UTF-8?q?=20/api/upstream=20=E2=80=94=20the=20test=20failed=2024/24=20on?= =?UTF-8?q?=20main=20(Chromium=20and=20WebKit,=20every=20case=20"Target=20?= =?UTF-8?q?page,=20context=20or=20browser=20has=20been=20closed")=20since?= =?UTF-8?q?=202a990175=20(#971),=20which=20has=20the=20Usage=20and=20Provi?= =?UTF-8?q?ders=20pages=20ask=20/api/upstream=20for=20the=20vendors'=20sta?= =?UTF-8?q?tus=20pages.=20menu-scroll's=20route=20handler=20asserts=20on?= =?UTF-8?q?=20any=20API=20it=20doesn't=20serve;=20that=20assertion=20("Une?= =?UTF-8?q?xpected=20API:=20/api/upstream")=20was=20an=20unhandled=20rejec?= =?UTF-8?q?tion,=20which=20ended=20the=20test,=20and=20its=20after=20hook?= =?UTF-8?q?=20closed=20the=20browser=20under=20the=20first=20gesture,=20so?= =?UTF-8?q?=20every=20later=20case=20failed=20on=20page.goto.=20The=20fixt?= =?UTF-8?q?ure=20now=20answers=20it=20with=20no=20vendor=20readings,=20as?= =?UTF-8?q?=20a=20page=20that=20couldn't=20be=20read=20marks=20nothing.=20?= =?UTF-8?q?No=20other=20GUI=20test=20throws=20on=20an=20unknown=20API=20wi?= =?UTF-8?q?thout=20serving=20/api/upstream.=20No=20app=20change.=20menu-sc?= =?UTF-8?q?roll=20passes=2024/24=20three=20runs=20in=20a=20row=20(it=20fai?= =?UTF-8?q?ls=2012/12=20Chromium=20at=202a990175=20and=20passes=2012/12=20?= =?UTF-8?q?at=20its=20parent=2062f9612b);=20click-scroll=20passes=2018/18.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/gui/tests/menu-scroll.test.cjs | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/gui/tests/menu-scroll.test.cjs b/internal/gui/tests/menu-scroll.test.cjs index 621cc239..3769f014 100644 --- a/internal/gui/tests/menu-scroll.test.cjs +++ b/internal/gui/tests/menu-scroll.test.cjs @@ -41,6 +41,7 @@ async function serve(route) { if (url.pathname === "/api/plugins/updates") return json({ waiting: [] }); 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: {} }); assert(!url.pathname.startsWith("/api/"), "Unexpected API: " + url.pathname); const file = path.join(assets, url.pathname === "/" ? "index.html" : url.pathname); const contentType = { ".html": "text/html", ".js": "text/javascript", ".css": "text/css", ".svg": "image/svg+xml", ".png": "image/png" }[path.extname(file)];