mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Restore the conditions eight converted QA scripts were waiting for
The harness conversion replaced pauses that stood in for real conditions with camera readiness: the cables and infrastructure idle checks started measuring while the overlay was still fading in after moveEnd, directions sampled before its maneuver dots had ground cells, three scripts clicked before the loading cover was gone, the credits check hit-tested during UI transitions, and the oblique traffic flight lost its height cap. Each now waits for its condition; idle checks observe without requesting frames and record the reasons of the frames they count; readiness waits for the startup cover and no longer requests frames while polling.
This commit is contained in:
1 parent
2c62e1e378
commit
b5cc4feacb
11 files changed
+480
-51
No files matched your search
@@ -27,6 +27,7 @@ import { evaluateWithGeo } from './qa/geometry.mjs';
|
||||
* FAIL. Commits nothing.
|
||||
*/
|
||||
import { whenSettled } from './qa/ready.mjs';
|
||||
import { measureIdleRender } from './qa/idle.mjs';
|
||||
import { launchBrowser, closeBrowser } from './qa/browser.mjs';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
@@ -297,27 +298,7 @@ try {
|
||||
|
||||
// ── parked-idle honesty: the LOD walk must not force continuous render ─
|
||||
await whenSettled(page);
|
||||
const idle = await page.evaluate(async () => {
|
||||
// The debug handle's own governor read (no /src import: runs on a build).
|
||||
const { getRenderGovernorDiagnostics } = window.__godsEyeView;
|
||||
return new Promise((resolve) => {
|
||||
const startedAt = Date.now();
|
||||
const tilesLoadedBefore = window.__godsEyeView.engine.surface.tilesLoaded();
|
||||
let renders = 0;
|
||||
let framesWithPendingTiles = 0;
|
||||
const remove = window.__godsEyeView.engine.frames.postRender.addEventListener(() => {
|
||||
renders += 1;
|
||||
if (!window.__godsEyeView.engine.surface.tilesLoaded()) framesWithPendingTiles += 1;
|
||||
});
|
||||
setTimeout(() => {
|
||||
remove();
|
||||
const governor = getRenderGovernorDiagnostics();
|
||||
resolve({ renders, tilesLoadedBefore, tilesLoadedAfter: window.__godsEyeView.engine.surface.tilesLoaded(),
|
||||
framesWithPendingTiles, mode: governor.mode, holds: governor.holds,
|
||||
requests: governor.recentRequests.filter(request => request.at >= startedAt) });
|
||||
}, 5_000);
|
||||
});
|
||||
});
|
||||
const idle = await measureIdleRender(page);
|
||||
report(CONTROL
|
||||
? 'parked idle, control (postRender fires / 5s)'
|
||||
: 'parked idle with infra ON (postRender fires / 5s)', idle);
|
||||
|
||||
Reference in new issue
Block a user