fix(e2e): replace flaky frame-count assertion with stable height check#2011
Merged
wesbillman merged 1 commit intoJul 17, 2026
Conversation
The share-card animation test sampled heights via requestAnimationFrame over a 280ms window and asserted >2 distinct rounded values. On slow CI runners the rAF rate is throttled, producing exactly 2 samples and causing intermittent failures. Replace the frame-counting approach with: 1. waitForAnimations(page) — waits for CSS animations to settle 2. A single height measurement after settle 3. Assert expanded height > initial height This proves the card expanded without depending on intermediate frame scheduling, making the test deterministic regardless of runner speed. Co-authored-by: Cameron Hotchkies <chotchkies@block.xyz> Signed-off-by: Cameron Hotchkies <chotchkies@block.xyz>
cameronhotchkies
marked this pull request as ready for review
July 17, 2026 01:03
wesbillman
approved these changes
Jul 17, 2026
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
Fixes flaky test
agents.spec.ts:1037("share access controls include the selected memories").Problem
The test sampled the share-card's CSS animation by polling height via
requestAnimationFrameover a 280ms window, then asserted it observed >2 distinct rounded height values. On slow/loaded CI runners, the rAF rate is throttled, producing exactly 2 samples — one short of the threshold.Fix
Replace frame-counting with a deterministic approach:
waitForAnimations(page)— waits for CSS animations to settle (already used elsewhere in this file)This proves the card expanded without depending on intermediate frame scheduling.
Testing
The assertion is now timing-independent: it verifies the end state (card grew) rather than sampling intermediate animation frames. No behavioral change to production code.