Skip to content

Stabilize flaky pro CSV-import e2e test - #806

Merged
rob-gordon merged 1 commit into
devfrom
robgordon/fix-flaky-pro-import-e2e
May 29, 2026
Merged

Stabilize flaky pro CSV-import e2e test#806
rob-gordon merged 1 commit into
devfrom
robgordon/fix-flaky-pro-import-e2e

Conversation

@rob-gordon

Copy link
Copy Markdown
Member

pro.spec.ts:118 ("Create chart from imported data") has flaked ~4x across recent PRs (#804, #805), always in the CSV import → confirm flow against the Vercel preview — never a product bug:

  • sometimes the "9 nodes and 10 edges" confirmation didn't appear within the 5s default (line 158),
  • sometimes the confirm click hung to the 120s test timeout (line 160).

Fix

  1. Targeted waits — bump the confirmation toBeVisible to 30s (import parsing is slow against the preview) and wait for the confirm button to be actionable before clicking (so it can't hang to the test timeout).
  2. CI retries (retries: isCI ? 2 : 0) — the standard mitigation for e2e against a live preview. Every failure was a single-attempt flake, so a retry absorbs it; a real break still fails all attempts and stays red. Local retries stay off so flakes remain visible while developing.

Honest caveat

This can't be proven in a single run — the test only flakes against CI/preview and passes locally. Verification is a reduced flake rate over subsequent CI runs. Retries alone would have turned all 4 recent failures green.

This is a pragmatic stabilizer; the deeper fix (less preview-timing-dependent e2e) comes with the eventual CRA→Vite/framework migration.

🤖 Generated with Claude Code

pro.spec.ts:118 ("Create chart from imported data") flaked ~4x across recent
PRs, always in the import->confirm flow against the Vercel preview: sometimes
the "9 nodes and 10 edges" confirmation didn't appear within the 5s default
(line 158), sometimes the confirm click hung to the 120s test timeout (line
160). Both are preview-timing issues, not product bugs.

- Bump the confirmation toBeVisible timeout to 30s and wait for the confirm
  button to be actionable before clicking.
- Add CI retries (retries: isCI ? 2 : 0) — the standard mitigation for e2e
  against a live preview. Each failure was a single-attempt flake, so a retry
  absorbs it; a real break still fails every attempt. Local retries stay off
  so flakes remain visible while developing.

Note: can't be proven in one run (it only flakes against CI/preview, passes
locally); verification is a reduced flake rate over subsequent CI runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented May 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flowchart-fun Ready Ready Preview, Comment May 29, 2026 6:02am

Request Review

@rob-gordon
rob-gordon merged commit 5f01095 into dev May 29, 2026
5 checks passed
@rob-gordon
rob-gordon deleted the robgordon/fix-flaky-pro-import-e2e branch May 29, 2026 06:11
@rob-gordon rob-gordon mentioned this pull request Jul 16, 2026
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