From e90c5b97e4eae8688c0f89e9567a533789d21b4e Mon Sep 17 00:00:00 2001 From: Codex Review Integration Date: Thu, 10 Sep 2026 17:13:30 -0300 Subject: [PATCH] test(vendors): keep the map preview out of the pixel baselines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The visual suite mocks `**/api/**` and nothing else, so the address map preview's iframe reached maps.google.com for real. Whether that frame paints, and what it paints, depends on the network and on what Google serves that minute — which is why `vendor-edit` failed in CI at 18178 differing pixels while passing in a container that could not reach Google. Regenerating the baseline would not have fixed it; it would have moved the flake. Aborting the request pins the frame to a blank box, so the shot measures our layout and nothing else. The committed baselines are unchanged by this — they were already correct — and a second container run with no --update passes 16/16, which is the evidence the shot is now stable rather than merely green once. --- e2e/vendors/vendors.visual.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/e2e/vendors/vendors.visual.spec.ts b/e2e/vendors/vendors.visual.spec.ts index 705c4f4e..94ba0c69 100644 --- a/e2e/vendors/vendors.visual.spec.ts +++ b/e2e/vendors/vendors.visual.spec.ts @@ -70,6 +70,13 @@ async function mockVendorApi(page: Page, mode: "default" | "empty" | "error" = " await page.clock.setFixedTime(new Date("2026-08-10T12:00:00.000Z")); await page.addInitScript((user) => localStorage.setItem("auth", JSON.stringify(user)), TEST_USER); + // The vendor address map preview embeds maps.google.com in an iframe. Its + // content depends on the network, on timing, and on whatever Google serves + // that minute, none of which belongs in a test with "deterministic pixel + // regression" in its name. Aborting the request pins the frame to a blank + // box, so the shot measures our layout and nothing else. + await page.route(/https:\/\/(www\.)?google\.com\/maps/, (route) => route.abort()); + await page.route("**/api/**", async (route) => { const request = route.request(); const url = new URL(request.url());