DRY
This commit is contained in:
@@ -65,7 +65,7 @@ test.describe("Widget Lifecycle", () => {
|
||||
});
|
||||
|
||||
test("auto-approves preload and identity", async ({ page, user, homeserver }, testInfo) => {
|
||||
rejectToastIfExists(page, "Verify this device");
|
||||
await rejectToastIfExists(page, "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
|
||||
@@ -123,7 +123,7 @@ test.describe("Widget Lifecycle", () => {
|
||||
});
|
||||
|
||||
test("prompts for capabilities not in the allowlist", async ({ page, user, homeserver }, testInfo) => {
|
||||
rejectToastIfExists(page, "Verify this device");
|
||||
await rejectToastIfExists(page, "Verify this device");
|
||||
|
||||
const bot = await homeserver.registerUser(`bot_${testInfo.testId}`, "password", "Bot");
|
||||
const { room_id: roomId } = await homeserver.csApi.request<{ room_id: string }>(
|
||||
@@ -186,7 +186,7 @@ test.describe("Widget Lifecycle", () => {
|
||||
user,
|
||||
homeserver,
|
||||
}, testInfo) => {
|
||||
rejectToastIfExists(page, "Verify this device");
|
||||
await rejectToastIfExists(page, "Verify this device");
|
||||
|
||||
const bot = await homeserver.registerUser(`bot_${testInfo.testId}`, "password", "Bot");
|
||||
const { room_id: roomId } = await homeserver.csApi.request<{ room_id: string }>(
|
||||
|
||||
Reference in New Issue
Block a user