folium icon indicating copy to clipboard operation
folium copied to clipboard

Use Playwright for integration tests

Open Conengmo opened this issue 11 months ago • 3 comments

We currently use Selenium to test the examples in our documentation for errors. This is useful, but it doesn't catch features silently failing. This happened in our v0.19.0 release.

We need tests that actually verify the expected elements are visible on the page. This requires work: for each example we have to define what elements are expected, possibly after clicking on some other element.

I'd like to try to use Playwright for this. It looks pretty easy to use. It also integrates with Pytest. I'll give this a shot on a couple examples to see if this approach works well. If so, we can apply it to all examples.

Conengmo avatar Jan 06 '25 10:01 Conengmo

Great idea! I really like Playwright. I have a little experience with it when working on streamlit-folium. A very simple (and lazy) idea could be to clone and run the streamlit-folium tests.

hansthen avatar Jan 06 '25 18:01 hansthen

I think you suggested it to me :) I’ll take a look at those streamlit tests!

Conengmo avatar Jan 06 '25 20:01 Conengmo

What would you think of making a sample streamlit app (next to the demo pages generated by jupyter notebook)? We can use this for automated tests, but we can also use it to demo some of the more interactive functionality. If you are open for it can also have a chat / video call with the team behind streamlit-folium to see if we can cooperate better.

hansthen avatar Jan 09 '25 07:01 hansthen