Skip to content

test(e2e): harden below-fold comment spec against parallel-load timeout#78

Merged
sam-powers merged 1 commit into
mainfrom
test/harden-below-fold-e2e
Jul 10, 2026
Merged

test(e2e): harden below-fold comment spec against parallel-load timeout#78
sam-powers merged 1 commit into
mainfrom
test/harden-below-fold-e2e

Conversation

@sam-powers

Copy link
Copy Markdown
Owner

Why

The PR #77 audit's one finding: the below-fold e2e spec is timing-fragile. A full-suite run reproduced it — Test timeout of 30000ms exceeded inside document setup (keyboard.type typing 60 paragraphs char-by-char took ~18s solo and >30s under parallel-worker CPU contention), so the assertion never even ran.

What

  • keyboard.typekeyboard.insertText: one bulk insertion per paragraph. Setup drops from ~18s to ~2.5s.
  • test.setTimeout(60_000) as belt-and-braces so future load spikes still can't kill the test during setup.

Test-only; no runtime code touched. The test still exercises the real layout path (spacer + scrollCardIntoView) exactly as before.

Validation

  • Solo run: ✓ 2.5s
  • Full suite under parallel load (the previously-failing condition): 174 passed (1.2m), zero retries needed
  • Frontend bar: typecheck ✓, eslint ✓, prettier ✓, vitest 305 ✓

🤖 Generated with Claude Code

https://claude.ai/code/session_01ESi6dnK3Wc1jYRpZN5qfZA

Full-suite runs intermittently blew the 30s default test budget inside
document setup: keyboard.type types 60 paragraphs char-by-char, which
took ~18s solo and >30s under parallel-worker CPU contention — the
assertion never ran. Switch to keyboard.insertText (one bulk insertion
per paragraph; setup now ~2.5s) and set a 60s belt-and-braces budget.

Test-only change; no runtime code touched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ESi6dnK3Wc1jYRpZN5qfZA
@sam-powers
sam-powers merged commit c3c7d2f into main Jul 10, 2026
3 checks passed
@sam-powers
sam-powers deleted the test/harden-below-fold-e2e branch July 10, 2026 15:49
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.

1 participant