refactor(analytics): migrate bridge metrics test utilities#43434
refactor(analytics): migrate bridge metrics test utilities#43434gauthierpetetin wants to merge 1 commit into
Conversation
✨ Files requiring CODEOWNER review ✨🔄 @MetaMask/swaps-engineers (2 files, +9 -8)
|
000a06a to
34d5266
Compare
Builds ready [34d5266]
⚡ Performance Benchmarks (Total: 🟢 17 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs
|
|
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. |
34d5266 to
410b474
Compare
Builds ready [410b474]
⚡ Performance Benchmarks (Total: 🟢 17 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs
|
410b474 to
3dbd3bc
Compare
Builds ready [3dbd3bc] [reused from 410b474]
⚡ Performance Benchmarks (Total: 🟢 17 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs
|
Refresh slice from main-synced monolithic branch.
3dbd3bc to
4c26dd3
Compare
Builds ready [4c26dd3] [reused from 24c31c1]
⚡ Performance Benchmarks (Total: 🟢 12 pass · 🟡 10 warn · 🔴 2 fail)
Bundle size diffs
|
There was a problem hiding this comment.
Pull request overview
Updates Bridge-related unit/E2E test utilities to use the canonical analytics consent fields introduced in Analytics Phase B (moving away from legacy metaMetricsId / participateInMetaMetrics-style fixtures).
Changes:
- Updated Bridge hook unit test mocks to set
analyticsIdinstead ofmetaMetricsId. - Updated Bridge E2E test utilities to use
MOCK_ANALYTICS_IDand to patch metrics consent viaanalyticsId+completedMetaMetricsOnboarding+optedIn.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ui/hooks/bridge/useBridging.test.ts | Switches mocked Redux state overrides to use analyticsId for Bridge-related tests. |
| test/e2e/tests/bridge/bridge-test-utils.ts | Migrates Bridge E2E fixtures/constants to canonical analytics fields and consent flags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Part 6 of the Analytics Phase B split (supersedes monolithic #43406).
Owner: @MetaMask/swaps-engineers
Reason: Bridge test utilities still use legacy metrics fixture fields.
Solution: Update bridge unit test and E2E test utils for canonical analytics fields.
Depends on: #43430
Changelog
CHANGELOG entry: null
Related issues
Part of https://github.com/MetaMask/MetaMask-planning/issues/7331
Manual testing steps
yarn test:unit ui/hooks/bridge/useBridging.test.tsPre-merge author checklist
Pre-merge reviewer checklist