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

INT B-21162 Destination Address Street 1 OPTIONAL #13846

Merged
merged 13 commits into from
Oct 10, 2024

Conversation

MInthavongsay
Copy link
Contributor

@MInthavongsay MInthavongsay commented Oct 7, 2024

B-21162

Summary

PPM destination address street 1 will now be OPTIONAL for onboarding on the CUSTOMER, OFFICE, PRIME SIMULATOR APPS and PRIME V3 APIs(CreateMTOShipment a d UpdateMTOShipment). PPM destination address street 1 will be REQUIRED during PRE CLOSEOUT(waiting on customer) on the CUSTOMER side during the Upload PPM Documents process.

It was decided not to make streetAddress1 NULLABLE on the addresses table per architecture's suggestion. Instead we will be using a string placeholder - "n/a" - to represent NULL on the table level. To achieve this, the payload_to_model and model_to_payload GO files were updated to convert empty/null value to "n/a and vice versa.
It will be shown as streetAddress1 = "" on the client side response side. This was done per Danny M not wanting the UI to display "n/a".

Note: This PR takes in consideration of new enchancement introduced by the ByteSize MM's MAIN PR. This enhancement will now display REQUIRED labelHints for all required input fields while removing the OPTIONAL label hints; However, this change was only done on the CUSTOMER SIDE and NOT on OFFICE/PRIME SIMULATOR UIs.

CUSTOMER/ONBOARDING:
customer_ppm
CUSTOMER/UPLOAD PPM DOCUMENTS:
customer_upload_docs_ppm

OFFICE/PRIME SIMULATOR:
office_ppm

this article explains more about the approach used.

Verification Steps for the Author

These are to be checked by the author.

  • Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
  • Have the Agility acceptance criteria been met for this change?

Verification Steps for Reviewers

These are to be checked by a reviewer.

  • Has the branch been pulled in and checked out?
  • Have the BL acceptance criteria been met for this change?
  • Was the CircleCI build successful?
  • Has the code been reviewed from a standards and best practices point of view?

Setup to Run the Code

How to test

  1. Login as customer and onboard PPM. Verify PPM can be saved with or without destination address street 1. Required labelHints must be displayed for all required input controls. See attached screenshot above.
  2. Submit PPM and login as service counselor. Create/update PPM and verify PPM can be saved with or without providing destination address street 1. Verify OPTIONAL labelHints are displayed for all OPTIONAL input controls. See screenshot above.
  3. Login as Prime Simulator UI and create/update a PPM. Like the CUSTOMER and OFFICE, verify PPM can be saved with and without destination address street 1. Check if OPTIONAL labelHints are displayed for all OPTIONAL input controls. See
  4. Submit Move Details
  5. Login as customer and verify destination address street 1 is REQUIRED in the Upload PPM Documents process.
    see screenshot above.

How to test Prime V3 API:

  1. Login to Prime Simulator UI. Pick an existing move and goto details view. Copy moveId from UI.
  2. Goto http://primelocal:3000/swagger-ui/prime_v3.html#/mtoShipment/createMTOShipment . Paste Move ID from step 1 for moveTaskOrderID field in sample JSON and replace "<-- PASTE HERE-->":
    { "moveTaskOrderID": "<-- PASTE HERE-->", "shipmentType": "PPM", "counselorRemarks": null, "ppmShipment": { "expectedDepartureDate": "2024-10-01", "pickupAddress": { "streetAddress1": "123 Street", "streetAddress2": "", "city": "SomeCity", "state": "CA", "postalCode": "90210" }, "secondaryPickupAddress": null, "destinationAddress": { "streetAddress1": "", "streetAddress2": "", "city": "SomeCity", "state": "CA", "postalCode": "90210" }, "secondaryDestinationAddress": null, "sitExpected": false, "hasSecondaryPickupAddress": false, "hasSecondaryDestinationAddress": false, "estimatedWeight": 100, "hasProGear": false } }
  3. click Execute. Verify PPM was created via Prime Simulator UI. Copy shipment ID and Shipment eTag for newly created PPM.
  4. Goto http://primelocal:3000/swagger-ui/prime_v3.html#/mtoShipment/updateMTOShipment . Paste shipment ID and Shipment eTag from step 3. Use your own JSON or the following:
    { "ppmShipment": { "expectedDepartureDate": "2024-10-01", "pickupAddress": { "streetAddress1": "123 Street", "city": "SomeCity", "state": "AL", "postalCode": "14150" }, "secondaryPickupAddress": { "streetAddress1": "", "streetAddress2": "", "streetAddress3": "", "city": "", "state": "", "postalCode": "" }, "tertiaryPickupAddress": { "streetAddress1": "", "streetAddress2": "", "streetAddress3": "", "city": "", "state": "", "postalCode": "" }, "destinationAddress": { "streetAddress1": "", "city": "SomeCity test from swagger 2b", "state": "AL", "postalCode": "14150" }, "secondaryDestinationAddress": { "streetAddress1": "", "streetAddress2": "", "streetAddress3": "", "city": "", "state": "", "postalCode": "" }, "tertiaryDestinationAddress": { "streetAddress1": "", "streetAddress2": "", "streetAddress3": "", "city": "", "state": "", "postalCode": "" }, "sitExpected": false, "estimatedWeight": 100, "hasProGear": false, "hasSecondaryPickupAddress": false, "hasTertiaryPickupAddress": false, "hasSecondaryDestinationAddress": false, "hasTertiaryDestinationAddress": false }, "counselorRemarks": null }
  5. click Execute. Refresh Prime Simulator UI and verify expected changes are present.
  6. Try to break it. Test with empty string, white spaces and without streetAddress1 property.

Frontend

  • There are no aXe warnings for UI.
  • This works in Supported Browsers and their phone views (Chrome, Firefox, Edge).
  • There are no new console errors in the browser devtools.
  • There are no new console errors in the test output.
  • If this PR adds a new component to Storybook, it ensures the component is fully responsive, OR if it is intentionally not, a wrapping div using the officeApp class or custom min-width styling is used to hide any states the would not be visible to the user.
  • This change meets the standards for Section 508 compliance.

Backend

@MInthavongsay MInthavongsay added Scrummy Bears Scrum Team H INTEGRATION Slated for Integration Testing labels Oct 7, 2024
@MInthavongsay MInthavongsay self-assigned this Oct 7, 2024
@MInthavongsay MInthavongsay requested a review from a team as a code owner October 7, 2024 01:49
Copy link
Contributor

@antgmann antgmann left a comment

Choose a reason for hiding this comment

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

All of the testing instructions work well, all of the AC appears to be covered. I had a couple nitpicks about comments but they seem to be resolved!

Copy link
Contributor

@ajlusk ajlusk left a comment

Choose a reason for hiding this comment

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

Optional as a customer initially submitting their move.
Screenshot 2024-10-09 at 10 36 29 AM

Required as a customer submitting their closeout.
Screenshot 2024-10-09 at 10 39 15 AM

I was able to add and remove the street address as a counselor and the summary card displayed correctly both with and without a street address.

The street address was still required for HHG and NTS-Release.

I believe this also completes the downstream B-21465.

@MInthavongsay MInthavongsay merged commit 4c56c6d into integrationTesting Oct 10, 2024
30 checks passed
@MInthavongsay MInthavongsay deleted the INT-B-21162-address1-optional branch October 10, 2024 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INTEGRATION Slated for Integration Testing Scrummy Bears Scrum Team H
Development

Successfully merging this pull request may close these issues.

3 participants