From d6ba53bc255cd84659d30f2e3c8610b05709db3b Mon Sep 17 00:00:00 2001 From: leemour Date: Mon, 5 Oct 2026 00:17:09 +0200 Subject: [PATCH] test: clean up analytics routes before browser teardown --- tests/mobile-delivery.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/mobile-delivery.spec.ts b/tests/mobile-delivery.spec.ts index 1753ab1..54b8c5c 100644 --- a/tests/mobile-delivery.spec.ts +++ b/tests/mobile-delivery.spec.ts @@ -66,6 +66,7 @@ test("analytics queues initial views and navigation before idle provider downloa await page.reload() await expect.poll(async () => (await queued()).ym.filter((item) => item[1] === "hit").length).toBe(1) expect((await queued()).ga.filter((item) => item[0] === "config")).toHaveLength(1) + await page.context().unrouteAll({ behavior: "ignoreErrors" }) }) test("blocked analytics providers leave landing interactions usable", async ({ page, baseURL }) => { @@ -84,6 +85,7 @@ test("blocked analytics providers leave landing interactions usable", async ({ p await expect(page.locator("h1")).toBeVisible() await expect(page).toHaveURL("https://wirecat.dev/en/about") expect(errors).toEqual([]) + await page.unrouteAll({ behavior: "ignoreErrors" }) }) for (const lang of ["en", "ru", "es"]) {