Skip to content

test(frontend): add a Playwright e2e suite for the desktop and mobile layouts - #153

Merged
safina57 merged 1 commit into
stagingfrom
test/frontend-e2e
Nov 9, 2026
Merged

safina57 merged 1 commit into
stagingfrom
test/frontend-e2e

Conversation

@safina57

@safina57 safina57 commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Adds a Playwright e2e suite covering the desktop (1440x900 Chrome) and mobile (Pixel 7) layouts.

What it covers

  • Both layouts: first visit through consent, language and every tour step, with the workspace handed back and nothing shown again after a reload; theme persistence; switching to French and back; the terms and 404 pages.
  • Desktop: a chat turn with citation pills, contact links, map pins and follow-up chips; map pin to trial list to summary; trials added to the chat ride along with every message and show under it until removed; saving a trial, starting a new conversation and reopening it from saved trials; PDF export; the contact dialog.
  • Mobile: opening on the map, the search bar opening the chat, a citation collapsing the chat onto its card, the details drawer, asking about a trial from the drawer, saving from the drawer, and the map controls clearing the search bar.

How it runs

  • /chat/stream is answered with a canned reply built from real trials fetched from /debug/trials; every other call hits the live backend. Runs are deterministic and spend no LLM tokens, and no API key is needed.
  • e2e/live.spec.ts exercises the real agent and only runs with E2E_LIVE=1 (paid tokens).
  • Needs a running non-production backend on a populated database. pnpm e2e starts Vite if it is not up; E2E_API_URL points at the backend (default http://localhost:8000). Install the browser once per machine with pnpm exec playwright install chromium.
  • Vitest is limited to src/**/*.test.* so it no longer picks up the specs; Playwright output folders are git-ignored.

Not wired into CI or pre-commit: it needs a seeded database and live servers, so it is a manual check before merging to staging.

Some specs assert behaviour fixed in #152 (context pills under the user message, the mobile map overlay placement), so merge #152 first.

@safina57
safina57 merged commit bc930b3 into staging Nov 9, 2026
10 checks passed
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