mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
test(e2e): drop the cycle route handlers before teardown closes the page
This commit is contained in:
1 parent
ec49157e85
commit
c506b72002
1 file changed
+8
@@ -175,6 +175,14 @@ test.describe("cycle + insights mobile smoke", () => {
|
||||
);
|
||||
});
|
||||
|
||||
// These handlers call route.fetch(), which needs a live page. Teardown can
|
||||
// close the context while one is still in flight, and the rejected fetch
|
||||
// then fails a test that had already passed. Drop the handlers first so
|
||||
// nothing is left racing the close.
|
||||
test.afterEach(async ({ page }) => {
|
||||
await page.unrouteAll({ behavior: "ignoreErrors" });
|
||||
});
|
||||
|
||||
test("/insights has no horizontal scroll on Pixel-5", async ({ page }) => {
|
||||
await page.goto("/insights", { waitUntil: "domcontentloaded" });
|
||||
await page.waitForLoadState("networkidle");
|
||||
|
||||
Reference in new issue
Block a user