commit 8b61a65f1c2719efccf02401a003b01a07bde694
parent d3fdb7fdf6899c5bfb140b6b9cc20923dd90b6f4
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 5 Oct 2026 07:23:00 -0400
e2e: export-search's filter checkboxes are located by exact name (a result titled with a filter's word has its own checkbox)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/editor/e2e/export-search.spec.ts b/editor/e2e/export-search.spec.ts
@@ -344,15 +344,15 @@ test.describe("export TranscriptSearch — query builder + filter layout", () =>
page.getByText("Availability", { exact: true }),
).toBeVisible();
- await expect(page.getByRole("checkbox", { name: "Videos" })).toBeChecked();
+ await expect(page.getByRole("checkbox", { name: "Videos", exact: true })).toBeChecked();
await expect(
- page.getByRole("checkbox", { name: "Available" }),
+ page.getByRole("checkbox", { name: "Available", exact: true }),
).toBeChecked();
await expect(
- page.getByRole("checkbox", { name: "Unlisted" }),
+ page.getByRole("checkbox", { name: "Unlisted", exact: true }),
).toBeChecked();
await expect(
- page.getByRole("checkbox", { name: "Deleted" }),
+ page.getByRole("checkbox", { name: "Deleted", exact: true }),
).toBeChecked();
});
@@ -378,7 +378,7 @@ test.describe("export TranscriptSearch — query builder + filter layout", () =>
resultCard(page, /Vanished video on aquatic life.*Test Channel/),
).toBeVisible();
- await page.getByRole("checkbox", { name: "Deleted" }).uncheck();
+ await page.getByRole("checkbox", { name: "Deleted", exact: true }).uncheck();
await page.getByTestId("search-submit").click();
await expect(
@@ -394,7 +394,7 @@ test.describe("export TranscriptSearch — query builder + filter layout", () =>
page,
}) => {
await search(page, "platypus");
- await page.getByRole("checkbox", { name: "Available" }).uncheck();
+ await page.getByRole("checkbox", { name: "Available", exact: true }).uncheck();
await page.getByTestId("search-submit").click();
// Deleted + unlisted matches remain (separate buckets).
@@ -423,7 +423,7 @@ test.describe("export TranscriptSearch — query builder + filter layout", () =>
resultCard(page, /Hidden mammal documentary.*Test Channel/),
).toBeVisible();
- await page.getByRole("checkbox", { name: "Unlisted" }).uncheck();
+ await page.getByRole("checkbox", { name: "Unlisted", exact: true }).uncheck();
await page.getByTestId("search-submit").click();
await expect(
@@ -507,7 +507,7 @@ test.describe("export TranscriptSearch — advanced options persistence", () =>
test("Advanced reset does not touch filter checkboxes", async ({ page }) => {
await search(page, "platypus");
- await page.getByRole("checkbox", { name: "Deleted" }).uncheck();
+ await page.getByRole("checkbox", { name: "Deleted", exact: true }).uncheck();
await page.locator("summary").filter({ hasText: "Advanced options" }).click();
const maxHits = page.getByRole("spinbutton", {
name: "Max hits per batch",
@@ -519,7 +519,7 @@ test.describe("export TranscriptSearch — advanced options persistence", () =>
await expect(maxHits).toHaveValue("500");
await expect(
- page.getByRole("checkbox", { name: "Deleted" }),
+ page.getByRole("checkbox", { name: "Deleted", exact: true }),
).not.toBeChecked();
});
});
@@ -532,7 +532,7 @@ test.describe("export TranscriptSearch — filters collapse persistence", () =>
});
test("filters section is open by default", async ({ page }) => {
- await expect(page.getByRole("checkbox", { name: "Videos" })).toBeVisible();
+ await expect(page.getByRole("checkbox", { name: "Videos", exact: true })).toBeVisible();
const summary = page.locator("summary").filter({ hasText: "Filters" });
await expect(summary).toBeVisible();
await expect(summary.locator("xpath=..")).toHaveJSProperty("open", true);
@@ -543,7 +543,7 @@ test.describe("export TranscriptSearch — filters collapse persistence", () =>
}) => {
const summary = page.locator("summary").filter({ hasText: "Filters" });
await summary.click();
- await expect(page.getByRole("checkbox", { name: "Videos" })).toBeHidden();
+ await expect(page.getByRole("checkbox", { name: "Videos", exact: true })).toBeHidden();
await expect(summary).toContainText(/\d+ of \d+ channel/);
const compactList = page.getByTestId("filters-summary-channels");
await expect(compactList).toBeVisible();
@@ -552,17 +552,17 @@ test.describe("export TranscriptSearch — filters collapse persistence", () =>
test("collapse state persists across reload", async ({ page }) => {
await page.locator("summary").filter({ hasText: "Filters" }).click();
- await expect(page.getByRole("checkbox", { name: "Videos" })).toBeHidden();
+ await expect(page.getByRole("checkbox", { name: "Videos", exact: true })).toBeHidden();
await page.reload();
await waitForHydration(page);
- await expect(page.getByRole("checkbox", { name: "Videos" })).toBeHidden();
+ await expect(page.getByRole("checkbox", { name: "Videos", exact: true })).toBeHidden();
await page.locator("summary").filter({ hasText: "Filters" }).click();
- await expect(page.getByRole("checkbox", { name: "Videos" })).toBeVisible();
+ await expect(page.getByRole("checkbox", { name: "Videos", exact: true })).toBeVisible();
await page.reload();
await waitForHydration(page);
- await expect(page.getByRole("checkbox", { name: "Videos" })).toBeVisible();
+ await expect(page.getByRole("checkbox", { name: "Videos", exact: true })).toBeVisible();
});
});
@@ -663,7 +663,7 @@ test.describe("export TranscriptSearch — deferred search submit", () => {
await expect(deletedVideo).toBeVisible();
// Toggle "Deleted" off — the result is STILL rendered (deferred commit).
- await page.getByRole("checkbox", { name: "Deleted" }).uncheck();
+ await page.getByRole("checkbox", { name: "Deleted", exact: true }).uncheck();
await expect(deletedVideo).toBeVisible();
// Dirty hint appears.
@@ -690,7 +690,7 @@ test.describe("export TranscriptSearch — deferred search submit", () => {
// Button drives the primary style.
await expect(searchBtn).toHaveAttribute("data-dirty", "false");
- await page.getByRole("checkbox", { name: "Deleted" }).uncheck();
+ await page.getByRole("checkbox", { name: "Deleted", exact: true }).uncheck();
// Dirty: primary CTA.
await expect(searchBtn).toHaveAttribute("data-dirty", "true");