commit cebb1d91b658759132160f670269360aaa2b43a3
parent 2e2b9e4faa0e51abc6d48cf2f761d22d559e7588
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 3 Nov 2026 15:28:25 -0500
umtool e2e: a redacted term -- Play shows the words; "As published" draws one blank bar and the term is nowhere in the card frame's DOM; the snapshot keeps it
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 25 insertions(+), 0 deletions(-)
diff --git a/umtool/e2e/post-items.spec.ts b/umtool/e2e/post-items.spec.ts
@@ -104,6 +104,31 @@ test("Play plays a post item: its card, the private parent blurred, its video pl
await expect(root(page)).toHaveAttribute("data-play-item", "p-vid");
});
+test("a redacted term: Play shows the words; As published draws a blank bar and the term is nowhere in the card's DOM", async ({ page }) => {
+ // A made-up term on the fixture's words (post-redact.mjs; knobs.md, "Redacted words").
+ umtool(["posts", "redact", PROJECT, "add", "here is"]);
+ expect(umtool(["posts", "redact", PROJECT, "ls"])).toContain("1. here is");
+ await page.setViewportSize({ width: 1366, height: 1000 });
+ await page.goto(urls.playHref(PROJECT, { bare: true, clip: "p-vid" }));
+ await page.evaluate(() => window.localStorage.removeItem("umtool.play.asPublished"));
+ await page.reload();
+ await expect(root(page)).toHaveAttribute("data-play-item", "p-vid");
+ const card = page.frameLocator('[data-post-card-frame="read"]');
+ // umtool's own view: the words as posted.
+ await expect(card.locator("[data-post-words]")).toContainText("Yes, and here is the video.");
+ await expect(card.locator("[data-post-blanked]")).toHaveCount(0);
+ await page.locator("[data-play-as-published]").check();
+ await expect(card.locator("[data-post-blanked]")).toHaveCount(1);
+ await expect(card.locator("[data-post-words]")).toContainText("Yes, and");
+ await expect(card.locator("[data-post-words]")).toContainText("the video.");
+ const dom = await card.locator("html").evaluate((el) => el.outerHTML);
+ expect(dom.toLowerCase()).not.toContain("here is");
+ expect(await card.locator("[data-post-blanked]").evaluate((el) => el.textContent)).toBe("");
+ if (SHOTS) await page.screenshot({ path: path.join(SHOTS, "post-items-as-published.png") });
+ // The snapshot is never rewritten.
+ expect(JSON.stringify(timeline())).toContain("here is the video");
+});
+
test("the post bench trims the video attachment and saves it; the cut's seconds follow", async ({ page }) => {
await page.setViewportSize({ width: 1366, height: 1000 });
await page.goto(urls.postBenchHref(PROJECT, "p-vid"));