Open Carifio24 opened 1 year ago
As I did for glue-jupyter in https://github.com/glue-viz/glue-jupyter/pull/360 we should make use of pytest-mpl to help with the testing, it can be used for non matplotlib output. Happy to give a demo at some point!
Seeing that PR is actually what got me thinking about this! And yes, a demo would be great
This is a reminder to myself that we should set up some image-based testing of our outputs as part of the testing suite. Testing that the Plotly traces have the right properties goes a long way, but we should have some way to check that the final product looks correct.
Plotly supports static image export using Kaleido. We could use this to generate static output (e.g. a PNG, rather than interactive HTML) and compare to reference images. The HTML pages also support the ability to save a PNG - we should check whether this just calls the Kaleido static export, or is something different (and if the latter, see if we can activate that in a test).