-
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.
check upload doc navigation and drawgeojson
- Loading branch information
Showing
2 changed files
with
22 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { expect, Page } from "@playwright/test"; | ||
import { Feature } from "geojson"; | ||
|
||
export const checkGeoJsonContent = async (page: Page, geoJson: Feature) => { | ||
export const checkGeoJsonContent = async (page: Page, attribute:"geojsondata" | "drawgeojsondata", geoJson: Feature) => { | ||
// Wait for the map component to be present | ||
const mapComponent = await page.waitForSelector("my-map"); | ||
|
||
// Get the geojsonData attribute | ||
const geojsonData = await mapComponent.getAttribute("geojsondata"); | ||
const geojsonData = await mapComponent.getAttribute(attribute); | ||
|
||
expect(JSON.parse(geojsonData!)).toEqual(geoJson); | ||
}; | ||
|