Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading