Archilyzer · Source

archilyzer

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

commit 75f0264fbd5206dfb66062c248b6201005e39c9e
parent bd2d01a96cad4aa61866950221ca37546b130a47
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri, 23 Oct 2026 02:01:37 -0400

live-preview spec: wait for the player to load each clip's own media before walking it; the finale page's first load in dev mode

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

Diffstat:
Mumtool/e2e/live-preview.spec.ts | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/umtool/e2e/live-preview.spec.ts b/umtool/e2e/live-preview.spec.ts @@ -36,6 +36,13 @@ async function nudgePlayer(page: Page, d: number) { }, d); } +/** The editor's player has loaded `clip`'s media (it loads each clip's own, then seeks to its cut). */ +async function playerOn(page: Page, clip: string) { + await expect + .poll(() => page.locator("[data-editor-player] video[data-player]").evaluate((v: HTMLVideoElement) => `${v.currentSrc.includes(`clip=`) ? new URL(v.currentSrc).searchParams.get("clip") : "?"}:${v.readyState >= 2}`), { timeout: 20_000 }) + .toBe(`${clip}:true`); +} + /** The opacity a composition's element has right now (gsap's autoAlpha), inside its frame. */ const opacityIn = (frame: Frame, selector: string) => frame.locator(selector).evaluate((el) => Number(getComputedStyle(el).opacity) * (getComputedStyle(el).visibility === "hidden" ? 0 : 1)); @@ -70,6 +77,7 @@ test("the live preview: the deck over the clip, the tally and the stamp at the p await expect(page.locator("[data-live-readout]")).toContainText("clip 2 of 3"); // The clip's stamp: the button puts the playhead a second before it lands (source 4.0, the clip's first second). + await playerOn(page, "c02"); const go = page.locator("[data-live-goto-stamp]"); await expect(go).toHaveAttribute("data-live-goto-stamp", "5"); await go.click(); @@ -108,6 +116,7 @@ test("the live preview: the deck over the clip, the tally and the stamp at the p // The last clip is the finale: its page is laid over the deck once it opens; its claim counts there, undrawn. await page.locator('[data-editor-row="c03"]').click(); + await playerOn(page, "c03"); const fin = page.locator('[data-live-preview="c03"]'); await expect(fin).toHaveAttribute("data-live-state", "ready"); await expect(page.locator("[data-live-goto-stamp]")).toContainText("this clip counts k2"); @@ -115,7 +124,7 @@ test("the live preview: the deck over the clip, the tally and the stamp at the p await expect(fin).toHaveAttribute("data-live-where", "inside"); await nudgePlayer(page, 1.0); await expect(page.locator("[data-live-finale-up]")).toBeVisible(); - await expect(page.getByTestId("live-finale")).toHaveAttribute("data-feed-ready", "1", { timeout: 15_000 }); + await expect(page.getByTestId("live-finale")).toHaveAttribute("data-feed-ready", "1", { timeout: 30_000 }); await expect(page.locator("[data-live-tally]")).toHaveAttribute("data-live-tally", "CORROBORATED:1,CONTRADICTED:1"); await expect(page.locator("[data-live-stamp]")).toHaveAttribute("data-live-stamp", "");