You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a headless-browser smoke test for the renderer, every layer type and MP4 export #14
The unit tests cover the storyboard schema, the server and every provider. The code that draws the video has no automated coverage at all:
web/engine/render.mjs
the 17 draw functions in web/engine/layers.mjs (only the pure helpers parseRuns and formatNumber are tested)
web/engine/export.mjs
A layer that throws, like the negative-size lens/glass case in this backlog, only shows up when someone opens the studio.
The app already exposes a hook meant for exactly this, window.genmotion, with storyboard, seek(), exportMp4() and preloadAll(). Nothing uses it yet.
Task: add scripts/browser-check.mjs, run by npm run check:browser, that:
starts the server like scripts/check.mjs does
opens the studio in headless Chrome
loads a storyboard with one scene per LAYERS type, in each of 16:9, 9:16 and 1:1
seeks to several times per scene and asserts that no error was thrown
exports web/demo.genmotion.json and checks the MP4's size and duration
The project advertises zero dependencies, so keep the runtime free of them. Options: drive Chrome over the DevTools Protocol with Node's built-in WebSocket (Node 22+), or use playwright-core through npx without adding it to package.json. Explain the choice in the PR. A follow-up can wire this into CI.
Where: new scripts/browser-check.mjs; package.json:9-14; hook at web/app.mjs:657-658; web/engine/layers.mjs:480 (LAYER_DRAW); web/engine/storyboard.mjs:14-32 (LAYERS); server bootstrap to copy from scripts/check.mjs:1-30.
Getting started: Node 22, no npm install needed: git clone, then npm test and npm run check. Chrome or Edge for this one. Comment here to claim it. Questions → Discord.
Activity