Texture fill e2e checks pick the right image in a full run (#186)
CI run 217 for 592ea94 failed three checks in block 47i. In the full
run the texture list is longer than in a single module run, so the
picker click missed "halves" and the texture stayed empty.
- The check now types "halves" into the menu search field and picks
it with Enter, independent of the list length.
- FIND_HALVES looks the image up by name. Matching only by size had
picked the 32 px image "wedge" in the full run.
- The texture fill check forces a redraw before reading pixels. After
the work of earlier modules the vector tab does not redraw once the
texture has loaded. That bug is tracked in #196, and the forced
redraw goes away with it.
Tests:
- ./check.sh: CHECK EXIT 0
- npm run build: BUILD EXIT 0
- GM_STEPS=47 (fresh seed): ALL PASSED, 54 checks
- Full run not repeated locally. CI decides.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
592ea942d9
commit
1c8a20fcac
2 files changed
+23
-7
No files matched your search
@@ -14,6 +14,10 @@ export const PASTE_HALVES = `(async () => {
|
||||
export const HALVES_LEFT = '#e63c3c';
|
||||
export const HALVES_RIGHT = '#3cc85a';
|
||||
|
||||
/** The pasted picture's asset, once the paste has landed. */
|
||||
/**
|
||||
* The pasted picture's asset, once the paste has landed: the newest one named after the pasted
|
||||
* file. Size alone is not enough – in the full run a module before 47 leaves a 32 px "wedge"
|
||||
* behind, and taking the first 32 px texture picked that one (CI task 217).
|
||||
*/
|
||||
export const FIND_HALVES =
|
||||
"__gm.state.project.assets.filter((a) => a.type === 'texture' && a.width === 32 && a.height === 32).map((a) => ({ id: a.id, file: a.file }))[0] ?? null";
|
||||
"__gm.state.project.assets.filter((a) => a.type === 'texture' && a.name === 'halves' && a.width === 32 && a.height === 32).map((a) => ({ id: a.id, file: a.file })).at(-1) ?? null";
|
||||
Reference in new issue
Block a user