Skip to content

fix(e2e): harden virtualized-grid card waits (env maps + texture set viewer)#517

Merged
Papyszoo merged 2 commits into
mainfrom
fix/e2e-env-map-thumbnail-virtual-scroll
Jun 3, 2026
Merged

fix(e2e): harden virtualized-grid card waits (env maps + texture set viewer)#517
Papyszoo merged 2 commits into
mainfrom
fix/e2e-env-map-thumbnail-virtual-scroll

Conversation

@Papyszoo
Copy link
Copy Markdown
Owner

@Papyszoo Papyszoo commented Jun 3, 2026

Summary

Two related e2e flake fixes for asset lists rendered as virtualised VirtuosoGrids, where a target card can sit off-screen / unmounted and a plain toBeVisible() wait can't recover (nothing scrolls it back into the DOM).

  1. Env-map thumbnail waitwaitForCardThumbnailLoaded now first materialises the card via waitForEnvironmentMapByName (which progressively scrolls + reloads past stale React Query cache) and scrolls the image into view before asserting. Reuses the existing pattern from openEnvironmentMapByName.

  2. Texture-set viewer open — the shared I open the texture set viewer for {string} step relied on narrowVirtualisedList, whose count-chip wait can return on a pre-filter "stable" read before the search debounce fires, leaving the card virtualised off-screen. It now re-narrows + scrolls the card into view in a poll until it materialises. This is what was intermittently failing CI on 00-texture-sets/17-tiff-preview.feature with "element(s) not found".

Context

These are the e2e-hardening remnants of #494; the duplicate-name policy that #494 originally carried has since landed on main via #488, so #494 can be closed as superseded.

Test plan

  • CI green on the e2e suite (env-map thumbnail + TIFF/EXR preview scenarios)

Papyszoo added 2 commits June 3, 2026 11:29
waitForCardThumbnailLoaded asserted the card's <img> was visible without
first materialising it. The env-map list is a virtualised VirtuosoGrid, so
a target card scrolled out of the virtual window isn't in the DOM and the
assertion races with re-renders, flaking intermittently.

Wait for the entry by name (which scrolls it into the DOM and reloads past
stale React Query cache), then scroll the image into view before asserting.
The shared "I open the texture set viewer for {string}" step narrowed the
virtualised grid then asserted the card visible. narrowVirtualisedList waits
on the count chip, which can momentarily read "stable" at its pre-filter
value before the search debounce fires — leaving the target card rendered
off-screen in the VirtuosoGrid, where a plain visibility wait can't recover
(nothing scrolls it back into the DOM). This intermittently failed the TIFF
preview scenarios with "element(s) not found".

Re-narrow + scroll the card into view in a poll until it materialises, so a
single stale count read can't fail the step.
@Papyszoo Papyszoo changed the title fix(e2e): harden env map thumbnail wait against virtual scrolling fix(e2e): harden virtualized-grid card waits (env maps + texture set viewer) Jun 3, 2026
@Papyszoo Papyszoo merged commit 9e76ade into main Jun 3, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant