Make the desktop smoke test mode-aware

The dev path (J621_DEV_SERVER) has the Vite origin and no /setup screen, so
the expectations now follow the mode instead of reporting false failures.
This commit is contained in:
2026-09-20 17:34:01 -05:00
parent 7c39383655
commit e839c84bf0
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -82,7 +82,8 @@ updates without elevation.
and checks that the bundled SPA loads over `app://j621`: the SPA fallback, an and checks that the bundled SPA loads over `app://j621`: the SPA fallback, an
asset fetch, `localStorage`, OPFS, WebCodecs and the preload bridge. It exits asset fetch, `localStorage`, OPFS, WebCodecs and the preload bridge. It exits
non-zero on failure. With `J621_UPDATE_URL` set it also checks that the feed non-zero on failure. With `J621_UPDATE_URL` set it also checks that the feed
reports the expected version. reports the expected version. Pointing `J621_DEV_SERVER` at the Vite dev
server checks the development path instead of the bundled one.
## Backend CORS ## Backend CORS
+4 -2
View File
@@ -444,12 +444,14 @@ function runSmokeTest(win: BrowserWindow): void {
})()`, true)) as Record<string, unknown>; })()`, true)) as Record<string, unknown>;
const expected: Record<string, unknown> = { const expected: Record<string, unknown> = {
origin: APP_ORIGIN, // In dev the window hosts the Vite dev server, which has no /setup
// screen (the SPA only asks for a backend in production builds).
origin: DEV_SERVER || APP_ORIGIN,
title: "J621", title: "J621",
assetOk: true, assetOk: true,
routeOk: true, routeOk: true,
mounted: true, mounted: true,
setupOk: true, setupOk: !DEV_SERVER,
storageOk: true, storageOk: true,
historyOk: true, historyOk: true,
opfsOk: true, opfsOk: true,