Conversation
| def addresses(search_term) | ||
| suggestion = geocoder.suggest(search_term).first | ||
| # this happens multiple times | ||
| if !suggestion |
There was a problem hiding this comment.
if we input an address like PO Box 168, Yellowstone National Park, WY 82190-0168 arcgis will not find an appropriate suggestion. We want to log this in analytics. That happens successfully but multiple times rather than a single time.
app/services/analytics_events.rb
Outdated
| track_event('IdV: in person proofing location search submitted', | ||
| success: success, | ||
| errors: errors, | ||
| **extra, | ||
| ) |
There was a problem hiding this comment.
the indentation is off here, I'd also suggest bumping the string to the next line
| track_event('IdV: in person proofing location search submitted', | |
| success: success, | |
| errors: errors, | |
| **extra, | |
| ) | |
| track_event( | |
| 'IdV: in person proofing location search submitted', | |
| success: success, | |
| errors: errors, | |
| **extra, | |
| ) |
| end | ||
| rescue => err | ||
| Rails.logger.warn(err) | ||
| analytics.idv_in_person_location_searched(success: false, errors: err) |
There was a problem hiding this comment.
will update err here to reflect more robust err when pr 7675 is merged
| // server.close(); | ||
| // }); | ||
|
|
||
| it('logs an event when clicking the call to action button', async () => { |
There was a problem hiding this comment.
analytics test i'd like eyes on
There was a problem hiding this comment.
Why do you suspect this isn't really testing something? Is there a way you can get it to fail first? For example, remove the source code that logs the event and run the test. If it passes, it isn't really working.
There was a problem hiding this comment.
it seemed to me it wasn't truly working bc i changed the value of the error to something random and it still worked. Can confirm with your suggestion the test still passes.
No description provided.