gui tests: library-problems-hide and panel-open-once load with a minute's room

nav-timeout (#4470) holds every page given a short default timeout to a
navigation timeout of at least a minute. Two files broke it on main:
c0dd5838c (#3745, the coffemon batch in v0.1.2855) gave
library-problems-hide 20s, and 7033f5072 gave panel-open-once an 8s
default with no navigation timeout. Both now get 60000.

Found by the whole GUI suite run at 6cfe78635 after the tag (the batch's
pre-push GUI run covered library-* and i18n-keys, not nav-timeout).

Run, mote, Playwright 1.62.0, at this tree on origin/main 2741b749f:
- node --test nav-timeout, library-problems-hide, panel-open-once:
  53 of 53 pass. Before the change nav-timeout was red at origin/main
  listing both files (library-problems-hide alone at 6cfe78635).
This commit is contained in:
yetone
2026-11-04 09:49:07 +08:00
parent 2741b749f9
commit 6d1e3f1e29
2 changed files with 2 additions and 1 deletions
@@ -129,7 +129,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await ctx.addInitScript((tab) => { try { localStorage.setItem("magpie.libTab", tab); } catch {} }, tab);
const page = await ctx.newPage();
page.setDefaultTimeout(5000);
page.setDefaultNavigationTimeout(20000); // the page's first load, slow on a busy machine
page.setDefaultNavigationTimeout(60000); // the page's first load, slow on a busy machine (#4470)
page.on("pageerror", (e) => errors.push(e.message));
// s01 is given to Grok Build too, which its skills folder may refuse
const st = { last: structuredClone(problems), fails: fails || (() => structuredClone(problems)), reads: 0, syncs: 0, set: "default", agents: Object.fromEntries(names.map((n) => [n, n === "s01" ? ["claude", "codex", "grok"] : ["claude", "codex"]])) };
@@ -56,6 +56,7 @@ async function open(engine, lang, platform, t) {
t.after(() => browser.close());
const page = await (await browser.newContext({ viewport: { width: 360, height: 520 }, reducedMotion: "reduce" })).newPage();
page.setDefaultTimeout(8000);
page.setDefaultNavigationTimeout(60000); // the first load, slow on a busy machine (#4470)
const errors = [];
page.on("pageerror", (e) => errors.push(e.message));
if (platform) await page.addInitScript((p) => Object.defineProperty(Navigator.prototype, "platform", { get: () => p }), platform);