fix(qa): don't pass the macOS-only Metal ANGLE backend on other platforms

Six QA harnesses launched Chrome with `--use-angle=metal` unconditionally
(or defaulted to it). Metal is a macOS-only ANGLE backend: on Windows and
Linux it makes WebGL initialization fail outright, so CesiumWidget never
constructs, the app never boots, and the harness dies at its
`waitForFunction` boot wait — before running a single assertion:

    Error constructing CesiumWidget.
    RuntimeError: The browser supports WebGL, but initialization failed.
    TimeoutError: Waiting failed: 60000ms exceeded

Affected: qa-map-source-tray, qa-cockpit-utility, qa-view-target-prewarm,
qa-firstrun (unconditional), qa-cockpit-plates (GPU branch taken off-Mac
too) and qa-floor-hold (`--angle` defaulted to metal everywhere).

Fixed by adopting the platform check qa-flyroute-cinema.mjs already uses:
real GPU via Metal on darwin, the portable swiftshader rasterizer
elsewhere — which is what the other ~20 QA scripts already pass. No
behavior change on macOS.

Verified on Windows 11: `npm run qa:map-source-tray` went from 0
assertions (boot timeout) to all 20 checks running.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C3eGYgDYBo2BCUeDGwGvrp
This commit is contained in:
Tom-NeverwinterandClaude Opus 5 committed 2026-09-10 15:24:57 -05:00
1 parent 6c49c2aa22
commit ea344c952f
6 files changed
+32 -6

No files matched your search

+3 -1
View File
@@ -222,7 +222,9 @@ async function main() {
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
...(SWIFTSHADER
// Metal is a macOS-only ANGLE backend; off-Mac the GPU branch has to fall
// back to the software rasterizer or WebGL init fails outright.
...(SWIFTSHADER || process.platform !== 'darwin'
? ['--use-gl=angle', '--use-angle=swiftshader']
: ['--use-angle=metal', '--enable-gpu', '--ignore-gpu-blocklist']),
'--disable-dev-shm-usage',