- Graph: nodes.ts split into nodes/<category>/<Type>.ts (62 files) with shared.ts factories and index.ts registry; NodeContext/values/NodeRegistry separated, writeTyped() replaces duplicated typed writes - Comments: one style (JSDoc on non-obvious exports, // for decisions and traps), wrong/stale comments fixed or removed, ids.ts now real 10 base-36 chars - Core: chainOf, shared worldPosition/editorPosition core, commands/require.ts, commands/naming.ts, util/list.ts, setBagValue/toPosition/propDef; dead code removed (isBehaviorAsset, SCENE_OBJECT_SCHEMA, CommandStack.subscribe, Input.axis, setMode, titleText, World.worldPosition, unused ctor params) - Editor: Inspector split into inspector/ sections, App.ts into Editor.ts + debugHook.ts + shortcuts.ts, Viewport into items.ts + symbols.ts, shared "Add collider" action, unified type labels/swatches - UI toolkit: Widget.trackHover/onPointerRelease, drawControlBox, math helpers, Popup.openBelow, Menu/Dialog/ColorPicker/ListRow in own files, named Theme sizes - Tools: seed-demo/smoke-demo and demo-check project removed, tools/lib (harness, projects, builders), e2e.mjs as runner over tools/e2e/*.mjs sections - Tests: tests/helpers.ts replaces copied fixtures and NodeContext doubles Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
21 lines
883 B
JavaScript
21 lines
883 B
JavaScript
#!/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);
|
|
});
|