Repository navigation
test: frontend-neutral e2e driver and Svelte migration plan - #9
Conversation
- Move all Dash selectors/gestures behind a UiDriver interface (e2e/drivers/dash.ts); scenarios use only the driver, image helpers and the /__e2e__ oracle. Assertions are unchanged. - Add uiTarget Playwright option, a 'dash' project, requireWorkflow() skips, e2e tsconfig and a CI type-check step. - Add the Svelte 5 migration handoff, target architecture/API contract and a 92-row Dash callback parity checklist; point CLAUDE.md at them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The refactor cleanly isolates Dash-specific e2e interactions behind UiDriver, adds CI type-checking, and the changes appear consistent with the stated “no behavior changes” goal.
Review effort: Lite
Findings: None
What changed in this PR
Introduces the first “PR 0” scaffolding for the Dash → Svelte 5 migration by making the Playwright e2e suite frontend-neutral via a UiDriver abstraction, adding TypeScript type-checking for e2e code in CI, and documenting the migration plan and parity checklist. The PR is structured to preserve existing behavioral assertions and tolerances while isolating Dash-specific selectors/gestures into a dedicated driver.
Changes:
- Refactors
e2e/parallax-maker.spec.tsto use a frontend-neutralUiDriver, moving Dash selectors/gestures intoe2e/drivers/dash.tsand backend oracle access intoe2e/helpers/oracle.ts. - Adds
uiTargetPlaywright option +dashproject wiring, plusrequireWorkflow()for workflow-based scenario skipping during incremental driver implementation. - Adds
e2e/tsconfig.json,npm run check:e2e, TypeScript/Node typings dev dependencies, and a CI step to type-check browser tests; adds migration docs (ARCHITECTURE.md,PARITY.md, handoff) and links fromCLAUDE.md.
| File | Description |
|---|---|
| package.json | Adds check:e2e script and dev deps for e2e TypeScript type-checking. |
| package-lock.json | Locks added TypeScript and Node typings dependencies for reproducible CI. |
| e2e/tsconfig.json | Introduces dedicated TypeScript config for type-checking e2e sources. |
| e2e/README.md | Documents the driver layout and uiTarget selection contract for future frontends. |
| e2e/playwright.config.ts | Adds uiTarget option typing, shared use config, and a dash project. |
| e2e/parallax-maker.spec.ts | Refactors scenarios to interact only through UiDriver + frontend-neutral helpers/oracle. |
| e2e/helpers/oracle.ts | Adds backend oracle helper module for /__e2e__/* requests (UI-agnostic). |
| e2e/helpers/image.ts | Narrows to frontend-neutral pixel/image utilities; removes Dash-specific helpers. |
| e2e/fixtures.ts | Provides ui fixture (currently DashDriver), uiTarget option, and requireWorkflow(). |
| e2e/drivers/types.ts | Defines the frontend-neutral UiDriver interface and workflow/tab/action vocabulary. |
| e2e/drivers/dash.ts | Implements UiDriver for Dash, centralizing all Dash selectors and gestures. |
| docs/svelte-migration/PARITY.md | Adds per-callback parity checklist and e2e coverage mapping for migration tracking. |
| docs/svelte-migration/ARCHITECTURE.md | Adds target backend/frontend architecture and v1 API contract design notes. |
| docs/SVELTE_5_MIGRATION_HANDOFF.md | Adds migration plan/background, current state, constraints, and next steps. |
| CLAUDE.md | Links to migration docs and states the frontend-neutral e2e expectation. |
| .github/workflows/python-app.yml | Adds CI step to type-check browser tests (npm run check:e2e). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
First PR of the Dash → Svelte 5 migration (PR 0 in
docs/svelte-migration/ARCHITECTURE.md). No application behavior changes.Changes
e2e/drivers/types.tsdefines a frontend-neutralUiDriver;e2e/drivers/dash.tsholds every Dash selector/gesture.parallax-maker.spec.tsnow uses only the driver,helpers/image.ts(pixel utilities) andhelpers/oracle.ts(/__e2e__backend oracle). All assertions, pixel values, hashes and tolerances are unchanged. Removed assertions were moved into the driver or oracle helpers, not dropped.uiTargetPlaywright option with adashproject;requireWorkflow()skips scenarios a driver doesn't support yet, so a Svelte project can be added incrementally.e2e/tsconfig.json,npm run check:e2e, and a CI type-check step (addstypescriptand@types/nodedev dependencies).docs/svelte-migration/ARCHITECTURE.md(target design and v1 HTTP contract), anddocs/svelte-migration/PARITY.md(92 Dash callbacks/handlers, grouped by workflow, with their e2e coverage and known quirks).CLAUDE.mdnow points to these docs.Verification (local)
pytest -o addopts='' -q: 258 passednpm run check:e2e: cleannpm run test:e2e: 11 passed (dash project)git diff --check: clean🤖 Generated with Claude Code