feat(subscriptions): implement post-purchase success screen [SUB-994] - #34840
Conversation
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>
|
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. |
| it('renders the title from i18n', () => { | ||
| const { getByTestId } = renderSuccess(); | ||
|
|
||
| expect(getByTestId(SuccessTestIds.TITLE)).toBeTruthy(); |
There was a problem hiding this comment.
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.
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>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ 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} | ||
| /> |
There was a problem hiding this comment.
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.
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>
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|





Description
Summary
Successscreen — full-screen dark layout with a roundedGifticon placeholder box centred vertically, bold title and subtitle anchored at the bottom, and a full-width Continue CTASuccess.testIds.tswithCONTAINER,ICON_PLACEHOLDER,TITLE,DESCRIPTION, andCTA_BUTTONtestIdsSuccess.test.tsxwith 7 unit tests covering rendering and callbackJira - SUB-994
Changelog
CHANGELOG entry: null
Related issues
Fixes: SUB-990
Manual testing steps
Screenshots/Recordings
Before
N/A — flag wiring only, no UI changes in this PR.
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an examplePre-merge reviewer checklist
Made with Cursor