diff --git a/playwright/e2e/read-receipts/index.ts b/playwright/e2e/read-receipts/index.ts index 47bd5c2d5c..f097ec839d 100644 --- a/playwright/e2e/read-receipts/index.ts +++ b/playwright/e2e/read-receipts/index.ts @@ -395,6 +395,9 @@ class Helpers { */ async closeThreadsPanel() { await this.page.locator(".mx_RoomHeader").getByLabel("Threads").click(); + if (await this.page.locator("#thread-panel").isVisible()) { + await this.page.locator(".mx_RoomHeader").getByLabel("Threads").click(); + } await expect(this.page.locator(".mx_RightPanel")).not.toBeVisible(); } diff --git a/src/components/views/rooms/RoomHeader.tsx b/src/components/views/rooms/RoomHeader.tsx index 6e04a60601..b09d4c70e2 100644 --- a/src/components/views/rooms/RoomHeader.tsx +++ b/src/components/views/rooms/RoomHeader.tsx @@ -255,7 +255,7 @@ export default function RoomHeader({