-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix: removed isTestEnvironment check for rive animation
#38110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (1 files, +0 -2)
🔐 @MetaMask/web3auth (9 files, +10 -24)
|
isTestEnvironment check for rive animation
Builds ready [a3fe5d9]
UI Startup Metrics (1220 ± 102 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Gudahtt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| // In test environments or when returning from another page, skip animations | ||
| const [isAnimationComplete, setIsAnimationComplete] = useState( | ||
| isTestEnvironment || shouldSkipAnimation, | ||
| shouldSkipAnimation || false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Redundant extra condition:
| shouldSkipAnimation || false, | |
| shouldSkipAnimation, |
Description
In this PR, we’ve removed the
isTestEnvironmentchecks from all Rive animation–related files. During the e2e tests, the animation component still callsuseRive, and since the WASM file isn’t set for the test environment, useRive falls back to fetching the WASM from external domains(unpkg.com and cdn.jsdelivr.net). This was causing unintended external calls during test execution. These changes address that issue.Jira Link: https://consensyssoftware.atlassian.net/browse/SL-334
Changelog
CHANGELOG entry: removed the
isTestEnvironmentchecks from all Rive animation–related filesRelated issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Removes
IN_TESTgating from Rive animations, initializes WASM normally, and updates tests to mock animations with snapshot adjustments.isTestEnvironmentchecks to allow animations to render in all environments inwallet-ready-animation.tsx,fox-appear-animation.tsx,metamask-wordmark-animation.tsx,shield-icon-animation.tsx,shield-subscription-icon-animation.tsx,shield-illustration-animation.tsx, andcreation-successful.js.useRiveWasmReadyto always start withfalseand drop test-env shortcut; keep readiness whenRuntimeLoaderis undefined.welcome.jsandunlock-page.component.js.fox-appear-animation,metamask-wordmark-animation,wallet-ready-animation).Written by Cursor Bugbot for commit a3fe5d9. This will update automatically on new commits. Configure here.