The two test files from the #3193 and #2591 patches (landed in v0.1.2583) set a 5s default timeout on their pages and no navigation timeout of their own. Their page.goto calls therefore had a 5s limit, and nav-timeout.test.cjs failed on main with three entries: balance-quota-left's page and panel, and sessions-cache-tokens' page. Each page now gets setDefaultNavigationTimeout(60000), as #4470 asked. Run on the test Mac at this change on77e853588: nav-timeout, balance-quota-left, sessions-cache-tokens and sessions-overview are ok in both engines and every language. nav-timeout was red at768228a4fwith the three entries above. quota-curve's chromium en and zh are red at this head too; whether the same happens before the batch is being checked separately.
This commit is contained in:
@@ -81,6 +81,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
// the Usage page: every balance row
|
||||
const page = await (await browser.newContext({ viewport: { width: 900, height: 800 }, reducedMotion: "reduce" })).newPage();
|
||||
page.setDefaultTimeout(5000);
|
||||
page.setDefaultNavigationTimeout(60000);
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
await page.route("**/*", serve(lang, left));
|
||||
await page.goto("http://magpie.test/?view=usage&tab=usage");
|
||||
@@ -100,6 +101,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
await context.addInitScript(() => { try { localStorage.setItem("magpie.panelTab", "usage"); } catch {} });
|
||||
const panel = await context.newPage();
|
||||
panel.setDefaultTimeout(5000);
|
||||
panel.setDefaultNavigationTimeout(60000);
|
||||
panel.on("pageerror", (e) => errors.push(e.message));
|
||||
await panel.route("**/*", serve(lang, left));
|
||||
await panel.goto("http://magpie.test/?mode=panel");
|
||||
|
||||
@@ -96,6 +96,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
const context = await browser.newContext({ viewport: { width: 1100, height: 760 }, reducedMotion: "reduce", timezoneId: "Asia/Shanghai" });
|
||||
const page = await context.newPage();
|
||||
page.setDefaultTimeout(5000);
|
||||
page.setDefaultNavigationTimeout(60000);
|
||||
const errors = [];
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
await page.route("**/*", serve(lang));
|
||||
|
||||
Reference in New Issue
Block a user