Skip to content

test: cover VBA identity deletion in component view - #39780

Closed
amitabh94 wants to merge 1 commit into
mainfrom
cursor/vba-delete-identity-view-tests-6986
Closed

amitabh94 wants to merge 1 commit into
mainfrom
cursor/vba-delete-identity-view-tests-6986

Conversation

@amitabh94

Copy link
Copy Markdown
Contributor

Description

#39037 added a Security settings control that deletes the encrypted identity data MetaMask holds for a virtual bank account. That change shipped with unit tests only. Those tests mock the selectors and the email-check hook, so they never render the section or run the real check.

These component-view tests render the section through the existing VBA state harness. Confirming deletion runs the real email check, calls KycController.deleteEncryptedStorage with the verification token, and leaves the user on Security settings with a success alert. A failed deletion shows the error alert and stays on that screen. Cancelling the confirmation, or backing out of the email check, does not delete anything.

Test layer placement

Component view. The behavior is the screen: the control is shown, the confirmation and email check run, and success or failure stays on Security settings. The unit tests already cover the same outcomes with mocked selectors and a mocked email hook.

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Refs: #39037

Manual testing steps

N/A — no device QA. The new component-view suite covers the confirmation, the email check, the success alert, the error alert, and both cancel paths.

Screenshots/Recordings

Before

N/A — test-only change.

After

N/A — test-only change.

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.
Open in Web Open in Cursor 

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-M pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. labels Nov 14, 2026
@metamask-ci metamask-ci Bot added the team-money-movement issues related to Money Movement features label 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 applied the right labels on the PR (see labeling guidelines). Not required for external contributors."). 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.

@sonarqubecloud

Copy link
Copy Markdown

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.04%. Comparing base (411378a) to head (c5b0a49).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #39780   +/-   ##
=======================================
  Coverage   88.04%   88.04%           
=======================================
  Files        8260     8260           
  Lines      245962   245962           
  Branches    62574    62574           
=======================================
+ Hits       216548   216552    +4     
+ Misses      16595    16593    -2     
+ Partials    12819    12817    -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cursor

cursor Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Folded into #39262, which now carries these tests.

@amitabh94 amitabh94 closed this Nov 16, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. size-M team-money-movement issues related to Money Movement features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants