Merge pull request #282 from trails-cool/fix/e2e-poi-proxy-mock

Fix POI E2E test: mock the planner proxy, not upstream Overpass
This commit is contained in:
Ullrich Schäfer 2026-04-19 21:51:11 +02:00 committed by GitHub
commit 72fb78dbb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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