Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PER-9943-cant-delete-sms-mfa #503

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

crisnicandrei
Copy link
Contributor

Handle 11 character phone numbers(with country code) in SMS MFA setup

Steps to test:

  1. Have an account with two factor auth using sms with county code
  2. Go to settings to disable the method
  3. Click the delete button next to the method
  4. The form should now work as before

Handle 11 character phone numbers(with country code) in SMS MFA setup
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.15%. Comparing base (eb1bab3) to head (b250d03).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #503      +/-   ##
==========================================
+ Coverage   43.10%   43.15%   +0.04%     
==========================================
  Files         362      362              
  Lines       11042    11056      +14     
  Branches     1799     1805       +6     
==========================================
+ Hits         4760     4771      +11     
- Misses       6121     6122       +1     
- Partials      161      163       +2     

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

Comment on lines +70 to +74
const match = numbers.match(/^(\d{1,3})/);
if (match) {
countryCode = `+${match[1]}`;
numbers = numbers.substring(match[1].length);
}
Copy link
Member

Choose a reason for hiding this comment

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

Can you add coverage for these paths of code? The other ones have examples provided in the tests and it would be nice to see that spelled out for this branch as well.

@crisnicandrei
Copy link
Contributor Author

@meisekimiu you are right, test added :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants