#!/usr/bin/env node /** * Headless end-to-end checks of the editor, driven over the Chrome DevTools Protocol. * Usage: PATH=/opt/node22/bin:$PATH node tools/seed-e2e.mjs && node tools/e2e.mjs [projectId] [baseUrl] * Prints PASS/FAIL per check, writes screenshots to /tmp/gm-e2e-*.png. No dependencies. * * Runs against the fixture project written by tools/seed-e2e.mjs and mutates it heavily; the * steps in tools/e2e/ run in order and build on each other's scene state. */ import { STEPS } from './e2e/index.mjs'; import { runChecks } from './lib/harness.mjs'; import { PROJECTS, cliArgs } from './lib/projects.mjs'; const { projectId, baseUrl } = cliArgs('e2e.mjs', PROJECTS.fixture); await runChecks({ projectId, baseUrl, port: 9333, shotPrefix: 'gm-e2e' }, async (t) => { await t.navigate(); await t.shot('01-loaded'); for (const step of STEPS) await step(t); });