-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Background:
Sometimes, Gosling code changes will break a visualization, but will not cause any tests to fail. For example, #938 #957 were patches that had to be made after a release because automatic tests did not alert us of anything wrong.
Potential solution:
@sehilyi: To avoid future instances of this, we could set up tests that compare the actual images of visualizations that the previous and updated displayed. It looks like puppeteer, which is a library that helps to capture screenshots, has the ability to add <script> using a local file (https://pptr.dev/api/puppeteer.page.addscripttag), so I imagine that we can bundle the gosling.js and then use in puppeteer to create Gosling image files based on a updated Gosling.js.
An example of puppeteer with Gosling: https://github.com/hms-dbmi/chromoscope/blob/master/src/script/gosling-screenshot.js