From 898c314b7922c3cda2571f5951e60494e0cc529f Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 3 Nov 2026 02:08:01 +0800 Subject: [PATCH] gui tests: old-webkit knows profilerename.js is loaded on Rename 1cb4d4301 (#2721) loads profilerename.js when a saved profile's Rename is pressed (app.js's rename.onclick imports it), but old-webkit's "compat.js is the first of the page's own scripts" lists every script index.html doesn't load, and profilerename.js wasn't in the list. So the test was red on origin/main since 1cb4d4301: "profilerename.js is not loaded by index.html". It is now in the lazy list, with a line in the comment. Run on mote at this head: node --test old-webkit.test.cjs, all ok (red before, with exactly that message, in the whole GUI suite at 5f0a84a00+#1090 and alone at a3768cdd1). Not tried: nothing else changes; the check still reads the script's syntax and built-ins with the other lazy scripts. --- internal/gui/tests/old-webkit.test.cjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/gui/tests/old-webkit.test.cjs b/internal/gui/tests/old-webkit.test.cjs index d81d1343f..02446b21b 100644 --- a/internal/gui/tests/old-webkit.test.cjs +++ b/internal/gui/tests/old-webkit.test.cjs @@ -153,9 +153,10 @@ test("compat.js is the first of the page's own scripts", async () => { // Use is pressed, quotaall.js when a provider has two accounts, // quitask.js when a Quit asks first, checkinnow.js when Settings' Check // in now for one account is pressed, autobackup.js when Settings draws - // Sync, scrollends.js on the window's first scroll; the checks above + // Sync, scrollends.js on the window's first scroll, profilerename.js + // when a saved profile's Rename is pressed; the checks above // still read them - for (const f of await scripts()) if (!["webfonts.js", "cfgblocked.js", "signsheets.js", "ruleedit.js", "ratewindows.js", "traywindows.js", "autoresetown.js", "registry.js", "navlamp.js", "whatsnew.js", "claudemode.js", "ctxtext.js", "resetask.js", "quotaall.js", "quitask.js", "checkinnow.js", "autobackup.js", "scrollends.js"].includes(f)) assert(all.includes(f), f + " is not loaded by index.html"); + for (const f of await scripts()) if (!["webfonts.js", "cfgblocked.js", "signsheets.js", "ruleedit.js", "ratewindows.js", "traywindows.js", "autoresetown.js", "registry.js", "navlamp.js", "whatsnew.js", "claudemode.js", "ctxtext.js", "resetask.js", "quotaall.js", "quitask.js", "checkinnow.js", "autobackup.js", "scrollends.js", "profilerename.js"].includes(f)) assert(all.includes(f), f + " is not loaded by index.html"); }); test("the styles hold up in Safari 15.0", async () => {