From a15209e176ad66d21244d7e6173657bcb2ef4d76 Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Sun, 5 Jul 2026 11:04:09 -0500 Subject: [PATCH] test(blog): assert Read more link is present in the first card --- tests/blog-page.spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/blog-page.spec.js b/tests/blog-page.spec.js index 64274f5..b351196 100644 --- a/tests/blog-page.spec.js +++ b/tests/blog-page.spec.js @@ -34,6 +34,12 @@ test.describe("blog page", () => { await expect(firstCard.locator(".post-list__title")).toBeVisible(); await expect(firstCard.locator(".post-list__byline")).toBeVisible(); + // First card has a "Read more" link. + const readMore = firstCard.locator(".post-list__read-more"); + await expect(readMore).toBeVisible(); + await expect(readMore).toHaveText(/^Read more\s*\S+$/); + await expect(readMore).toHaveAttribute("href", /\/[a-z0-9-]+\/?$/); + // First card does NOT have a categories row or an excerpt. expect(await firstCard.locator(".post-list__cats").count()).toBe(0); expect(await firstCard.locator(".post-list__excerpt").count()).toBe(0);