From cbc4b77a4f80e8f7239e6fde23484e46dffcbb20 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Thu, 2 Jul 2026 11:17:46 +0200 Subject: [PATCH] Dismiss Element Web release announcements --- playwright/fixtures/widget-user.ts | 5 +++++ playwright/widget/test-helpers.ts | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/playwright/fixtures/widget-user.ts b/playwright/fixtures/widget-user.ts index 68aef8d93..2c43ee1b3 100644 --- a/playwright/fixtures/widget-user.ts +++ b/playwright/fixtures/widget-user.ts @@ -120,6 +120,11 @@ export const widgetTest = test.extend({ .getByRole("heading", { name: "Welcome Room" }), ).toBeVisible(); } else if (callType === "dm") { + await TestHelpers.closeReleaseAnnouncement( + ewPage1, + "Introducing Sections", + ); + await ewPage1 .getByRole("navigation", { name: "Room list" }) .getByRole("button", { name: "New conversation" }) diff --git a/playwright/widget/test-helpers.ts b/playwright/widget/test-helpers.ts index 023c9f2b4..b2a238f81 100644 --- a/playwright/widget/test-helpers.ts +++ b/playwright/widget/test-helpers.ts @@ -190,11 +190,27 @@ export class TestHelpers { } } + public static async closeReleaseAnnouncement( + page: Page, + name: string, + ): Promise { + try { + await page + .getByRole("dialog", { name }) + .getByRole("button", { name: "OK" }) + .click({ timeout: 2000 }); + } catch { + // Announcement not shown; nothing to do + } + } + public static async createRoom( name: string, page: Page, andInvite: string[] = [], ): Promise { + await TestHelpers.closeReleaseAnnouncement(page, "Introducing Sections"); + await page .getByRole("navigation", { name: "Room list" }) .getByRole("button", { name: "New conversation" })