Repository navigation
test(web): the stepped-loops and pinned-header tests wait for frames, not a fixed time - #921
Merged
Merged
Conversation
… not a fixed time
Both tests gave the browser a short, fixed time to draw. A busy CI machine
draws a frame or two in half a second, so they failed with nothing to check.
steppedLoops watched a loop's positions over a fixed 500 ms and wanted more
than two poses ("expected 1 to be greater than 2" on #919). It now watches
each drawn frame until the run shows what the test is about, capped at 10 s,
and asserts on the whole run as before. With the page's thread held busy
450 ms of every 490 ms, the old test fails that way and this one passes.
The pinned-header test waited the default second for a scroll-state query,
which only updates when a frame is drawn (failed once on #916). Its waits are
now 10 s. That failure did not reproduce locally, so this one is inferred.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
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.
The problem
Two browser tests failed once each in CI on changes that did not touch them (#919 and #916), and passed on a re-run. Both give the browser a short, fixed time to draw. A busy CI machine draws a frame or two in half a second, so the time ran out with nothing to check.
steppedLoops.browser.tsxwatched a loop's positions over a fixed 500 ms and wanted more than two poses:expected 1 to be greater than 2.themeStore.browser.tsx("keeps a group's pinned header…") waited the default second for a scroll-state container query, which only updates when a frame is drawn:expected 'hidden' to be 'visible'.The fix
Only the two test files change.
How sure