Skip to content

feat(subscriptions): implement post-purchase success screen [SUB-994] - #34840

Draft
smgv wants to merge 3 commits into
feat/SUB-993-pro-subscription-benefit-detail-sheetfrom
feat/SUB-994-pro-subscription-success-screen
Draft

feat(subscriptions): implement post-purchase success screen [SUB-994]#34840
smgv wants to merge 3 commits into
feat/SUB-993-pro-subscription-benefit-detail-sheetfrom
feat/SUB-994-pro-subscription-success-screen

Conversation

@smgv

@smgv smgv commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

Summary

  • Implement Success screen — full-screen dark layout with a rounded Gift icon placeholder box centred vertically, bold title and subtitle anchored at the bottom, and a full-width Continue CTA
  • Introduce Success.testIds.ts with CONTAINER, ICON_PLACEHOLDER, TITLE, DESCRIPTION, and CTA_BUTTON testIds
  • Wire all testIds into the component
  • Add Success.test.tsx with 7 unit tests covering rendering and callback

Jira - SUB-994

MM_PRO_SUBSCRIPTION_FLOW_ENABLED=true yarn watch:clean

Changelog

CHANGELOG entry: null

Related issues

Fixes: SUB-990

Manual testing steps

Feature: Pro subscription flow feature flag

Screenshots/Recordings

Before

N/A — flag wiring only, no UI changes in this PR.

After

Screenshot 2026-08-15 at 12 07 05 AM Screenshot 2026-08-15 at 12 08 05 AM

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Made with Cursor

Add Success screen with Gift icon placeholder, bold title, subtitle, and
Continue CTA anchored at the bottom. Introduce Success.testIds.ts and
add full unit test coverage (rendering and callback). Wire testIDs into
the component. Add missing BenefitDetailItem import in Benefits screen.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

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.

@metamask-ci metamask-ci Bot added the team-onboarding Onboarding team label Aug 14, 2026
Comment thread app/components/Views/ProSubscription/screens/Success/index.tsx
it('renders the title from i18n', () => {
const { getByTestId } = renderSuccess();

expect(getByTestId(SuccessTestIds.TITLE)).toBeTruthy();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weak element presence assertions

Low Severity

New Success unit tests assert container, icon placeholder, and title presence with toBeTruthy() instead of toBeOnTheScreen(), which violates the project unit testing guidelines on element presence matchers.

Fix in Cursor Fix in Web

Triggered by project rule: Unit Testing Guidelines

Reviewed by Cursor Bugbot for commit 315725e. Configure here.

Move the shared close button out of Benefits into the ProSubscription
root component so it renders above both Benefits and Success screens.
Remove onClose prop and unused imports from Benefits accordingly and
update tests to reflect the new structure.

Co-authored-by: Cursor <cursoragent@cursor.com>
@smgv smgv changed the title feat(SUB-994): implement post-purchase success screen feat(SUB-994): implement post-purchase success screen [SUB-994] Aug 14, 2026
@smgv smgv changed the title feat(SUB-994): implement post-purchase success screen [SUB-994] feat(subscriptions): implement post-purchase success screen [SUB-994] Aug 14, 2026
@smgv smgv self-assigned this Aug 14, 2026
@smgv
smgv marked this pull request as draft August 14, 2026 18:40

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 91e113b. Configure here.

iconName={IconName.Close}
size={ButtonIconSize.Md}
onPress={handleClose}
/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Close button missing testID

Low Severity

The shared close ButtonIcon was moved up into ProSubscription without a testID. The Benefits close control previously exposed BenefitsTestIds.CLOSE_BUTTON, and the matching unit coverage was removed with no parent-level replacement. That breaks the unit-testing guideline to attach testIDs when adding or updating interactive UI, and leaves dismiss behavior hard to target in tests.

Fix in Cursor Fix in Web

Triggered by project rule: Unit Testing Guidelines

Reviewed by Cursor Bugbot for commit 91e113b. Configure here.

…ismiss behavior

- Add ProSubscription.testIds.ts with CLOSE_BUTTON token
- Attach testID to the shared ButtonIcon in ProSubscription/index.tsx
- Add ProSubscription.test.tsx (9 tests) covering close button render,
  navigation.goBack on press, feature-flag guard, and Benefits→Success routing
- Remove orphaned CLOSE_BUTTON entry from BenefitsTestIds (button moved to parent)
- Upgrade Success.test.tsx assertions from toBeTruthy() to toBeOnTheScreen()

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeSwap, SmokeStake, SmokeWalletPlatform, SmokeMoney, SmokePerps, SmokeMultiChainAPI, SmokePredictions, SmokeSeedlessOnboarding, SmokeBrowser, SmokeSnaps, SmokeMMConnect
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: high
  • AI Confidence: 100%
click to see 🤖 AI reasoning details

E2E Test Selection:
Hard rule (en-locale-change): locales/languages/en.json changed — UI strings and E2E text/label selectors may diverge (including platform casing like Android textAllCaps). Running all tests.

Performance Test Selection:
The changes are limited to new ProSubscription UI components (feature-flagged) and new localization string additions. None of these changes affect performance-sensitive flows like app launch, login, asset loading, swaps, account list rendering, or onboarding. No performance test tags are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant