-
Notifications
You must be signed in to change notification settings - Fork 35
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
B 22227 int Prime API address validation #14724
base: integrationTesting
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Tested via Prime API/SimUI. Had one minor comment about the validation not validating on county. Not a huge deal due to business rule restrictions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be functioning as desired.
Client tests are all passing. I can't get all of the Server and Playwright tests to run properly but that seems to be my environment, not this BL. Seems to be passing locally as best as I can tell.
Fortunately this one was running on circle with all the automated tests prior to the switch over to gitlab and I haven't made any changes since then. All tests were passing there without issues. I will try and run the tests again locally and verify they are still passing with latest INT changes before I merge in. |
B-22227
Summary
The Prime API was not validating any addresses that the Prime enters like our City Finder tool does. This backlog adds in address validation checks in various endpoints for the Prime API.
Is there anything you would like reviewers to give additional scrutiny?
I think I got all of them, but is possible I missed an API or two that allows creating/updating of addresses. Please let me know if you find one.
Verification Steps for the Author
These are to be checked by the author.
Verification Steps for Reviewers
These are to be checked by a reviewer.
Setup to Run the Code
How to test
There are several endpoints that have been updated across the prime v1, prime v2, and prime v3 APIs. Test via the Prime Sim and/or Swagger both call the same endpoints that were updated.
NOTE: In order for the address to be updated via the Prime Sim using Update Destination Address you won't see the address immediately update because the TOO has to approve the address change first. So sign in as a TOO and approve the address if you want to see the address updated in the Prime Sim.
Here are the links to the swagger pages for quick access.
Prime V1
Prime V2
Prime V3
Access the PrimeV1 page and UpdateShipmentDestinationAddress and UpdateMTOShipmentAddress with valid and invalid address
Access the PrimeV1 page and test the GetLocationByZipCityState endpoint under /addresses/zip-city-lookup/{search} by searching for a city state zip combination and verifying you get results returned. This is the same endpoint the Customer and Office APIs also have for city finder in the app. This was added so Prime could use to look up valid addresses if needed.
Access the PrimeV2 page and CreateMTOShipment, UpdateMTOShipment with valid and invalid address
Access the PrimeV3 page and CreateMTOShipment, UpdateMTOShipment with valid and invalid address
There is a template for the CreateMTOShipment endpoint below you can use and just modify the addresses as needed for your tests.
TIP: There is a copy icon on the right side of the below box you can click so you don’t have to highlight it all then copy.
Frontend
officeApp
class or custommin-width
styling is used to hide any states the would not be visible to the user.Backend