finos / perspective

A data visualization and analytics component, especially well-suited for large and/or streaming datasets.
https://perspective.finos.org/
Apache License 2.0
7.73k stars 1.05k forks source link

Add Docs Tests #2502

Closed ada-x64 closed 4 months ago

ada-x64 commented 5 months ago

Currently on https://perspective.finos.org, there are broken examples on the home page. This occurs on X/Y scatter plots due to a failing migration. Building and testing on main does not replicate the bug, as the website is running on v2.7.1 and a fix has been added since that release. This PR simply adds tests for the examples (one for each example, totaling 75) to ensure this doesn't happen again.

ada-x64 commented 5 months ago

We've added HTML reporting to this PR. This allows us to download an artifact containing the results of the test. File sizes might be an issue with this. See the 1.27GB playwright-report artifact generated in #2515. This was with 75 errors and 3 retries, bloating the results to 225 trace files, 250 webms, and 180 pngs.

ada-x64 commented 4 months ago

Another update: SVG snapshot comparisons exist, but were broken on master. There were several tests which were producing empty snapshots, and some which were broken because of bunk selectors. I've updated the SVG comparison code to account for this. In addition, the SVG comparison function now checks all element children, so it should be suitable for general use. To reduce the number of changes in the PR, I'll reserve that change to future work.