Archilyzer · Source

archilyzer

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

commit 71aa8b6f317d3d9856055db1194845ad3f8824fa
parent b00499778f73f7ec60c9dca471cfd1704298516a
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri,  6 Nov 2026 17:34:55 -0500

umtool: Play's e2e for the fan -- the tags overlapped with the day count, the goals' fan on the shelf

play-measure.spec.ts turns the shelf on with `items: [diet, goals]`, the diet's
overlap 0.6 with days, the goals on the shelf and the streak off, and checks
Play: both layers at y 750, no streak layer, the tags left to right (carnivore
in front, keto behind it), one day count up, and the goals' count "3 goals
set" in its column.

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

Diffstat:
Mumtool/e2e/play-measure.spec.ts | 48++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+), 0 deletions(-)

diff --git a/umtool/e2e/play-measure.spec.ts b/umtool/e2e/play-measure.spec.ts @@ -150,3 +150,51 @@ test("on the shelf: the footage at the frame's top, the diet's dated tags and th await put(before); } }); + +test("the fan: the diet's tags overlapped with the day count on the front one, the goals' fan beside them on the shelf", async ({ page, request }) => { + await page.setViewportSize({ width: 1366, height: 1000 }); + const enc = encodeURIComponent; + const read = async () => (await (await request.get(`/api/report/chrome?project=${enc(PROJECT)}`)).json()) as { chrome: Record<string, any>; token: string }; + const put = async (chrome: unknown) => { + const { token } = await read(); + const r = await request.put("/api/report/chrome", { data: { project: PROJECT, chrome, token } }); + expect(r.ok(), await r.text()).toBeTruthy(); + }; + const before = (await read()).chrome; + const deck = before.deck ?? {}; + try { + await put({ + ...before, + deck: { + ...deck, shelf: { items: ["diet", "goals"] }, streak: false, + diet: { ...(deck.diet ?? {}), position: "shelf", overlap: 0.6, days: true }, + goals: { ...(deck.goals ?? {}), position: "shelf" }, + }, + }); + await page.goto(urls.playHref(PROJECT, { clip: "c04", at: 1 })); + await expect(root(page)).toHaveAttribute("data-play-edges", "render", { timeout: 30_000 }); + for (const id of ["diet", "goals"]) { + await expect(page.getByTestId(`play-layer-${id}`)).toHaveAttribute("data-feed-ready", "1", { timeout: 30_000 }); + expect(await page.getByTestId(`play-layer-${id}`).evaluate((el) => parseFloat((el as HTMLElement).style.top))).toBeCloseTo((750 / 1080) * 100, 1); + } + await expect(page.locator('[data-play-layer="streak"]')).toHaveCount(0); + const diet = page.frameLocator('[data-testid="play-layer-diet-iframe"]').locator("#pn"); + // The front tag (carnivore, c03) with its running day count; keto behind it, still carnivore-free of a dim. + await expect.poll(() => diet.evaluate((pn) => { + const on = [...pn.querySelectorAll<HTMLElement>(".tg")].filter((e) => getComputedStyle(e).visibility !== "hidden" && Number(getComputedStyle(e).opacity) > 0.5) + .sort((a, b) => a.getBoundingClientRect().left - b.getBoundingClientRect().left); + return on.map((e) => (e.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 9)); + }), { timeout: 10_000 }).toEqual([expect.stringContaining("Carnivore"), expect.stringContaining("Keto")]); + const days = await diet.evaluate((pn) => [...pn.querySelectorAll<HTMLElement>(".dy")].filter((e) => getComputedStyle(e).visibility !== "hidden").map((e) => (e.textContent ?? "").trim())); + expect(days).toHaveLength(1); + expect(days[0]).toMatch(/^\d+days?$/); + const goals = page.frameLocator('[data-testid="play-layer-goals-iframe"]').locator("#pn"); + await expect.poll(() => goals.evaluate((pn) => { + const st = [...pn.querySelectorAll<HTMLElement>(".st")].find((e) => getComputedStyle(e).visibility !== "hidden"); + return st ? (st.querySelector(".gc")?.textContent ?? "").replace(/\s+/g, " ").trim() : null; + }), { timeout: 10_000 }).toBe("3goals set"); + await page.screenshot({ path: test.info().outputPath("play-measure-fan.png") }); + } finally { + await put(before); + } +});