diff --git a/modules/widget-lifecycle/element-web/e2e/widget-lifecycle.spec.ts b/modules/widget-lifecycle/element-web/e2e/widget-lifecycle.spec.ts index 83ad62ec65..36022edbf5 100644 --- a/modules/widget-lifecycle/element-web/e2e/widget-lifecycle.spec.ts +++ b/modules/widget-lifecycle/element-web/e2e/widget-lifecycle.spec.ts @@ -63,7 +63,9 @@ test.describe("Widget Lifecycle", () => { }, }); - test("auto-approves preload and identity", async ({ page, user, homeserver }, testInfo) => { + test("auto-approves preload and identity", async ({ page, user, homeserver, toasts }, testInfo) => { + toasts.rejectToastIfExists("Verify this device"); + // A bot creates a room with the widget pinned to the top panel, then invites the test user. // Because the widget was added by a different user (the bot), Element would normally show a // preload consent dialog before loading it — this test verifies that dialog is skipped. @@ -119,7 +121,9 @@ test.describe("Widget Lifecycle", () => { ).toBeVisible(); }); - test("prompts for capabilities not in the allowlist", async ({ page, user, homeserver }, testInfo) => { + test("prompts for capabilities not in the allowlist", async ({ page, user, homeserver, toasts }, testInfo) => { + toasts.rejectToastIfExists("Verify this device"); + const bot = await homeserver.registerUser(`bot_${testInfo.testId}`, "password", "Bot"); const { room_id: roomId } = await homeserver.csApi.request<{ room_id: string }>( "POST", @@ -180,7 +184,10 @@ test.describe("Widget Lifecycle", () => { page, user, homeserver, + toasts, }, testInfo) => { + toasts.rejectToastIfExists("Verify this device"); + const bot = await homeserver.registerUser(`bot_${testInfo.testId}`, "password", "Bot"); const { room_id: roomId } = await homeserver.csApi.request<{ room_id: string }>( "POST",