Skip to content

fix(e2e): bump messaging-scroll setup timeout 8s β†’ 20s for CI hydration (#66)#68

Merged
TortoiseWolfe merged 2 commits intomainfrom
66/messaging-scroll-timeout-fix
May 2, 2026
Merged

fix(e2e): bump messaging-scroll setup timeout 8s β†’ 20s for CI hydration (#66)#68
TortoiseWolfe merged 2 commits intomainfrom
66/messaging-scroll-timeout-fix

Conversation

@TortoiseWolfe
Copy link
Copy Markdown
Owner

Summary

One-line behavioral change: bump the setupSucceeded visibility check timeout from 8000ms to 20000ms in tests/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 setupSucceeded falls through to false β€” silently skipping all 6 tests via test.skip(!setupSucceeded, ...).

Investigation

#66 diagnostic run on branch 66/messaging-scroll-diagnostic (NOT merged) captured definitive proof:

Diagnostic check Result
PRIMARY user resolved in auth.users βœ…
Conversations in DB 2 (both with PRIMARY as participant_2)
Connections 2, both status=accepted
UnifiedSidebar visible βœ…
MessagesSidebar visible βœ…
Conversation list items rendered 2
Button aria-labels match /Conversation with/ βœ… (2 matches)
setupSucceeded after 8s+3s pre-wait βœ… true

Hypotheses falsified:

  • ❌ Auth/storage state broken
  • ❌ auth.setup.ts doesn't create the conversation
  • ❌ UnifiedSidebar default tab wrong
  • ❌ ConversationListItem falls 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:

  • 75 passed (vs. 70 baseline) β†’ 5 of 6 messaging-scroll tests un-skipped
  • 1 flaky-but-passed β†’ the 6th messaging-scroll test (passed on retry)
  • 1 skipped β†’ unrelated 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

  • The instrumentation branch 66/messaging-scroll-diagnostic is NOT merged. It's diagnostic-only and stays on origin for archival.
  • Long-term, #67 tracks the proper refactor: messaging-scroll tests CSS Grid layout, not data β€” should use mocked data instead of real Supabase users.

Closes #66.

πŸ€– Generated with Claude Code

TurtleWolfe and others added 2 commits May 1, 2026 19:13
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>
@TortoiseWolfe TortoiseWolfe merged commit dd83ac7 into main May 2, 2026
28 checks passed
@TortoiseWolfe TortoiseWolfe deleted the 66/messaging-scroll-timeout-fix branch May 2, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[E2E] messaging-scroll.spec.ts silently skips 6/6 tests in CI β€” investigate why setup does not find conversation

2 participants