Fix TAC `should mark all threads as read` e2e test (#28625)

pull/28633/head
Florian Duros 2024-12-04 09:42:37 +01:00 committed by GitHub
parent b016cf59e9
commit d0e19d3e03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -276,7 +276,7 @@ export class Helpers {
* Assert that the threads activity centre button has no indicator * Assert that the threads activity centre button has no indicator
*/ */
async assertNoTacIndicator() { 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. // 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='success']")).not.toBeVisible();
await expect(this.getTacButton().locator("[data-indicator='critical']")).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 * Clicks the button to mark all threads as read in the current room
*/ */
clickMarkAllThreadsRead() { clickMarkAllThreadsRead() {
return this.page.getByLabel("Mark all as read").click(); return this.page.locator("#thread-panel").getByRole("button", { name: "Mark all as read" }).click();
} }
} }

View File

@ -146,7 +146,7 @@ test.describe("Threads Activity Centre", () => {
await util.openTac(); await util.openTac();
await util.clickRoomInTac(room1.name); await util.clickRoomInTac(room1.name);
util.clickMarkAllThreadsRead(); await util.clickMarkAllThreadsRead();
await util.assertNoTacIndicator(); await util.assertNoTacIndicator();
}); });