From 6c62aa45d58515ec75c01d668c6834f2c7a65fc7 Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Mon, 28 Sep 2026 17:57:37 +0200 Subject: [PATCH] Pick Crate 57 through the menu search in e2e 57 (#258) CI has been red since f84defb. In the full run the scene holds more than 40 filler objects from module 11. The object menu is height limited and scrolls, and overlayTexts() only returns the visible rows. Aim 57 and Crate 57 sit at the end of the scene and were never visible. - Check None right after opening the menu, it is always the top row. - Type 57 into the search field before looking for Aim 57 and Crate 57 and before clicking Crate 57, like module 7 does with the parent picker. - No product code changes. Tests: - Reproduced with modules 1-11 and 57: the old test fails with the same cut-off list and "nothing to click: Crate 57" as CI. - New test: ALL PASSED - 405 checks, all 5 checks of 57 green. - The full run could not be verified locally. Module 12 fails here because the local server holds leftover uploaded images. It is green in CI. Co-Authored-By: Claude Opus 5.5 --- tools/e2e/57-object-references.mjs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/e2e/57-object-references.mjs b/tools/e2e/57-object-references.mjs index 9b940671..59951517 100644 --- a/tools/e2e/57-object-references.mjs +++ b/tools/e2e/57-object-references.mjs @@ -9,7 +9,7 @@ import { MAKE_OBJECT } from './lib/scaffold.mjs'; export async function objectReferences(t) { - const { check, json, evaluate, mutate, click, press, sleep, shot, select, undo, stop } = t; + const { check, json, evaluate, mutate, click, press, typeText, sleep, shot, select, undo, stop } = t; const press_ = async (at, what) => { if (!at) throw new Error(`nothing to click: ${what}`); await click(at.x, at.y); @@ -73,11 +73,15 @@ export async function objectReferences(t) { await sleep(200); await press_(await json("__gm.inspectorField('target')"), 'the target field'); const offered = (await json('__gm.overlayTexts()')) ?? []; + // In the full suite the scene holds more objects than the menu shows at once, so the two new ones + // at its end are only reached through the search box. + await typeText('57'); + const found = (await json('__gm.overlayTexts()')) ?? []; await shot('01-menu'); check( 'the placed object offers None, itself and the other objects of the scene', - ['None', 'Aim 57', 'Crate 57'].every((label) => offered.includes(label)), - JSON.stringify(offered), + offered.includes('None') && ['Aim 57', 'Crate 57'].every((label) => found.includes(label)), + JSON.stringify({ offered, found }), ); await press_(await json("__gm.locate('Crate 57', true)"), 'Crate 57 in the menu'); const picked = await target();