Use the toasts utils instead of the toasts fixture in playwright tests (#33495)

This commit is contained in:
Andy Balaam
2026-05-18 11:44:08 +00:00
committed by GitHub
parent bf820c5ba4
commit d1a9f95e20
6 changed files with 50 additions and 47 deletions
@@ -4,6 +4,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 { getToast } from "@element-hq/element-web-playwright-common";
import { test, expect } from "../../element-web-test";
test.describe("Room Status Bar", () => {
@@ -39,7 +41,7 @@ test.describe("Room Status Bar", () => {
await expect(banner).toBeVisible({ timeout: 15000 });
await expect(banner).toMatchScreenshot("connectivity_lost.png");
});
test("should NOT an error when a resource limit is hit", async ({ page, user, app, room, axe, toasts }) => {
test("should NOT an error when a resource limit is hit", async ({ page, user, app, room, axe }) => {
await app.viewRoomById(room.roomId);
await page.route("**/_matrix/client/*/sync*", async (route, req) => {
await route.fulfill({
@@ -55,7 +57,7 @@ test.describe("Room Status Bar", () => {
});
await app.client.sendMessage(room.roomId, "forcing sync to run");
// Wait for the MAU warning toast to appear so we know this status bar would have appeared.
await toasts.getToast("Warning", 15000);
await getToast(page, "Warning", 15000);
await expect(page.getByRole("region", { name: "Room status bar" })).not.toBeVisible();
});
test(