Scroll the image tile into view before clicking it in e2e 12
The image picker scrolls once the texture store holds more images than fit into the dialog. The hook imagePickerTile still reports the tile position then, so the click in module 12 landed outside the visible list and picked nothing. Locally spare.png sat at place 27 of 32, and the full run broke off in module 12 with "Texture not found". - FilePicker exposes its scroll area as listView. - The new test hook __gm.imagePickerRect() returns that area. - Both tile clicks in module 12 wheel the tile into view first with the existing inView helper, as modules 41 and 43 do. The editor behaves the same. Only the hook is new. The texture store is shared with real projects, so the seed does not clean it up. Tests: - ./check.sh: 188 files, 2746 tests, CHECK EXIT 0 - GM_STEPS=10,12: ALL PASSED, 58 checks - Full local run: ALL PASSED, 1535 checks - Counter-check: the old module 12 against the same bundle gives 6 FAILED (selected: null, then "Texture not found") Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e03a3dce97
commit
d2701b3ec5
3 files changed
+16
-2
No files matched your search
@@ -283,6 +283,10 @@ export function uiHooks({ app, state, editor }: HookContext) {
|
||||
/** The open image picker: what it offers, what is picked, and where a tile sits. */
|
||||
imagePicker: () => currentImagePicker()?.debugInfo() ?? null,
|
||||
imagePickerTile: (file: string) => currentImagePicker()?.tileGlobal(file) ?? null,
|
||||
imagePickerRect: () => {
|
||||
const picker = currentImagePicker();
|
||||
return picker ? rectOf(picker.listView) : null;
|
||||
},
|
||||
/** The same for the font picker, whose rows are the preview. */
|
||||
fontPicker: () => currentFontPicker()?.debugInfo() ?? null,
|
||||
fontPickerRow: (file: string) => currentFontPicker()?.rowGlobal(file) ?? null,
|
||||
|
||||
Reference in new issue
Block a user