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
+6 -4
View File
@@ -5,6 +5,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 { assertNoToasts, rejectToast } from "@element-hq/element-web-playwright-common";
import { test, expect } from "../../element-web-test";
test.describe("PSTN", () => {
@@ -20,10 +22,10 @@ test.describe("PSTN", () => {
});
});
test("should render dialpad as expected", { tag: "@screenshot" }, async ({ page, user, toasts }) => {
await toasts.rejectToast("Verify this device");
await toasts.rejectToast("Notifications");
await toasts.assertNoToasts();
test("should render dialpad as expected", { tag: "@screenshot" }, async ({ page, user }) => {
await rejectToast(page, "Verify this device");
await rejectToast(page, "Notifications");
await assertNoToasts(page);
await expect(page.getByTestId("room-list-search")).toMatchScreenshot("dialpad-trigger.png");
await page.getByLabel("Open dial pad").click();