Skip to content

Commit a8a5621

Browse files
authored
fix(snapshots): Disable CSS animations for snapshot testing (#111485)
A recent flake in `radio.tsx` was caused by an animation on the checked state. After some investigation, this caused flakes in our snapshot suite as small timing differences resulted in some minor diffs in the checked state, indicating the animation wasn't completing. This will disable CSS animations in our snapshot tests to ensure stability.
1 parent 69b5208 commit a8a5621

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/js/sentry-test/snapshots/snapshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function renderToHTML(element: ReactElement): string {
5555
<style>${getFontFaceCSS()}</style>
5656
${styleTags}
5757
<style>
58-
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
58+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; animation: none !important; transition: none !important; }
5959
body { font-family: 'Rubik', sans-serif; background: transparent; }
6060
#root { display: inline-block; }
6161
</style>

0 commit comments

Comments
 (0)