commit bbf8c567f3e38bc74a5facdf3ffbe1c7fafeb302
parent 6cf9b89f222275d4b9fdfd49a93a6ddb8c494fc4
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);
});