Wait for the application, not the clock, in the strict QA set

The probe exposes settled() and the first-frame outcome; scripts/qa/ready.mjs
waits for drawn frames with the camera at rest and for a pick at the click
position, with a deadline and its reason in the error. The strict scenarios
use these instead of fixed pauses and loading-screen polling, and the
hidden-switch scenario checks how the loading screen was lifted instead of
how long it took.

Each switch scenario now records a draw ledger per engine and runs a
contract monitor; both write to the scenario's evidence file only, with an
empty allowlist until browser runs show what differs on purpose.
This commit is contained in:
German Khokhlov committed 2026-11-10 15:46:26 +04:00
1 parent 9c2a2d6951
commit 60f9de8511
47 files changed
+1788 -312

No files matched your search

@@ -1,3 +1,4 @@
import { whenPickable, whenSettled } from './qa/ready.mjs';
import { fromDegrees } from '../src/geo/cartesian3.js';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
@@ -90,7 +91,7 @@ await strict.run({}, async (b) => {
},
fromDegrees(10.7995, 55.3241, 25000),
);
await new Promise((resolve) => setTimeout(resolve, 2500));
await whenSettled(p);
const screen = await p.evaluate(
(world) => {
const { engine } = window.__godsEyeView;
@@ -100,6 +101,9 @@ await strict.run({}, async (b) => {
},
fromDegrees(10.799480647390464, 55.324102015186114),
);
await whenPickable(p, screen, (picked) =>
picked?.id?.startsWith('landing-point-reference-'),
);
await p.mouse.click(screen.x, screen.y);
await p.waitForFunction(
() => {