Skip to content

ref(ui): Remove testableTransition utility - #112277

Merged
evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/ref-remove-testabletransition-utility
Apr 6, 2026
Merged

evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/ref-remove-testabletransition-utility

Conversation

@evanpurkhiser

Copy link
Copy Markdown
Member

Animations are now disabled globally in tests via framer-motion's MotionGlobalConfig, making the per-transition testableTransition wrapper unnecessary.

@evanpurkhiser
evanpurkhiser requested review from a team as code owners April 6, 2026 19:01
@evanpurkhiser
evanpurkhiser requested a review from scttcper April 6, 2026 19:01
@evanpurkhiser
evanpurkhiser requested review from a team as code owners April 6, 2026 19:01
@evanpurkhiser
evanpurkhiser requested a review from JonasBa April 6, 2026 19:01
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 6, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Global animation disable not applied in unit tests
    • Added MotionGlobalConfig.skipAnimations = true to tests/js/setup.ts jest setup file to ensure animations are disabled in all unit tests.

Create PR

Or push these changes by commenting:

@cursor push 6df57ec46a
Preview (6df57ec46a)
diff --git a/tests/js/setup.ts b/tests/js/setup.ts
--- a/tests/js/setup.ts
+++ b/tests/js/setup.ts
@@ -12,6 +12,7 @@
 
 import {type ReactElement} from 'react';
 import {configure as configureRtl} from '@testing-library/react'; // eslint-disable-line no-restricted-imports
+import {MotionGlobalConfig} from 'framer-motion';
 import {enableFetchMocks} from 'jest-fetch-mock';
 import {ConfigFixture} from 'sentry-fixture/config';
 
@@ -27,6 +28,11 @@
 import * as performanceForSentry from 'sentry/utils/performanceForSentry';
 
 /**
+ * Disable framer-motion animations in tests
+ */
+MotionGlobalConfig.skipAnimations = true;
+
+/**
  * Set locale to English
  */
 setLocale(DEFAULT_LOCALE_DATA);

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4e1fa19dcac704e9c3b3dcf893107ad1e4c55ec9. Configure here.

Comment thread static/app/bootstrap/commonInitialization.tsx
@evanpurkhiser
evanpurkhiser force-pushed the evanpurkhiser/ref-remove-testabletransition-utility branch from 4e1fa19 to 14007b2 Compare April 6, 2026 19:23

@natemoo-re natemoo-re left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

End of an era ❤️

@evanpurkhiser
evanpurkhiser force-pushed the evanpurkhiser/ref-remove-testabletransition-utility branch from 14007b2 to 087393e Compare April 6, 2026 19:31
Comment thread tests/js/setup.ts Outdated
Comment on lines +47 to +48
import {MotionGlobalConfig} from 'framer-motion';
MotionGlobalConfig.skipAnimations = true;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can revert this now

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in #112270

@evanpurkhiser evanpurkhiser changed the title ref: Remove testableTransition utility ref(ui): Remove testableTransition utility Apr 6, 2026
Animations are now disabled globally in tests via framer-motion's
MotionGlobalConfig, making the per-transition testableTransition
wrapper unnecessary.
@evanpurkhiser
evanpurkhiser force-pushed the evanpurkhiser/ref-remove-testabletransition-utility branch from 087393e to fdf114a Compare April 6, 2026 19:58
@evanpurkhiser
evanpurkhiser merged commit 0e5f31f into master Apr 6, 2026
74 checks passed
@evanpurkhiser
evanpurkhiser deleted the evanpurkhiser/ref-remove-testabletransition-utility branch April 6, 2026 20:49
george-sentry pushed a commit that referenced this pull request Apr 9, 2026
Animations are now disabled globally in tests via framer-motion's
MotionGlobalConfig, making the per-transition testableTransition wrapper
unnecessary.
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2026

This branch was successfully deployed

1 active deployment
Preview — fdf114ae Deployed Apr 6, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants