From 4e2e0d69001c1d63d48240153a51c2dc3f7a0bdb Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Mon, 19 Oct 2026 20:22:48 +0400 Subject: [PATCH] test(street-level): the gate waits for image cones to become pickable On CI's SwiftShader the ground-clamped cones take a few frames after a sequence is selected; a single pick search found none. Co-Authored-By: Claude Opus 5.5 --- scripts/qa-street-level.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/qa-street-level.mjs b/scripts/qa-street-level.mjs index c44deeb39..d099ed9b5 100644 --- a/scripts/qa-street-level.mjs +++ b/scripts/qa-street-level.mjs @@ -356,11 +356,11 @@ const findPick = (page, prefix, { box = null, step = 3 } = {}) => async function findPickUntil( page, prefix, - { timeout = 30_000, box = null } = {}, + { timeout = 30_000, box = null, step } = {}, ) { const deadline = Date.now() + timeout; for (;;) { - const hit = await findPick(page, prefix, { box }); + const hit = await findPick(page, prefix, { box, step }); if (hit || Date.now() >= deadline) return hit; await new Promise((resolve) => setTimeout(resolve, 500)); } @@ -607,7 +607,9 @@ async function main() { page, (u) => u.sequence.selectedId && !u.sequence.loading, ); - const cone = await findPick(page, 'mly:img:', { + // Cones clamp to the ground: on a slow GPU (CI's SwiftShader) they + // can take a few frames after the selection to become pickable. + const cone = await findPickUntil(page, 'mly:img:', { box: { x: Math.max(0, line.local.x - 150), y: Math.max(0, line.local.y - 150),