refactor(analytics): migrate Batch 3-15: mobile-platform#26591
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. |
…3-15_mobile-platform
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The existing E2E tests for password change functionality (change-password.spec.ts and delete-wallet.spec.ts) are regression tests tagged with RegressionAccounts and RegressionWalletPlatform respectively, which are not part of the available smoke test tags. Since this is a low-risk internal refactoring with proper unit test coverage, no smoke E2E tests are required. Performance Test Selection: |
Description
Phase 3 analytics migration (Batch 3-15): migrate the ResetPassword view from
MetaMetrics.getInstance()/MetricsEventBuilderto the newanalyticsutility andAnalyticsEventBuilder.Reason: Deprecate MetaMetrics in favour of the shared analytics utility and AnalyticsController.
Changes:
ResetPassword/index.jsnow usesanalytics.trackEvent()andAnalyticsEventBuilderfromapp/util/analytics; test mocks updated to mock the analytics utility instead of MetaMetrics.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-302 (Batch 3-15)
Manual testing steps
Screenshots/Recordings
N/A – analytics migration, no UI change.
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk refactor limited to analytics plumbing in the password reset flow; main risk is mis-tracking or missing the
PASSWORD_CHANGEDevent due to the API swap.Overview
Migrates
ResetPasswordanalytics from legacyMetaMetrics.getInstance()/MetricsEventBuilderto the sharedanalyticsutility withAnalyticsEventBuilder, keeping thePASSWORD_CHANGEDevent and its biometry-related properties.Updates the
ResetPasswordtests to mockutil/analytics/analyticsinstead ofMetaMetrics.Written by Cursor Bugbot for commit 22501d0. This will update automatically on new commits. Configure here.