Scroll the + menu to Vector art before picking it in e2e 47
game-maker / gate (push) Successful in 3m0s
game-maker / suite (push) Successful in 15m57s

The suite to 7dd3ae1 (#154) was red in e2e 47 and stopped there.
With the Joint the + menu has 25 entries and scrolls on a canvas
800 high. Vector art is its last entry and stood below the box, so
the check found no row to click and the module threw.

- The module scrolls the menu to the entry first, the way e2e 04
  does since #154, and picks it inside the menu's box as before.
- Nothing in src/ changes.

e2e 47 was not part of the modules run for #154, and the suite to
that commit was not waited for. The modules after 47 had not run in
CI since then.

Tests:
- Full suite on melektaus-atx: 1692 checks, all pass, the check in
  e2e 47 among them. One of the 1692 belongs to the kept panel
  sizes, which were in the working tree and are not committed yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-10-02 23:15:22 +02:00
1 parent 4407c02078
commit 8f9d373d7b
1 file changed
+13 -1
+13 -1
View File
@@ -1,6 +1,6 @@
import { colourDistance } from '../lib/harness.mjs';
import { FIND_HALVES, HALVES_LEFT, HALVES_RIGHT, PASTE_HALVES } from './lib/pictures.mjs';
import { LANES, MAKE_OBJECT } from './lib/scaffold.mjs';
import { inView, LANES, MAKE_OBJECT } from './lib/scaffold.mjs';
/**
* Vector art (#129), stages 2 and 3: the drawing is rasterised and travels the picture path of #185. What
@@ -574,9 +574,21 @@ export async function vectorArt(t) {
) ?? null
);
};
// The same as a hook expression, for a row the menu has to be scrolled to: the lowest hit between
// the box's sides, which is the entry and not the tab above it.
const menuRow = (text) => `(() => {
const box = __gm.overlayRect();
const hits = (__gm.locateAll(${JSON.stringify(text)}) ?? []).filter(
(hit) => hit.x >= box.x && hit.x <= box.x + box.w && hit.y >= box.y,
);
return hits.sort((a, b) => a.y - b.y).at(-1) ?? null;
})()`;
// Vector art is the last of the 25 entries the menu has since the Joint (#154); on a canvas 800
// high the menu scrolls, and that one is scrolled to.
await clickText('+');
const plusRows = (await json('__gm.menuRows()')) ?? [];
await inView(t, '__gm.overlayRect()', menuRow('Vector art'));
const entry = await inOverlay('Vector art');
check(
'the + menu offers Vector art among the types that only live in the library',