Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rowanwins/vitest-playwright-mapboxgl
https://github.com/rowanwins/vitest-playwright-mapboxgl
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rowanwins/vitest-playwright-mapboxgl
- Owner: rowanwins
- Created: 2023-06-11T11:38:53.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-06-11T11:45:33.000Z (over 1 year ago)
- Last Synced: 2024-05-27T19:11:09.797Z (5 months ago)
- Language: TypeScript
- Size: 51.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vitest + Playwright + MapboxGL
**Note** Very much a Work In ProgressThis little sample shows using Vitest & Playwright to test a MapboxGL map.
It's similar conceptually to what it shown in the [MapboxGL repo with selenium](https://github.com/mapbox/mapbox-gl-js/tree/main/test/browser).# The critical things
- In `/src/App.vue` we assign our Map instance to a global in our document to make it easily accessible with Playwright.
- Within `/test/maps.test.ts` we can start interacting with the Map instance using `page.evaluate`