Skip to content

test: reset SVG animations

Paul Gascou-Vaillancourt requested to merge 537-reset-svg-animations into master

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.

storyshots-spec-js-image-storyshots-base-skeleton-loader-default-1-diff

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

Merge request reports