From 9c9d53d3bdd061ec4b19de07f7e4c2cfb63e0305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Sun, 19 Apr 2026 21:48:21 +0200 Subject: [PATCH] Fix POI E2E test: mock the planner proxy, not upstream Overpass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test was added in 0ff04aa (Apr 11), back when the browser called overpass-api.de directly. When a4df5a4 (Apr 18) moved POI queries behind the planner's `/api/overpass` proxy, the test's `page.route("**/api/interpreter", ...)` mock became dead code — Playwright can only intercept browser traffic, and the browser now only sees `/api/overpass`. The real upstream got hit and didn't return a drinking_water node at exactly 52.52, 13.405, so zero markers rendered and the test failed. Mock `/api/overpass` instead. Response body shape is unchanged (the proxy is transparent). Co-Authored-By: Claude Opus 4.7 (1M context) --- e2e/planner.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e2e/planner.test.ts b/e2e/planner.test.ts index 05db769..ad419c4 100644 --- a/e2e/planner.test.ts +++ b/e2e/planner.test.ts @@ -421,8 +421,10 @@ test.describe("Planner", () => { const sessionResp = await request.post("/api/sessions", { data: {} }); const { url } = await sessionResp.json(); - // Mock Overpass API to return a test POI at the map center - await page.route("**/api/interpreter", async (route) => { + // The browser queries POIs through the planner's `/api/overpass` + // proxy (not the upstream Overpass directly), so that's what we + // intercept here. Response body is the same Overpass JSON shape. + await page.route("**/api/overpass", async (route) => { await route.fulfill({ status: 200, contentType: "application/json",