From e79255e23b69a5b7825aa03d8ccffe8248944723 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 30 Apr 2026 16:02:04 +0200 Subject: [PATCH 1/2] fix accept call with latest web --- playwright/widget/simple-create.spec.ts | 2 +- playwright/widget/test-helpers.ts | 26 +++++++++++++++++++++++-- playwright/widget/voice-call-dm.spec.ts | 6 +++--- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/playwright/widget/simple-create.spec.ts b/playwright/widget/simple-create.spec.ts index 31afb31e..a21da44c 100644 --- a/playwright/widget/simple-create.spec.ts +++ b/playwright/widget/simple-create.spec.ts @@ -45,7 +45,7 @@ widgetTest("Start a new call as widget", async ({ asWidget, browserName }) => { ).toBeVisible(); // Join from the other side - await TestHelpers.joinCallInCurrentRoom(whistler.page); + await TestHelpers.joinCallInCurrentDM(whistler.page); // Currently disabled due to recent Element Web is bypassing Lobby // await expect( diff --git a/playwright/widget/test-helpers.ts b/playwright/widget/test-helpers.ts index 9167412e..f86c9654 100644 --- a/playwright/widget/test-helpers.ts +++ b/playwright/widget/test-helpers.ts @@ -54,12 +54,34 @@ export class TestHelpers { .click(); } + public static async joinCallInCurrentDM( + page: Page, + audioOnly: boolean = false, + ): Promise { + await this.joinCallInRoom(page, audioOnly, true); + } + public static async joinCallInCurrentRoom( page: Page, audioOnly: boolean = false, ): Promise { - // This is the header button that notifies about an ongoing call - const label = audioOnly ? "Voice call started" : "Video call started"; + await this.joinCallInRoom(page, audioOnly, false); + } + + public static async joinCallInRoom( + page: Page, + audioOnly: boolean = false, + isDM: boolean = false, + ): Promise { + // XXX This using the notification toast to join the room. + // Not the button in the header + + await page.waitForTimeout(3000); + const label = isDM + ? audioOnly + ? "Incoming voice call" + : "Incoming video call" + : "Group call started"; await expect(page.getByText(label)).toBeVisible({ timeout: 10000, }); diff --git a/playwright/widget/voice-call-dm.spec.ts b/playwright/widget/voice-call-dm.spec.ts index 7a13c58b..d540e45e 100644 --- a/playwright/widget/voice-call-dm.spec.ts +++ b/playwright/widget/voice-call-dm.spec.ts @@ -41,7 +41,7 @@ widgetTest( ).toBeVisible(); await expect(whistler.page.getByText("Incoming voice call")).toBeVisible(); - await whistler.page.getByRole("button", { name: "Accept" }).click(); + await whistler.page.getByRole("button", { name: "Join" }).click(); await expect( whistler.page.locator('iframe[title="Element Call"]'), @@ -132,7 +132,7 @@ widgetTest( ).toBeVisible(); await expect(whistler.page.getByText("Incoming video call")).toBeVisible(); - await whistler.page.getByRole("button", { name: "Accept" }).click(); + await whistler.page.getByRole("button", { name: "Join" }).click(); await expect( whistler.page.locator('iframe[title="Element Call"]'), @@ -217,7 +217,7 @@ widgetTest( ).toBeVisible(); await expect(whistler.page.getByText("Incoming video call")).toBeVisible(); - await whistler.page.getByRole("button", { name: "Decline" }).click(); + await whistler.page.getByRole("button", { name: "Ignore" }).click(); await expect( whistler.page.locator('iframe[title="Element Call"]'), From 09fc38930f55950f47d45aa6f1ad8765bdf7d0ff Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 30 Apr 2026 17:07:13 +0200 Subject: [PATCH 2/2] fixup --- playwright/widget/simple-create.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright/widget/simple-create.spec.ts b/playwright/widget/simple-create.spec.ts index a21da44c..31afb31e 100644 --- a/playwright/widget/simple-create.spec.ts +++ b/playwright/widget/simple-create.spec.ts @@ -45,7 +45,7 @@ widgetTest("Start a new call as widget", async ({ asWidget, browserName }) => { ).toBeVisible(); // Join from the other side - await TestHelpers.joinCallInCurrentDM(whistler.page); + await TestHelpers.joinCallInCurrentRoom(whistler.page); // Currently disabled due to recent Element Web is bypassing Lobby // await expect(