Files
human-experience-filter-art/simulator/e2e
BenStullsBets 0e401c9a42 feat(sim): auto-scrub at constant per-altitude speed, 2x slower
Operator: slow click/auto transitions 2x and make them the same speed between any two
altitudes (2 away should take twice as long as 1). autoScrub duration is now
PROPORTIONAL to distance (PER_ALTITUDE_MS=1200, ~2x the old fixed 600ms total): a
label-click or wheel jump of N altitudes takes N*1200ms, so per-step speed is constant.
Manual drag is unaffected (operator drives its speed). E2E asserts a 2-step jump is
~2x a 1-step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 17:36:45 -07:00
..

Simulator E2E (Playwright)

Browser end-to-end tests for the Human Experience Filter simulator. The §9 pipeline requires an E2E browser tier for any UI surface; this is that tier.

What it covers

tests/altitude-lock.spec.ts drives the real simulator and asserts the altitude-morph behavior:

  • Zooming to a new altitude plays the morph that matches the clip it lands on (forward zoom-in, and .rev zoom-out).
  • After landing, the clip is locked — it does not change while parked (no secondary swap, no re-roll).

The played morph paths are read from window.__hefMorphs (a diagnostic array populated by advance() in static/app.js), which is reliable even when a morph is served from the in-memory blob cache. The locked clip is read from the Dev-Mode #scale-name readout.

Running

Prerequisites: the project Python venv on PATH (the Playwright webServer boots uvicorn simulator.app:app from the repo root), Node, and the Chromium browser.

# from this directory (simulator/e2e)
npm install
npx playwright install chromium
npm test

playwright.config.ts starts uvicorn on port 8099 automatically (reuseExistingServer locally) and points the tests at it.