mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +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 { whenPickable, whenSettled } from './qa/ready.mjs';
|
||||
import { fromDegrees } from '../src/geo/cartesian3.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
@@ -94,6 +95,11 @@ await strict.run({}, async (b) => {
|
||||
},
|
||||
fromDegrees(record.lon, record.lat),
|
||||
);
|
||||
await whenPickable(
|
||||
p,
|
||||
screen,
|
||||
(picked) => picked?.id === 'local-datacenters:342664739',
|
||||
);
|
||||
await p.mouse.click(screen.x, screen.y);
|
||||
await p.waitForFunction(
|
||||
() => window.qaSelections.at(-1) === 'local-datacenters:342664739',
|
||||
@@ -119,6 +125,11 @@ await strict.run({}, async (b) => {
|
||||
},
|
||||
fromDegrees(dam.lon, dam.lat),
|
||||
);
|
||||
await whenPickable(
|
||||
p,
|
||||
screen,
|
||||
(picked) => picked?.id === 'local-dams:-12841971',
|
||||
);
|
||||
await p.mouse.click(screen.x, screen.y);
|
||||
await p
|
||||
.waitForFunction(
|
||||
@@ -160,7 +171,7 @@ await strict.run({}, async (b) => {
|
||||
});
|
||||
render.request('qa-home');
|
||||
}, start);
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||
await whenSettled(p);
|
||||
};
|
||||
const counts = { ...reads };
|
||||
for (const kind of ['navara', 'cesium', 'navara']) {
|
||||
@@ -174,7 +185,7 @@ await strict.run({}, async (b) => {
|
||||
{ timeout: 15000 },
|
||||
);
|
||||
}
|
||||
await new Promise((r) => setTimeout(r, 1500));
|
||||
await whenSettled(p);
|
||||
const result = await p.evaluate(
|
||||
(ids) =>
|
||||
ids.map((id, i) => {
|
||||
|
||||
Reference in new issue
Block a user