Skip to content

LG-13408 Standardize logging for opted in ipp true/false#10983

Merged
jennyverdeyen merged 3 commits intomainfrom
jverdeyen/LG-13408-standardize-opted-in-ipp-logging
Jul 30, 2024
Merged

LG-13408 Standardize logging for opted in ipp true/false#10983
jennyverdeyen merged 3 commits intomainfrom
jverdeyen/LG-13408-standardize-opted-in-ipp-logging

Conversation

@jennyverdeyen
Copy link
Contributor

@jennyverdeyen jennyverdeyen commented Jul 24, 2024

Link to the relevant ticket:
LG-13408

🛠 Summary of changes

Analytics logging for certain events were returning strings "true"/"false" for the property opted_in_to_in_person_proofing whereas that property is logged with a boolean value in other events. This change ensures the property is logged as a boolean in these events:

IdV: in person proofing location submitted
IdV: in person proofing location visited
IdV: in person proofing prepare submitted
IdV: in person proofing prepare visited

Provide a checklist of steps to confirm the changes.

  • Start the event log watch with make watch_events in your terminal

  • Trigger each event and observe that opted_in_to_in_person_proofing is true (Boolean) and not "true" (String), when opted_in_to_in_person_proofing is true

    • Log in through the oidc sinatra app and select "Biometric Comparison"
    • Go through the flow, choosing "Continue in Person" on the how_to_verify page, so opted_in_to_in_person_proofing will be true
    • Arriving at the Post Office search page, the "IdV: in person proofing prepare submitted" and "IdV: in person proofing location visited" events will be logged. Verify that event_properties.opted_in_to_in_person_proofing is true (Boolean) for both events.
    • Enter an address in the Post Office search form and click "Search." Select a Post Office location. The "IdV: in person proofing location submitted" event will be logged as a result. Verify that event_properties.opted_in_to_in_person_proofing is true (Boolean)
    • The "IdV: in person proofing prepare visited" is sometimes inconsistent to trigger with opt-in; the page doesn't consistently show up in the flow. One way I have triggered it is by getting to the PO location page, then replacing "#location" with "#prepare" in the url so it reads "http://localhost:3000/verify/document_capture#prepare" - this works for me from the location page, but not necessarily by simply entering that URL from anywhere else. Observe the event is triggered and verify that event_properties.opted_in_to_in_person_proofing is true (Boolean)
  • Trigger each event and observe that opted_in_to_in_person_proofing is false (Boolean) and not "false" (String), when opted_in_to_in_person_proofing is false

    • Log in through the oidc sinatra app and select "Biometric Comparison"
    • Go through the flow, choosing "Continue on your phone" on the how_to_verify page. Fail the remote verification, and enter the in person flow where opted_in_to_in_person_proofing will now be false
    • After failing the remote proofing, you should be taken to "verify/document_capture#prepare" and the "IdV: in person proofing prepare visited" will be triggered. Verify that event_properties.opted_in_to_in_person_proofing is false (Boolean)
    • Click Continue. Arrive at the Post Office search page and the "IdV: in person proofing prepare submitted" and "IdV: in person proofing location visited" events will be logged. Verify that event_properties.opted_in_to_in_person_proofing is false (Boolean) for both events.
    • Enter an address in the Post Office search form and click "Search." Select a Post Office location. The "IdV: in person proofing location submitted" event will be logged as a result. Verify that event_properties.opted_in_to_in_person_proofing is false (Boolean)

Screenshots:

Before: Screenshot 2024-07-24 at 4 09 11 PM Screenshot 2024-07-24 at 4 09 00 PM Screenshot 2024-07-24 at 4 08 06 PM Screenshot 2024-07-24 at 4 08 32 PM Screenshot 2024-07-24 at 4 09 46 PM Screenshot 2024-07-24 at 4 09 57 PM Screenshot 2024-07-24 at 4 10 03 PM Screenshot 2024-07-24 at 4 11 05 PM
After: Screenshot 2024-07-23 at 12 13 59 PM Screenshot 2024-07-23 at 12 13 24 PM Screenshot 2024-07-23 at 12 12 58 PM Screenshot 2024-07-24 at 4 06 27 PM Screenshot 2024-07-23 at 12 19 19 PM Screenshot 2024-07-23 at 12 20 04 PM Screenshot 2024-07-23 at 12 20 16 PM Screenshot 2024-07-23 at 12 20 38 PM

@jennyverdeyen jennyverdeyen requested review from a team and gina-yamada July 24, 2024 20:14
changelog: Internal, In-person proofing, Standardize logging for opted in ipp true/false values
@jennyverdeyen jennyverdeyen force-pushed the jverdeyen/LG-13408-standardize-opted-in-ipp-logging branch from 6e481d3 to cf1bdf4 Compare July 24, 2024 21:08
@jennyverdeyen
Copy link
Contributor Author

@gina-yamada You'll notice I removed the old approach I was discussing with you yesterday in favor of making the conversion from the frontend. Doing it this way also simplified the testing approach since the value is expectedly false instead of nil for the cases in analytics_spec.rb.

I considered keeping the logger conversion as a future safeguard but ended up removing it in favor of DRYer code... I reasoned that it's unlikely there are other string versions of the value occurring by that point, and the analytics tests could catch that if it were the case. Noting this for posterity, and in case anyone feels the logger conversion is worth keeping.

@jennyverdeyen jennyverdeyen force-pushed the jverdeyen/LG-13408-standardize-opted-in-ipp-logging branch from 76e329d to 20b3a9c Compare July 25, 2024 13:31
@eileen-nava eileen-nava self-requested a review July 30, 2024 19:33
Copy link
Contributor

@eileen-nava eileen-nava left a comment

Choose a reason for hiding this comment

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

I tested and this looks good. Nice work, Jenny.

use_alternate_sdk: useAlternateSdk,
acuant_version: acuantVersion,
opted_in_to_in_person_proofing: optedInToInPersonProofing,
opted_in_to_in_person_proofing: optedInToInPersonProofing === 'true',
Copy link
Contributor

Choose a reason for hiding this comment

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

👏🏻

@jennyverdeyen jennyverdeyen merged commit fd644e0 into main Jul 30, 2024
@jennyverdeyen jennyverdeyen deleted the jverdeyen/LG-13408-standardize-opted-in-ipp-logging branch July 30, 2024 20:06
mitchellhenke pushed a commit that referenced this pull request Jul 31, 2024
* LG-13408 Standardize logging for opted in ipp true/false

changelog: Internal, In-person proofing, Standardize logging for opted in ipp true/false values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants