Repository navigation
test: wait for the plain-page motion study to stop before reading its last frame - #6194
Merged
Merged
Conversation
… last frame The clock shows Math.round(time), so it reads "300 ms" at 299.5 ms, a frame before playback reaches the end. The test then read drawnAt.at(-1) as 299.5 on PR #6184's CI run 43915527596. It now waits for the transport to say Play again, which happens in the same tick that draws the final frame at the duration. No behavior changes.
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.
test_a_display_widget_draws_on_a_page_without_leaffailed on #6184's CI (run 43915527596) withassert 299.5 == 300. #6184 didn't cause it: it changed only a CSS comment and a journey's expected widths. The cause is in the test.lf-motion's clock showsMath.round(time), so it already reads "300 ms" when the clock stands at 299.5 ms, one frame before playback ends. The test waited on that text and then read the last drawn frame. It now waits for the transport's button to say Play again, which#tickdoes when it pauses at the duration, in the same task that draws the final frame. The assertions themselves are unchanged, and so is the widget.Verified locally: the test passes alone, and five more times with six busy loops starving the 4-core runner of CPU. The failure needs a frame to land within half a millisecond of the end, so it didn't reproduce before the change either; the evidence for the cause is the CI failure together with the rounding in
packages/motion/widgets/motion-view.js.