How to unify fonts and color schemes across systems in the context of snapshot testing?
jwedel opened this issue · 0 comments
This is not directly a "bug report" but rather a question for best practices. Maybe the answer could be added to the README.
What we've seen is, that between Windows, Mac and Linux, there are differences in
- Used Default Font (Windows -> Arial, Mac -> Helvetica Neue, Linux -> ?)
- Color Scheme (Same rendered pixel has different RGB values)
As Mac, Linux and Windows don't have a common default font, it's pretty hard to run the snapshot comparison on all environments with the same result, obviously. Also, on Mac there is the ColorSync which changes the RGB values of a rendered pixel.
Both leads to failing snapshot tests.
When increasing the failureThreashold
, it starts missing real issues. E.g. changing the color of a curve in a chart will not be detected anymore.
Are there any configuration options known, maybe for Cypress or Chrome that will lead to similar rendering results on all systems?
Thanks!