Skip to content

Restore the missing Playwright end-to-end spec #9

Description

@jeanclawd

Problem

The README advertises a Playwright spec that covers Pyodide bootstrap, sample loading, training, predictions, export and the scatter-plot render (8 assertions). `CLAUDE.md` confirms the spec file is no longer in the repo.

This means every refactor risks silently breaking the Pyodide bootstrap or model-export paths with zero automated signal. The app is a single static site that lives or dies on the bridge between `frontend/js/pyodide-bridge.js` and `frontend/py/learner.py` — exactly the surface a smoke test should defend.

Proposal

Recreate `tests/e2e.spec.ts` (or similar) with at minimum:

  1. Page loads, `pyodide-ready` event fires within 30 s.
  2. Load a built-in sample (e.g., Iris).
  3. Select two features, set a target, pick 3 models, click Train Selected.
  4. Wait for the comparison chart to render; assert all 3 metrics rows are non-empty.
  5. Click Export on one model and assert a `.joblib` download is offered.
  6. Re-run with a regression sample (Airfoil) and assert residuals and predicted-vs-actual charts render.

Acceptance criteria

  • `npx playwright test` passes on a clean checkout.
  • CI runs the spec on every push.
  • At least the 8 assertions described in the README are covered.

Blocker note

This should land before any significant feature work; without it every change is a leap of faith.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions