Archilyzer · Source

archilyzer

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

commit f78203686fe5bbdbfd3f92bc87dd0de68d434256
parent dd0b8836517d4118f73a418fb31c91f518ca847f
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 17 Nov 2026 18:19:25 -0500

reads-find.spec: a replace from a filtered view rewrites only the rows its Find counted (review 2, N1)

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
Mumtool/e2e/reads-find.spec.ts | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/umtool/e2e/reads-find.spec.ts b/umtool/e2e/reads-find.spec.ts @@ -228,6 +228,26 @@ test("MUST 1: a filtered view (one character's stale reads) re-reads ONLY its ro expect(ttsAsks().slice(asksBefore).some((a) => /pier reopened/.test(a.text ?? ""))).toBe(false); }); +test("N1: a replace from a filtered view rewrites ONLY the rows its Find counted there", async ({ page }) => { + const before = JSON.parse(readFileSync(MANIFEST, "utf8")) as { timeline: Array<{ id: string; narration?: { text?: string } }> }; + await page.goto(urls.readsHref(P, { character: "ferry" })); + const panel = page.locator(`[data-reads="${P}"]`); + await expect(panel.locator('[data-read="c-1"]')).toHaveCount(0, { timeout: 30_000 }); + await panel.getByLabel("Find in spoken text").fill("north pier"); + await expect(panel.locator("[data-reads-found]")).toContainText("2 matches in 1 line"); + await panel.getByLabel("Replace with").fill("northern pier"); + await panel.getByRole("button", { name: "Replace in these reads" }).click(); + const preview = panel.locator('[data-reads-preview="reads"]'); + await expect(preview.locator("[data-reads-preview-line]")).toHaveCount(1); + await expect(preview.locator('[data-reads-preview-line="p-1"]')).toBeVisible(); + await panel.getByRole("button", { name: "Apply the replace" }).click(); + await expect(panel.locator('[data-reads-undo="reads"]')).toBeVisible(); + const m = JSON.parse(readFileSync(MANIFEST, "utf8")) as { timeline: Array<{ id: string; narration?: { text?: string; script?: string }; screens?: Array<{ saidAs?: unknown }> }> }; + expect(m.timeline.find((e) => e.id === "p-1")?.narration?.script).toContain("northern pier"); + expect(m.timeline.find((e) => e.id === "c-1")?.narration?.text).toBe(before.timeline.find((e) => e.id === "c-1")?.narration?.text); + expect(m.timeline.find((e) => e.id === "p-4")?.screens?.[0].saidAs).toBeUndefined(); +}); + test("the bench links here: the Voices page and a post's bench", async ({ page }) => { await page.goto(urls.voicesHref(P)); await expect(page.locator("[data-voices-reads]").first()).toHaveAttribute("href", urls.readsHref(P));