Skip to content

fix: wrap search E2E tests with toPass retry for read-replica lag (#199)#200

Merged
zacharias-ona merged 1 commit into
mainfrom
fix/199-search-e2e-flake
Apr 17, 2026
Merged

fix: wrap search E2E tests with toPass retry for read-replica lag (#199)#200
zacharias-ona merged 1 commit into
mainfrom
fix/199-search-e2e-flake

Conversation

@zacharias-ona
Copy link
Copy Markdown
Collaborator

Closes #199

What

The "clicking a search result navigates to the correct page" E2E test intermittently timed out waiting for [role="option"] elements to appear in the search dropdown. The search feature itself works — the flake was caused by Supabase read-replica lag after a title save, where the first search query returns no results because the full-text search vector hasn't propagated yet.

How

Wrapped the search-and-wait-for-results flow in expect(...).toPass() with retry intervals ([2s, 3s, 5s] over a 15s timeout), matching the pattern already used successfully in the "typing in search input shows matching results" test. Applied the same fix to the "search is scoped to the current workspace" test which had the same vulnerability.

Testing

  • All 5 search E2E tests pass consistently, including the previously flaky navigation test
  • Full E2E suite: 46/47 passed (the 1 failure is a pre-existing flake in members.spec.ts, unrelated to search)
  • pnpm lint && pnpm typecheck && pnpm test all pass (215 unit tests)

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

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

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment Apr 17, 2026 6:17pm

Request Review

@zacharias-ona zacharias-ona merged commit 4eb7fd1 into main Apr 17, 2026
6 checks passed
@zacharias-ona zacharias-ona deleted the fix/199-search-e2e-flake branch April 17, 2026 18:22
@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

✅ UI verification skipped — no UI files changed (only e2e/search.spec.ts).

@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

✅ Post-merge verification passed.

E2E suite: 46/47 passed

Ad-hoc smoke tests: all passed

  • ✅ Landing page — loads with title
  • ✅ Sign-in page — renders email input
  • ✅ Health endpoint — returns healthy status
  • ✅ Authenticated flow — login, workspace load
  • ⏭️ Skipped: /dashboard (not yet built), editor route (no page buttons in workspace at test time)

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.

bug: E2E test flake — "clicking a search result navigates to the correct page" times out after PR #198

1 participant