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:
commit
72fb78dbb2
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 sessionResp = await request.post("/api/sessions", { data: {} });
|
||||||
const { url } = await sessionResp.json();
|
const { url } = await sessionResp.json();
|
||||||
|
|
||||||
// Mock Overpass API to return a test POI at the map center
|
// The browser queries POIs through the planner's `/api/overpass`
|
||||||
await page.route("**/api/interpreter", async (route) => {
|
// 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({
|
await route.fulfill({
|
||||||
status: 200,
|
status: 200,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue