test: reset SVG animations
Stops SVG animations in storyshot's context to prevent flaky visual tests.
Lately, we've been seeing a lot of visual tests failures with the skeleton-loader
component. The problem seems to be that this component contains SVG animations and the snapshot isn't always taken at the same animation frame which results in discrepancies from time to time.
This MR should hopefully fix this issue by calling .endElement()
on all <animate>
elements, which stops SVG animations at the initial frame.
Related to #537 (closed)
Edited by Paul Gascou-Vaillancourt