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 83ad62ec..36022edb 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", diff --git a/package.json b/package.json index 9d41d8bd..c3fee019 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@action-validator/cli": "^0.6.0", "@action-validator/core": "^0.6.0", "@element-hq/element-web-module-api": "*", - "@element-hq/element-web-playwright-common": "^3.0.0", + "@element-hq/element-web-playwright-common": "^3.1.0", "@playwright/test": "^1.52.0", "@stylistic/eslint-plugin": "^5.0.0", "@types/node": "^22.12.0", diff --git a/yarn.lock b/yarn.lock index 47b7c7a3..9683118a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -552,10 +552,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz#bbe12dca5b4ef983a0d0af4b07b9bc90ea0ababa" integrity sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA== -"@element-hq/element-web-playwright-common@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@element-hq/element-web-playwright-common/-/element-web-playwright-common-3.0.0.tgz#67537b55013275538765cb02add3d1d01b868f39" - integrity sha512-oQFsfP1uVJTOGnbN/jzPpOfRAQ7las0Dsv7EsuKO3Iz+LnllEam5vXqvKAcXQyH7mj6csvSdRE75Dp6K0+ZS1g== +"@element-hq/element-web-playwright-common@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@element-hq/element-web-playwright-common/-/element-web-playwright-common-3.1.0.tgz#fa80f14ec17a5ab77a9d8a0ab88458113d20bc4a" + integrity sha512-5mChlmiYzEwDnak5tY9zTWFRzzmOI8DerLkGjsnbGcNGJFfJCCNP0IRCzBVIw2mn5UsainweZp3qfyUzowK9FQ== dependencies: "@axe-core/playwright" "^4.10.1" "@testcontainers/postgresql" "^11.0.0"