I am looking to integrate playwright in my map testing as i built some custom code around core library to take out the human factor, yet I cannot seem to find any documentation so that I can ensure to do it properly.
Is anyone been able to do this successfully and is there any documentation anywhere that can help provide some insights?
We don't have any doc directly for this, but Playwright tests everything in the browser, so you would use Playwrights test method that returns a page method for selection you can use.
https://playwright.dev/docs/api/class-test
I don't have anything on hand to demo, but interaction with map and other widgets/components should be same as other HTML elements. I think trickiest part would be trying "click" on a feature to show popup, that I'm not sure on. But you can use page selectors to click buttons and other bits and test for UI state.
Is there a particular error or workflow you are getting blocked at with it?
We use Playwright for snapshot testing - It requires a bit of fiddling to get ensure that the snapshots are taken in the same container locally and in CI.
Here is our set up: https://github.com/antarctica/embedded-maps
This is a great sample, and has a11y testing! Thank you, always love to see that!