You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can move the transformations out of the load hook so that we can do snapshot tests of the resulting SVG and JS code, that should be good for a start.
After that we can move on to browser screenshot testing, to make it easier to see if the SVGs are being shown correctly
Sounds good to me. https://playwright.dev/docs/test-snapshots should be the most appropriate tool for the screenshot job; Ideally all browsers should have a very similar output but I don't know if the difference between render engines will require using different screenshots to compare.
Points to test are:
Width/Height preservation, if enabled (unit)
Width/Height configuration, if enabled (unit)
Behavior when both of the above are enabled (unit)
ViewBox restoration, if enabled (unit)
Fill/Stroke replacement, if enabled (unit)
none should never be replaced
The generated code should work (visual)
Correct processing of referenced resources within the SVG
image, use, ...
The generated SVG should be visually identical to the source SVG
All targets render the same (happydom/jsdom should be enough for this one)
Not sure what the best strategy would be here...
The text was updated successfully, but these errors were encountered: