Fix POI E2E test: mock the planner proxy, not upstream Overpass
The test was added in0ff04aa(Apr 11), back when the browser called overpass-api.de directly. Whena4df5a4(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:
parent
88c83e359b
commit
9c9d53d3bd
1 changed files with 4 additions and 2 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue