Skip to content

test: add E2E tests for sidebar search (#111)#115

Merged
zacharias-ona merged 1 commit into
mainfrom
feat/111-e2e-search-tests
Apr 16, 2026
Merged

test: add E2E tests for sidebar search (#111)#115
zacharias-ona merged 1 commit into
mainfrom
feat/111-e2e-search-tests

Conversation

@zacharias-ona
Copy link
Copy Markdown
Collaborator

Closes #111

What

Adds E2E tests for the sidebar search feature covering all user-facing interactions: typing a query, viewing results, navigating to a result, empty state, and workspace scoping.

How

New test file e2e/search.spec.ts with 5 tests:

  1. Setup test — creates a page with a unique title to verify test infrastructure works
  2. Typing shows results — creates a page, types the unique word in the search input, verifies matching results appear in the dropdown
  3. Clicking result navigates — creates a page, searches for it, clicks the result, verifies URL changes to the correct page and editor loads
  4. No matches shows empty state — types a nonsense query, verifies "No pages match your search" message appears with zero result options
  5. Search is scoped to workspace — creates a page, searches for it, verifies only results containing the unique word appear (the API requires workspace_id, so results are inherently workspace-scoped)

Each test creates its own page with a Date.now()-based unique word to avoid tsvector collisions. Uses the authenticatedPage fixture from e2e/fixtures/auth.ts.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test ✅ (58 tests)
  • pnpm test:e2e ✅ (33 tests, including 5 new search tests)

Co-authored-by: Ona <no-reply@ona.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

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

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment Apr 16, 2026 9:56pm

Request Review

@zacharias-ona zacharias-ona merged commit a045758 into main Apr 16, 2026
6 checks passed
@zacharias-ona zacharias-ona deleted the feat/111-e2e-search-tests branch April 16, 2026 21:58
@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 skipped — test: PR does not affect the live app.

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.

test: add E2E test for sidebar search

1 participant