-
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-19191: Email Template not locating all duty location names #13579
B-19191: Email Template not locating all duty location names #13579
Conversation
If Duty Location ID is nil on the Orders, we just return the name of the Origin Address -also added test
@@ -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 |
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.
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) | ||
} | ||
|
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.
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); |
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.
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
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.
LGTM
…ating-all-duty-location-names
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.
testing: success
code: lgtm
Agility ticket B-19191
Steps to test
Note: make sure you set the Customer's personal email to an address you can check