// THE POST VIDEO's HAPPY PATH, by clicking (lane/ui-simplify, 5 Nov; e2e/post-happy-path.spec.ts): a cut of one // cut with nothing in it yet, on the post-items fixture's archive (postchan-x, made by post-items-fixture.mjs first). // The spec adds the posts (Add posts), sets a pronunciation (Reads and voices), plays it (the head's Play) and // queues a take's render -- every step a press, nothing from a terminal. import { copyFileSync, mkdirSync, writeFileSync } from "node:fs"; import path from "node:path"; import { POST_CHANNEL } from "./post-items-fixture.mjs"; export function makePostHappyFixture({ reports, deckManifest, cachedWindow }) { const name = "post-happy-fixture"; const dir = path.join(reports, name); mkdirSync(path.join(dir, "out", "clips-raw"), { recursive: true }); copyFileSync(cachedWindow, path.join(dir, "out", "clips-raw", "playvid_0.00-9.00.mp4")); // An empty cut: a post video starts from its posts. const timeline = []; const m = deckManifest(name, "The Post Happy Path", timeline); m.provenance = { ...m.provenance, channelSlug: POST_CHANNEL }; m.render.fetchPad = 0; m.render.lockedEdges = false; writeFileSync(path.join(dir, "video.manifest.json"), JSON.stringify(m, null, 2) + "\n"); return { dir }; }