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();