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

B-19191: Email Template not locating all duty location names #13579

Conversation

WeatherfordAaron
Copy link
Contributor

Agility ticket B-19191

Steps to test

  1. Fire up the server with the following command.
EMAIL_BACKEND=ses AWS_REGION=us-gov-west-1  aws-vault exec transcom-gov-dev -- make server_run
  1. Fire up the client as well.
    Note: make sure you set the Customer's personal email to an address you can check
  2. Create a Move/Shipment with Chelmsford, MA 01824 (or some other location that doesn't automatically register a duty location other than the City, State, Zip) for the origin location.
  3. You should receive the email which is triggered when move details are submitted. The email should contain the Origin address information (as seen below).
    Screenshot 2024-08-27 at 4 28 11 PM

If Duty Location ID is nil on the Orders, we just return the name of the Origin Address
-also added test
@WeatherfordAaron WeatherfordAaron added ByteSize M&Ms Team ByteSized M&Ms INTEGRATION Slated for Integration Testing labels Aug 27, 2024
@WeatherfordAaron WeatherfordAaron self-assigned this Aug 27, 2024
@WeatherfordAaron WeatherfordAaron requested a review from a team as a code owner August 27, 2024 21:30
@@ -72,7 +72,8 @@ func (m MoveSubmitted) emails(appCtx appcontext.AppContext) ([]emailContent, err
if originDSTransportInfo != nil {
originDutyLocationName = &originDSTransportInfo.Name
originDutyLocationPhoneLine = &originDSTransportInfo.PhoneLine

} else if originDutyLocation != nil {
originDutyLocationName = &originDutyLocation.Name
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously, if it didn't return a duty location ID, it would just not include the origin info in the email. Since that information is held in a different location, I figured we could just grab it from there in the event that the duty location did not have an ID

suite.NotEmpty(email.textBody)
suite.Contains(email.textBody, move.Orders.OriginDutyLocation.Name)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The above function follows the same process as some of the other tests for this kind of email, except it modifies the OriginDutyLocationID to be nil so that it will trigger the 'else-if' section I added

@@ -328,7 +328,7 @@ describe('ServicesCounselingEditShipmentDetails component', () => {
expect(
screen.getByText('Something went wrong, and your changes were not saved. Please try again.'),
).toBeVisible();
});
}, 10000);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a timeout on this assertion to mitigate the flakiness of this test since it failed quite a few times as I was trying to get the CircleCI tests to pass

Copy link
Contributor

@taeJungCaci taeJungCaci left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@JamesHawks224 JamesHawks224 left a comment

Choose a reason for hiding this comment

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

testing: success
code: lgtm

@WeatherfordAaron WeatherfordAaron merged commit 03e159d into integrationTesting Aug 29, 2024
28 of 29 checks passed
@WeatherfordAaron WeatherfordAaron deleted the B-19191-Email-Template-not-locating-all-duty-location-names branch August 29, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ByteSize M&Ms Team ByteSized M&Ms INTEGRATION Slated for Integration Testing
Development

Successfully merging this pull request may close these issues.

3 participants