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

This commit is contained in:
Andy Balaam
2026-05-18 17:31:52 +01:00
committed by GitHub
parent d40fe81616
commit 5be0b778db
29 changed files with 150 additions and 107 deletions
@@ -6,6 +6,7 @@
*/
import { type Page } from "@playwright/test";
import { rejectToast } from "@element-hq/element-web-playwright-common";
import { expect, test } from "../../../element-web-test";
import { assertRoomInSection, getRoomList, getRoomListHeader, getSectionHeader } from "./utils";
@@ -41,9 +42,9 @@ test.describe("Room list custom sections", () => {
}
test.beforeEach(async ({ page, app, user }) => {
// The notification toast is displayed above the search section
await app.closeNotificationToast();
await app.closeVerifyToast();
// The toasts are displayed above the search section
await rejectToast(page, "Notifications");
await rejectToast(page, "Verify this device");
// Focus the user menu to avoid hover decoration
await page.getByRole("button", { name: "User menu" }).focus();