fix(e2e): bump messaging-scroll setup timeout 8s β 20s for CI hydration (#66)#68
Merged
TortoiseWolfe merged 2 commits intomainfrom May 2, 2026
Merged
Conversation
Investigation in #66 revealed that all 6 messaging-scroll tests were silently skipping in CI for ~5 weeks because the setup's 8s visibility check raced with React hydration on the slower CI runner. DB queries, auth, sidebar render, and `Conversation with ...` aria-labels all work correctly β the timeout window was simply too tight. Diagnostic run on `66/messaging-scroll-diagnostic` (run 25213786077) confirmed: with a 3s pre-wait the existing logic finds 2 conversations, both connections accepted, and 5/6 tests pass + 1 flaky-but-passed. Closes #66. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR #68's first commit was wrong. Bumping `isVisible({ timeout: N })` doesn't help because `isVisible` is a non-retrying single-shot check β it returns false in ~50ms if the element isn't attached at the moment of the call, regardless of the timeout value. CI run on PR #68 (job 73980270209) showed 70 passed/7 skipped (same baseline) instead of the expected un-skip. Switch to `waitFor({ state: 'visible', timeout: 20000 })` which auto-retries until the element is attached AND visible. Same pattern as the existing `clickFirstConversation` helper at line 82. The diagnostic instrumentation on `66/messaging-scroll-diagnostic` had this implicitly via `waitForTimeout` preceding the `isVisible` call. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
One-line behavioral change: bump the
setupSucceededvisibility check timeout from8000msto20000msintests/e2e/messaging/messaging-scroll.spec.ts.The 8s window was tuned for local dev. In CI, React hydration + Supabase conversation query takes longer than 8s on the slower runner, so the visibility check times out and
setupSucceededfalls through tofalseβ silently skipping all 6 tests viatest.skip(!setupSucceeded, ...).Investigation
#66 diagnostic run on branch
66/messaging-scroll-diagnostic(NOT merged) captured definitive proof:auth.usersstatus=acceptedUnifiedSidebarvisibleMessagesSidebarvisible/Conversation with/setupSucceededafter 8s+3s pre-waitHypotheses falsified:
auth.setup.tsdoesn't create the conversationUnifiedSidebardefault tab wrongConversationListItemfalls back to "Unknown User"The data is fine β the timeout window was simply too tight.
Verification
The diagnostic run with a 3s pre-wait + the existing 8s check showed:
offline-queue-sync.spec.ts(Docker-only by design, expected)This PR uses a 20s timeout on the visibility check itself (no
waitForTimeout(3000)workaround needed). Same outcome expected: ~5 un-skips + 1 flaky-but-passing in CI.Out of scope
66/messaging-scroll-diagnosticis NOT merged. It's diagnostic-only and stays on origin for archival.messaging-scrolltests CSS Grid layout, not data β should use mocked data instead of real Supabase users.Closes #66.
π€ Generated with Claude Code