Playwright: clean up after verification test, to deflake later tests (#30425)

This commit is contained in:
Richard van der Hoff
2025-07-30 13:11:14 +01:00
committed by GitHub
parent ee120f2fa9
commit 452996eacf

View File

@@ -124,6 +124,10 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
const toasts = new Toasts(page);
await toasts.rejectToast("Notifications");
await toasts.assertNoToasts();
// There may still be a `/sendToDevice/m.secret.request` in flight, which will later throw an error and cause
// a *subsequent* test to fail. Tell playwright to ignore any errors resulting from in-flight routes.
await page.unrouteAll({ behavior: "ignoreErrors" });
});
test("Verify device with QR code during login", async ({ page, app, credentials, homeserver }) => {