Actor smoke: measure the stop with two samples after key-up, not against a pre-screenshot probe
game-maker / suite (push) Successful in 8m51s

The check compared the position after key-up with a sample taken before
shot(); the player keeps walking during the screenshot, so the check
measured screenshot duration on the runner (22/30/40 px on CI runs 11-13)
and failed at exactly 40.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Fable 5.1 committed 2026-09-13 12:32:34 +02:00
1 parent ccc6dc5b6e
commit 3e99480b55
1 file changed
+7 -3
+7 -3
View File
@@ -104,20 +104,24 @@ await runChecks({ projectId, baseUrl, port: 9341, shotPrefix: 'gm-actor' }, asyn
// 5. Walking right, and stopping on the standing frame of the way he faces.
await keyDown('d');
await sleep(400);
const walking = await entity('oplayer');
await shot('03-walk-right');
const walking = await entity('oplayer');
await keyUp('d');
await sleep(250);
const stopped = await entity('oplayer');
await sleep(150);
const still = await entity('oplayer');
check(
'holding D walks right and plays the right walk animation',
walking.x > 30 && walking.props.texture === 'walk-right',
JSON.stringify({ x: Math.round(walking.x), texture: walking.props.texture }),
);
// Two samples after the release: he must not move between them. Comparing against the walking
// sample measured how long the screenshot took (22 to 40 px on the CI runner), not the stop.
check(
'letting go stops him on the standing frame of the way he faces',
stopped.props.texture === IDLE.right && Math.abs(stopped.x - walking.x) < 40,
JSON.stringify({ x: Math.round(stopped.x), texture: stopped.props.texture }),
stopped.props.texture === IDLE.right && Math.abs(still.x - stopped.x) < 1 && stopped.x > walking.x - 1,
JSON.stringify({ x: Math.round(stopped.x), later: Math.round(still.x), texture: stopped.props.texture }),
);
// 6. Walking up is −y.