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

#3983 - CAS Addressline1 Update - Restrict to Alpha Numeric #4081

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

andrepestana-aot
Copy link
Collaborator

  • Added replace(/[^A-Z0-9\-\s]/g, "") to formatAddress() to remove everything that is not A-Z (capital letters), hyphens or whitespace;
  • Added invalid characters to unit test.

@andrepestana-aot andrepestana-aot self-assigned this Dec 12, 2024
@andrepestana-aot andrepestana-aot marked this pull request as ready for review December 12, 2024 01:12
@guru-aot guru-aot self-requested a review December 12, 2024 16:53
).toUpperCase();
return convertToASCIIString(address)
.toUpperCase()
.replace(/[^A-Z0-9\-\s]/g, "")
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

return convertToASCIIString(address)
.toUpperCase()
.replace(/[^A-Z0-9\-\s]/g, "")
.substring(0, CAS_ADDRESS_MAX_LENGTH);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to add trim at the end?

Copy link
Collaborator

@guru-aot guru-aot left a comment

Choose a reason for hiding this comment

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

LGTM, nice work @andrepestana-aot . Minor comment

Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 21.93% ( 3765 / 17167 )
Methods: 10.05% ( 215 / 2139 )
Lines: 25.28% ( 3270 / 12933 )
Branches: 13.37% ( 280 / 2095 )

Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 65.43% ( 583 / 891 )
Methods: 59.26% ( 64 / 108 )
Lines: 68.54% ( 464 / 677 )
Branches: 51.89% ( 55 / 106 )

Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 84.94% ( 1342 / 1580 )
Methods: 83.33% ( 135 / 162 )
Lines: 86.45% ( 1129 / 1306 )
Branches: 69.64% ( 78 / 112 )

Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 67.41% ( 5927 / 8792 )
Methods: 65.09% ( 729 / 1120 )
Lines: 71.34% ( 4650 / 6518 )
Branches: 47.49% ( 548 / 1154 )

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a comment

Choose a reason for hiding this comment

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

Great work, looks good 👍

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

Successfully merging this pull request may close these issues.

3 participants