Change all toast rejection code to use the rejectToast utility (#33025)

This commit is contained in:
Andy Balaam
2026-05-18 16:31:52 +00:00
committed by GitHub
parent d40fe81616
commit 5be0b778db
29 changed files with 150 additions and 107 deletions
@@ -6,6 +6,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/
import { rejectToast } from "@element-hq/element-web-playwright-common";
import { test, expect } from "../../element-web-test";
import { waitForRoom } from "../utils";
import { Filter } from "../../pages/Spotlight";
@@ -19,7 +21,7 @@ test.describe("Create Knock Room", () => {
});
test("should create a knock room", async ({ page, app, user }) => {
await app.closeVerifyToast();
await rejectToast(page, "Verify this device");
const dialog = await app.openCreateRoomDialog();
await dialog.getByRole("textbox", { name: "Name" }).fill("Cybersecurity");
@@ -39,7 +41,7 @@ test.describe("Create Knock Room", () => {
});
test("should create a room and change a join rule to knock", async ({ page, app, user }) => {
await app.closeVerifyToast();
await rejectToast(page, "Verify this device");
const dialog = await app.openCreateRoomDialog();
await dialog.getByRole("textbox", { name: "Name" }).fill("Cybersecurity");
@@ -63,7 +65,7 @@ test.describe("Create Knock Room", () => {
});
test("should create a public knock room", async ({ page, app, user }) => {
await app.closeVerifyToast();
await rejectToast(page, "Verify this device");
const dialog = await app.openCreateRoomDialog();
await dialog.getByRole("textbox", { name: "Name" }).fill("Cybersecurity");