Skip to content

test(vba): add signup, retry, and identity-deletion view tests - #39262

Open
amitabh94 wants to merge 23 commits into
mainfrom
cursor/vba-onboarding-failure-view-tests-49f1
Open

amitabh94 wants to merge 23 commits into
mainfrom
cursor/vba-onboarding-failure-view-tests-49f1

Conversation

@amitabh94

@amitabh94 amitabh94 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Test-only. 29 cases (24 run on iOS and Android; the 5 delete cases do not) cover the bank-account signup paths that were easy to break and left people stuck.

  • KYC rejected. A final rejection shows Contact support only, and that opens the MetaMask support page. A rejection that still allows a retry shows Try again only, and that re-enters identity verification. The wrong button means no help, or no way to finish.
  • Couldn't open your account (TRAM-4399). Starting identity verification can fail because it was already set up for a different country. With no saved session the app resets and starts again. With a saved session it continues. Either way the user reaches the next step instead of staying on the error.
  • Add money, Bank account row. BRL and USD launch separately, each behind its own flag. For a new user in Brazil, the US, and Portugal the row is enabled, hidden, or Coming soon. When only the older general flag is on, the row stays Coming soon. Tapping an enabled row opens the vendor terms with Arrives in seconds for Pix, or Arrives in 2 - 3 business days for USD. While location is still loading and a currency flag is open, the row stays hidden. The wrong flag would show a currency early or hide it after launch.
  • Money home card (TRAM-4448). Someone who left partway through identity verification was shown Verifying your identity, as if they had already submitted. An abandoned pending session, and a session stopped at the identity step, now show We need more info, and Continue opens Verify identity. A submitted review still shows the KYC pending card. That button is disabled, and pressing it does not open a screen or reload signup.
  • Proof-of-address retry loop (#39497). 2 cases, each run on iOS and Android. After a submitted upload moves through pending into a retry, the retry screen shows and SumSub launches once. Opening signup again while that retry is already stored shows the retry screen and does not launch SumSub.
  • Delete identity data from Security settings (#39037). 5 cases. An active virtual bank account shows the delete control and asks before deleting. Confirming and passing the email check deletes encrypted storage with the verification token and stays on Security settings. A failed deletion shows the error and stays there. Cancelling the confirmation, or backing out of the email check, makes no deletion call.

Test layer placement

Component-view. The signup screens, the row, the card, and the Security settings delete flow run through real Redux. Only Engine is mocked.

Changelog

CHANGELOG entry: null

Related issues

Refs: TRAM-4399, TRAM-4448, #39497, #39037

Manual testing steps

N/A. Test-only change.

Screenshots/Recordings

Before

N/A

After

N/A

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

For performance guidelines and tooling, see the Performance Guide.

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.

Note

Low Risk
Test-only changes with no production code paths modified; risk is limited to CI runtime and mock maintenance.

Reviewed by Cursor Bugbot for commit 1315e28. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added the size-M label Nov 9, 2026
@metamask-ci metamask-ci Bot added the team-money-movement issues related to Money Movement features label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Smart E2E Test Selection

Selected E2E tags: No E2E tests selected

AI Confidence: 93

E2E reasoning

Expand to read

All 9 changed files are Jest component-view tests or helpers (*.view.test.tsx, tests/component-view/mocks.ts, presets/vba.ts, renderers/vba.tsx). The mocks.ts diff only adds mock methods to the Engine mock: AuthenticationController MFA methods and identity-verification and session methods. These files are only used by the Jest view-test config. No Detox or Appium smoke spec imports them, and no app source, state-log, or runtime code changed. The 4 PR review threads are resolved and concern test style only. So no E2E smoke tags are needed.

View run

@github-actions github-actions Bot added size-L and removed size-M labels Nov 9, 2026
@amitabh94
amitabh94 marked this pull request as ready for review November 9, 2026 22:36
@amitabh94
amitabh94 requested review from a team as code owners November 9, 2026 22:36

@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.

Stale Bugbot comment from a previous run.

@cursor
cursor Bot force-pushed the cursor/vba-onboarding-failure-view-tests-49f1 branch from 39e3e83 to d753394 Compare November 11, 2026 00:20
@github-actions github-actions Bot added size-M and removed size-L labels Nov 11, 2026
@cursor
cursor Bot force-pushed the cursor/vba-onboarding-failure-view-tests-49f1 branch 3 times, most recently from 8899417 to df2e24f Compare November 11, 2026 02:14
cursoragent and others added 3 commits November 11, 2026 02:49
Co-authored-by: Amitabh Aggarwal <amitabh94@users.noreply.github.com>
Co-authored-by: Amitabh Aggarwal <amitabh94@users.noreply.github.com>
Co-authored-by: Amitabh Aggarwal <amitabh94@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/vba-onboarding-failure-view-tests-49f1 branch from df2e24f to 3fd49a4 Compare November 11, 2026 02:57
Akaryatrh and others added 7 commits November 11, 2026 15:39
Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
A retry after SumSub has already submitted documents must show the retry
screen and must not launch SumSub again.
…er does

A pending finalStatus is reported as kycStatus pending, and an abandoned provider flow still opens Verify identity.
@cursor
cursor Bot marked this pull request as draft November 13, 2026 05:55

@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 using default effort and found 2 potential issues.

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 145d53c. Configure here.

Comment thread tests/component-view/renderers/vba.tsx Resolved
The submitted-flow card still has to show. Whether its button stays disabled is no longer asserted.
Pressing it must not open a route or reload onboarding.
Security settings could delete encrypted VBA identity data, but the existing tests mocked selectors and the MFA hook. Drive the real confirmation, email check, and KycController call.
@github-actions github-actions Bot added size-L and removed size-M labels Nov 14, 2026
@metamask-ci

metamask-ci Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

PR template — items to address before "Ready for review"

Warnings — informational, address before merging:

  • Pre-merge author checklist has unchecked items (e.g. "I've tested on Android"). Every box must be consciously checked — see docs/readme/ready-for-review.md.

See docs/readme/ready-for-review.md for the full Definition of Ready for Review.

…/vba-onboarding-failure-view-tests-49f1

# Conflicts:
#	tests/component-view/mocks.ts
#	tests/component-view/presets/vba.ts
#	tests/component-view/renderers/vba.tsx
The shared provider mock resolves as abandoned, which pops identity verification in the same turn. Pin a failed launch in the KYC rejected retry case so the screen stays up.
@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.

The KYC rejected retry case pinned launchProviderFlow to failed and left that result for later tests on the same worker. Reset it to the shared abandoned default after each test.
@cursor cursor Bot changed the title test(vba): add onboarding failure and KYC rejected view tests test(vba): add signup, retry, and identity-deletion view tests Nov 16, 2026
@amitabh94
amitabh94 marked this pull request as ready for review November 16, 2026 17:08
@amitabh94
amitabh94 requested review from a team as code owners November 16, 2026 17:08
Hoist the onboarding route probes so the navigator does not remount them, assert the error-route probe is absent, and restore the shared KYC mocks after each onboarding-failure case.
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

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

Labels

size-XL team-money-movement issues related to Money Movement features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants