Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit c325f82ebc892c5af86efe879d07ef08c42af168
parent 575233259a7606a5439c44e9f8f8a6153222ac10
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu,  5 Nov 2026 03:01:16 -0500

umtool e2e: add-clip takes away the window its fetch wrote into the fixture corpus (the walk fixture reads the same recording)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mumtool/e2e/add-clip.spec.ts | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/umtool/e2e/add-clip.spec.ts b/umtool/e2e/add-clip.spec.ts @@ -1,5 +1,5 @@ import { test, expect } from "@playwright/test"; -import { readFileSync } from "node:fs"; +import { existsSync, readdirSync, readFileSync, rmSync } from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; import * as urls from "./urls"; @@ -18,6 +18,15 @@ const P = "reports/add-clip-fixture"; const DIR = path.join(HERE, "..", ".e2e-song", "reports", "add-clip-fixture"); type Entry = Record<string, unknown> & { id: string; type: string }; const timeline = (): Entry[] => JSON.parse(readFileSync(path.join(DIR, "video.manifest.json"), "utf8")).timeline; +// Where the stub editor writes the fetched window: the fixture corpus other specs read (the walk fixture's +// clips are on the same recording), so the window this spec fetched is taken away again when it ends. +const CLIPS = path.join(HERE, "..", ".e2e-song", "channels", "testchan", "data", "vid1", "clips"); +const clipFiles = () => (existsSync(CLIPS) ? readdirSync(CLIPS) : []); +let had: Set<string> | null = null; +test.afterEach(() => { + if (had) for (const f of clipFiles()) if (!had.has(f)) rmSync(path.join(CLIPS, f), { force: true }); + had = null; +}); test("Add a clip: find the words, in and out on the cues, after a row, added and fetched", async ({ page }) => { test.setTimeout(120_000); @@ -42,6 +51,7 @@ test("Add a clip: find the words, in and out on the cues, after a row, added and await page.getByRole("button", { name: "in 0.5 s later" }).click(); await expect(page.locator('[data-add-clip-edge="in"]')).toHaveValue("12.5"); + had = new Set(clipFiles()); const first = timeline()[0].id; await page.locator("[data-add-clip-after]").selectOption(first); await page.locator("[data-add-clip-submit]").click();