mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 00:02:25 +00:00
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:
1 parent
9c2a2d6951
commit
60f9de8511
47 files changed
+1788
-312
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { whenSettled } from './qa/ready.mjs';
|
||||
import { fromDegrees } from '../src/geo/cartesian3.js';
|
||||
import sharp from 'sharp';
|
||||
import assert from 'node:assert/strict';
|
||||
@@ -52,7 +53,7 @@ await strict.run({}, async (b) => {
|
||||
assert.equal(stats.count, 1);
|
||||
assert.equal(params.presentation, 'bhote-koshi-path-overview');
|
||||
// Look for the cyan river in a scene crop away from the UI rails.
|
||||
await new Promise((r) => setTimeout(r, 1000));
|
||||
await whenSettled(p);
|
||||
const crop = async () =>
|
||||
sharp(await p.screenshot())
|
||||
.extract({ left: 400, top: 320, width: 230, height: 180 })
|
||||
@@ -63,7 +64,7 @@ await strict.run({}, async (b) => {
|
||||
await p.evaluate(() =>
|
||||
window.qaLocator.setParams({ presentation: 'nepal-context' }),
|
||||
);
|
||||
await new Promise((resolve) => setTimeout(resolve, 500));
|
||||
await whenSettled(p);
|
||||
const baseline = await crop();
|
||||
let added = 0;
|
||||
for (let i = 0; i < rendered.length; i += 3) {
|
||||
@@ -103,7 +104,7 @@ await strict.run({}, async (b) => {
|
||||
preview: true,
|
||||
});
|
||||
});
|
||||
await new Promise((resolve) => setTimeout(resolve, 2500));
|
||||
await whenSettled(p);
|
||||
// The last of three quick presentation changes is the one that stays.
|
||||
const last = await p.evaluate(() => ({
|
||||
params: window.qaLocator.getParams(),
|
||||
|
||||
Reference in new issue
Block a user