mix scoria.ui.e2e (scoria v0.1.2)

Copy Markdown View Source

Runs the real-browser e2e assertion lane for the Scoria dashboard.

This is the Tier 2 complement to the server-rendered LiveView tests: it asserts the truths a Phoenix.LiveViewTest (Floki, no JS engine) cannot reach — client-side JS execution (JS.hide auto-dismiss), CSS layout, and async re-render in a live browser. Specs live in priv/dev/e2e/*.spec.mjs and are picked up automatically (the lane is testDir-driven), so a future phase adds a spec file with no new mix task.

Like mix scoria.ui.shots, this task does not boot a web server — the Node/Playwright process drives an already-running dev server. It starts only Repo/PubSub locally to top up destructive e2e fixtures before Playwright runs, unless --no-seed-approvals is passed.

Usage

mix scoria.ui.e2e [--base-url http://localhost:4799/scoria] [--no-seed-approvals]

Prerequisites

  • Node.js >= 18 on PATH.

  • The e2e deps + Chromium installed:

    npm --prefix priv/dev ci
    npx --prefix priv/dev playwright install --with-deps chromium
  • The dev database created and migrated, and the dev server running:

    make dev

Then, in a second shell:

mix scoria.ui.e2e --base-url http://localhost:4799/scoria

Notes

  • Spec files are dev-only and excluded from the Hex package (priv/dev is not in mix.exs files:).
  • The toast specs make destructive approval decisions. This task tops up pending approval fixtures for tenant acme-corp before Playwright runs so local and CI reruns are repeatable.