From 32fa1635a7a6f4e6cfa1cba2e1e9bfcf2c33537f Mon Sep 17 00:00:00 2001 From: Coracle-Bot Date: Wed, 9 Sep 2026 15:51:40 +0000 Subject: [PATCH] Scope the home feed assertions to the Network section --- e2e/specs/notifications.spec.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/e2e/specs/notifications.spec.ts b/e2e/specs/notifications.spec.ts index 38fed6f2..47ee171a 100644 --- a/e2e/specs/notifications.spec.ts +++ b/e2e/specs/notifications.spec.ts @@ -460,6 +460,10 @@ test("US-117 read the network feed on home", async ({seed, as}) => { const page = await as(users.alice, "/home") + const network = page + .locator("section") + .filter({has: page.getByRole("heading", {name: "Network"})}) + await expect(page.getByRole("heading", {name: "Network"})).toBeVisible() await expect(page.getByText(note)).toBeVisible() @@ -468,18 +472,16 @@ test("US-117 read the network feed on home", async ({seed, as}) => { await expect(page.getByRole("button", {name: "1 reply", exact: true})).toBeVisible() await expect(page.getByText(reply)).toHaveCount(0) - // The count is there whether or not anybody replied, so every note reads the same. + // The count is there whether or not anybody replied, so every post reads the same. await expect(page.getByText(quiet)).toBeVisible() - await expect(page.getByRole("button", {name: "0 replies"})).toBeVisible() + await expect( + network.locator(".card").filter({hasText: quiet}).getByRole("button", {name: "0 replies"}), + ).toBeVisible() // The feed carries every kind of post a follow writes, not only their notes. - await expect(page.getByText(topic)).toBeVisible() + await expect(network.getByText(topic)).toBeVisible() // Every card says when it was posted. - const network = page - .locator("section") - .filter({has: page.getByRole("heading", {name: "Network"})}) - await expect(network.getByRole("button", {name: /\d+\/\d+\/\d+/}).first()).toBeVisible() })