Give QA scripts one launch, readiness and geometry helper

scripts/qa/browser.mjs launches headless Chrome with QA_ANGLE and the
shared Chrome lookup; scripts/qa/ready.mjs adds frame, tile and transition
readiness and bounded polling; scripts/qa/geometry.mjs hands page
evaluations the engine-neutral geometry without dev-only source URLs.
CODE-BOUNDARIES gains the rule for new QA scripts.
This commit is contained in:
German Khokhlov committed 2026-11-10 16:43:58 +04:00
1 parent 37263a3e2b
commit 731eadc34a
7 files changed
+305

No files matched your search

+15
View File
@@ -1,4 +1,19 @@
import { processTree, readProcesses } from './process.mjs';
import puppeteer from 'puppeteer';
import { chromeExecutablePath } from '../qa-chrome.mjs';
/** Keep every scenario on the same headless GPU path. */
export function launchBrowser({ args = [], ...options } = {}) {
return puppeteer.launch({
executablePath: chromeExecutablePath(),
...options,
headless: true,
args: [
`--use-angle=${process.env.QA_ANGLE || 'metal'}`,
'--enable-gpu',
...args,
],
});
}
/** Bound shutdown even when Chrome leaves descendants holding its pipes. */
export async function closeBrowser(browser, { deadlineMs = 5000 } = {}) {