commit 4680e85e2943632d2a9ebfc4f8ab41867a646ce6
parent 626ced7ae44a78464ff4cef9c3f2c5ad5ec40e5b
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Sat, 26 Sep 2026 21:48:00 -0400
homepage: e2e — the Ko-fi row is found by :has, the footer holds more than one list
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/homepage/e2e/marketing.spec.ts b/homepage/e2e/marketing.spec.ts
@@ -140,9 +140,11 @@ test("the footer's social row ends with the Ko-fi mark", async ({ page }) => {
await expect(img).toHaveAttribute("src", "/kofi-symbol.svg");
await expect(img).toHaveAttribute("alt", "");
expect(await img.evaluate((el) => (el as HTMLImageElement).naturalWidth)).toBeGreaterThan(0);
- // Last in the row.
- const items = footer.locator("ul").filter({ has: kofi }).locator("li");
- await expect(items.last().getByRole("link", { name: "Ko-fi", exact: true })).toHaveCount(1);
+ // Last in the row (the footer has more than one list; pick the one that
+ // holds the mark).
+ const row = footer.locator("ul:has(a[aria-label='Ko-fi'])");
+ await expect(row).toHaveCount(1);
+ await expect(row.locator("li").last().locator("a[aria-label='Ko-fi']")).toHaveCount(1);
// No other Ko-fi link anywhere on the page.
await expect(page.locator(`a[href="${KOFI_URL}"]`)).toHaveCount(1);
});