A cap measured against the canvas needs a yardstick from the canvas, so the check stops carrying a number
game-maker / suite (push) Successful in 11m11s

The height cap used to be a constant 420, and the check wrote that number down.
Since #43 the cap is the canvas minus a tenth at either end, which is 640 on an
800px screen - so CI failed on a picker that is behaving exactly as intended.

The check now reads the budget off the screen and reports rect, budget and
screen height when it trips, so the next change to the margin cannot strand it
again.
This commit is contained in:
admin committed 2026-09-15 11:36:04 +02:00
1 parent 3b039384c4
commit 30090fc48e
1 file changed
+7 -4
+7 -4
View File
@@ -25,15 +25,18 @@ export async function menus(t) {
await sleep(150);
// 11a. A picker with 40+ entries is capped in height and stays fully on screen instead of
// running off the bottom edge.
// running off the bottom edge. The cap is a share of the canvas, not a constant: a tenth is
// left free at either end, so the number to beat is read off the screen rather than written
// down here – 40 rows would be well over a thousand pixels without it.
const parentRow = await json("__gm.inspectorField('Parent')");
await click(parentRow.x, parentRow.y);
const rect = await json('__gm.overlayRect()');
const screenHeight = await json('window.innerHeight');
const budget = screenHeight - Math.round(screenHeight * 0.1) * 2;
check(
'a long parent picker is capped instead of growing with the object count',
rect && rect.h < 420,
JSON.stringify(rect),
'a long parent picker is capped to the canvas budget instead of growing with the object count',
rect && rect.h <= budget,
JSON.stringify({ rect, budget, screenHeight }),
);
check(
'the capped picker stays fully on screen',