From d0e19d3e03d9a01533fa6ce4613bcc83d64c2550 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Wed, 4 Dec 2024 09:42:37 +0100 Subject: [PATCH] Fix TAC `should mark all threads as read` e2e test (#28625) --- playwright/e2e/spaces/threads-activity-centre/index.ts | 4 ++-- .../threads-activity-centre/threadsActivityCentre.spec.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/playwright/e2e/spaces/threads-activity-centre/index.ts b/playwright/e2e/spaces/threads-activity-centre/index.ts index f6ac7f95d6..b2b8473640 100644 --- a/playwright/e2e/spaces/threads-activity-centre/index.ts +++ b/playwright/e2e/spaces/threads-activity-centre/index.ts @@ -276,7 +276,7 @@ export class Helpers { * Assert that the threads activity centre button has no indicator */ async assertNoTacIndicator() { - // Assert by checkng neither of the known indicators are visible first. This will wait + // Assert by checking neither of the known indicators are visible first. This will wait // if it takes a little time to disappear, but the screenshot comparison won't. await expect(this.getTacButton().locator("[data-indicator='success']")).not.toBeVisible(); await expect(this.getTacButton().locator("[data-indicator='critical']")).not.toBeVisible(); @@ -376,7 +376,7 @@ export class Helpers { * Clicks the button to mark all threads as read in the current room */ clickMarkAllThreadsRead() { - return this.page.getByLabel("Mark all as read").click(); + return this.page.locator("#thread-panel").getByRole("button", { name: "Mark all as read" }).click(); } } diff --git a/playwright/e2e/spaces/threads-activity-centre/threadsActivityCentre.spec.ts b/playwright/e2e/spaces/threads-activity-centre/threadsActivityCentre.spec.ts index fc66c13520..452c9a520a 100644 --- a/playwright/e2e/spaces/threads-activity-centre/threadsActivityCentre.spec.ts +++ b/playwright/e2e/spaces/threads-activity-centre/threadsActivityCentre.spec.ts @@ -146,7 +146,7 @@ test.describe("Threads Activity Centre", () => { await util.openTac(); await util.clickRoomInTac(room1.name); - util.clickMarkAllThreadsRead(); + await util.clickMarkAllThreadsRead(); await util.assertNoTacIndicator(); });