feat: Clean up Rewards pages and add metrics#27952
Conversation
This prevents the deeplink interstitial
It's mUSD for all
|
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. |
|
✅ E2E Fixture Validation — Schema is up to date |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| expect(getByTestId('campaign-tile-date-label')).toHaveTextContent( | ||
| 'Ends Mar 15, 2:30 PM', | ||
| ); | ||
| expect(getByTestId('campaign-tile-date-label')).toBeDefined(); |
There was a problem hiding this comment.
Weak toBeDefined() assertion replaces meaningful text check
Low Severity
The updated test uses toBeDefined() to assert element presence, which is a no-op since getByTestId throws if the element is not found — toBeDefined() can never fail here. The unit testing guidelines explicitly require toBeOnTheScreen() instead of toBeDefined() for element assertions, as toBeDefined() is a weak matcher that doesn't properly verify render state.
Triggered by project rule: Unit Testing Guidelines
There was a problem hiding this comment.
This is acceptable. The element is empty for now.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
No E2E tests exist for the Rewards/Campaigns/mUSD features (confirmed by searching e2e/ directory). The changes don't touch any shared infrastructure, navigation, controllers, or components used by other E2E test flows. The analytics additions are purely additive. No performance-sensitive code paths are modified. Risk is low - these are isolated UI/analytics changes with no cross-cutting impact. Performance Test Selection: |
|





Description
This PR hides a date field on campaign cards and makes a disclaimer smaller and more brief within the Rewards tab. It also adds metrics for mUSD buttons in the mUSD view.
Changelog
CHANGELOG entry: null
Related issues
Fixes: n/a
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk UI/UX adjustments plus new analytics events for mUSD actions; main risk is minor layout/regression around campaign tiles and metrics event wiring.
Overview
Rewards campaign tiles: Removes the top "date" row content from
CampaignTile(keeps thecampaign-tile-date-labelcontainer as an empty placeholder) and updates the tile test to no longer assert specific date text.mUSD calculator tab: Shortens and visually de-emphasizes the disclaimer (new
rewards.musd.disclaimer_briefstring, smaller text variant) and adds MetaMetrics tracking for the Buy and Swap buttons usingREWARDS_PAGE_BUTTON_CLICKEDwithbutton_typevaluesbuy_musd/swap_to_musd(newRewardsMetricsButtonsenum entries), with tests updated accordingly.Written by Cursor Bugbot for commit 127a21b. This will update automatically on new commits. Configure here.