Repository navigation
Conversation
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.
Contributor
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Contributor
|
Folded into #39262, which now carries these tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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.deleteEncryptedStoragewith 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)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist