Fix POI E2E test: mock the planner proxy, not upstream Overpass

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) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-04-19 21:48:21 +02:00
parent 88c83e359b
commit 9c9d53d3bd
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -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",