fix(e2e): harden virtualized-grid card waits (env maps + texture set viewer)#517
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related e2e flake fixes for asset lists rendered as virtualised
VirtuosoGrids, where a target card can sit off-screen / unmounted and a plaintoBeVisible()wait can't recover (nothing scrolls it back into the DOM).Env-map thumbnail wait —
waitForCardThumbnailLoadednow first materialises the card viawaitForEnvironmentMapByName(which progressively scrolls + reloads past stale React Query cache) and scrolls the image into view before asserting. Reuses the existing pattern fromopenEnvironmentMapByName.Texture-set viewer open — the shared
I open the texture set viewer for {string}step relied onnarrowVirtualisedList, 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 on00-texture-sets/17-tiff-preview.featurewith "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
mainvia #488, so #494 can be closed as superseded.Test plan