fix(desktop): resolve flaky integration tests via project-level assertion timeout#812
Merged
Merged
Conversation
…tion timeout stream.spec.ts had 10 expect.poll() and 3 toHaveCount() calls using Playwright's default 5s assertion timeout. Under CI load, scroll-position and badge assertions timed out before the UI settled after relay delivery. test.slow() only triples the test-level timeout, not assertion timeouts. Set expect.timeout on the integration Playwright project (15s CI, 10s local) so all assertions inherit a consistent timeout. Remove per-file relayDeliveryTimeoutMs constants and per-call timeout overrides.
Replace non-null assertions with type-narrowing guards, string concatenation with template literals, computed string keys with dot notation, and verbose null-checks with optional chaining.
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.
Integration tests in
stream.spec.tswere flaky because 10expect.poll()and 3toHaveCount()calls used Playwright's default 5-second assertion timeout. Under CI load, scroll-position and badge assertions timed out before the UI settled after relay delivery.test.slow()only triples the test-level timeout, not assertion timeouts — so these assertions had 5s regardless.The relay ack is already correct (
sendChannelMessageblocks until the relay persists and fans out via HTTP POST), so no send-side fix was needed. The fix is purely on the observation side.expect.timeouton theintegrationPlaywright project (15s CI, 10s local) so all assertions inherit a consistent timeoutrelayDeliveryTimeoutMsconstants and per-call{ timeout }overrides fromstream.spec.tsandintegration.spec.ts