Skip to content

ref(ui): Remove testableTransition utility#112277

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

ref(ui): Remove testableTransition utility#112277
evanpurkhiser merged 1 commit intomasterfrom
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
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

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 4e1fa19. 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
Copy link
Copy Markdown
Member

@natemoo-re natemoo-re left a comment

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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