dimfeld / svelte-maplibre

Svelte bindings for the MapLibre mapping library
https://svelte-maplibre.vercel.app
MIT License
318 stars 39 forks source link

WIP: e2e tests #137

Closed pierosavi closed 6 months ago

pierosavi commented 6 months ago

I found this library incredibly helpful, if you find it useful I could help by adding e2e tests for the documentation pages or specific components. This might come useful when updating to svelte 5 too. I added a couple of easy check on dom elements, for more advanced cases I could use playwring's visual testing to check the canvas view.

changeset-bot[bot] commented 6 months ago

⚠️ No Changeset found

Latest commit: 2534f5973d897b4bdd123424f7319b7611b7a0b5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 6 months ago

Someone is attempting to deploy a commit to a Personal Account owned by @dimfeld on Vercel.

@dimfeld first needs to authorize it.

dimfeld commented 6 months ago

Thanks! Yes I've wanted to get real automated tests set up on this, just haven't made the time to do it, so any help is appreciated :) Will take a closer look at the PR later today but at first glance it looks good.

dimfeld commented 6 months ago

This is a great start. I didn't realize Playwright had a visual comparison mode, that will work great with all the existing example pages. Thanks again!

pierosavi commented 6 months ago

Good to know 👍🏻 tbh I didn't mean for this to be merged immediately as I wanted to add some more tests :) I'll keep my branch and add some more more soon

dimfeld commented 6 months ago

Ah sorry about that! Missed the "WIP" and jumped the gun when I ran it on my computer and everything passed.

For the future, Github does let you create a "draft" PR for cases like this. Anyway, no big deal, I'm fine with multiple small PRs. Thanks again!