Test fix: PrepSheet's Shelf test looks its section up inside the wait (#955) #956
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/prepsheet-shelf-flake"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #955. It's flaked twice in one night:
Both were "Frontend (shard 2/2)", both at
PrepSheet.test.jsx:519, and both wereExpected container to be an Element … but got null.The cause: the test captured
shelf = heading.closest("section")once, before itswaitFor. Under load the heading can be found in a render where it isn't in its<section>yet, soshelfstayednull, and thewaitForspun on it until it timed out (5 s).The fix: find the heading first as before, then look the section up inside the
waitForand assert it's there, so the wait covers the heading landing in its section too. It's test-only.Checks: eslint shows 0 errors, and
PrepSheet.test.jsxpassed 5 runs in a row (25/25 each).🤖 Generated with Claude Code