-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
102 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Page } from "@playwright/test"; | ||
import { mockPropertyConstraints, mockRoadData } from "./geospatialMocks"; | ||
|
||
export async function setupGISMockResponse(page: Page) { | ||
const gisDigitalLandEndpoint = new RegExp(/\/gis\/E2E\?geom.*/); | ||
const wildcardPattern = "**/gis/E2E?geom*"; | ||
await page.route(wildcardPattern, async (route) => { | ||
await route.fulfill({ | ||
status: 200, | ||
body: JSON.stringify(mockPropertyConstraints), | ||
}); | ||
}); | ||
} | ||
|
||
export async function setupRoadsMockResponse(page: Page) { | ||
const gisRoadsEndpoint = new RegExp(/\/roads\?.*/); | ||
await page.route(gisRoadsEndpoint, async (route) => { | ||
await route.fulfill({ | ||
status: 200, | ||
body: JSON.stringify(mockRoadData), | ||
}); | ||
}); | ||
} |