LG-8509: update selected location alert to include address#7727
LG-8509: update selected location alert to include address#7727svalexander merged 9 commits intomainfrom
Conversation
…on prepare page to include selections address instead of name
| const { streetAddress } = selectedLocation; | ||
| setSubmitEventMetadata({ selected_location: streetAddress }); | ||
| onChange({ streetAddress }); |
There was a problem hiding this comment.
Just making sure: is this all we need (not the full address)? I believe this will only include 100 main and not 100 main, city, state etc.
There was a problem hiding this comment.
you're right, i'll add in the additional items
| await userEvent.click(button); | ||
|
|
||
| await findByText('{"selected_location":"Baltimore"}'); | ||
| await findByText('{"selected_location":"100 Main St E"}'); |
There was a problem hiding this comment.
Interesting... was there some code that preferred "address" to "name" somewhere?
There was a problem hiding this comment.
the selected_location value should now be the address as that's what the alert will now expect
There was a problem hiding this comment.
I see... so the analytics thing is dropping stringified text in there for us to assert against?
There was a problem hiding this comment.
the metadata, yes
|
So, I think this looks good, but I was confused why we're still modifying in-person-location-step. Then I realized the test was probably handing data to a view that expected something else. So, I think the real fix is to update the test (finally) to use the po search path, which we should do asap anyway... I'll make a ticket, but maintaining both components is becoming a hassle |
aduth
left a comment
There was a problem hiding this comment.
I had trouble testing this locally (more related to address search generally than these specific changes, I think), but LGTM from looking at the code 👍
| setSubmitEventMetadata({ selected_location: `${streetAddress}, ${formattedCityStateZip}` }); | ||
| onChange({ streetAddress, formattedCityStateZip }); |
There was a problem hiding this comment.
Would it allow some simplifying to concatenate the string once and use that as the value in InPersonPrepareStep ?
| setSubmitEventMetadata({ selected_location: `${streetAddress}, ${formattedCityStateZip}` }); | |
| onChange({ streetAddress, formattedCityStateZip }); | |
| const selectedLocationAddress = `${streetAddress}, ${formattedCityStateZip}`; | |
| setSubmitEventMetadata({ selected_location: selectedLocationAddress }); | |
| onChange({ selectedLocationAddress }); |
🎫 Ticket
Lg-8509
🛠 Summary of changes
SelectedLocation is updated to include the po address instead of the po name.
📜 Testing Plan
Provide a checklist of steps to confirm the changes.
arcgisSearchEnabledis true👀 Screenshots
en:
es:
fr: