Skip to content

LG-16050 Add submit logic to IPP choose id type controller#12115

Merged
shanechesnutt-ft merged 1 commit intomainfrom
sc/LG-16050
Apr 30, 2025
Merged

LG-16050 Add submit logic to IPP choose id type controller#12115
shanechesnutt-ft merged 1 commit intomainfrom
sc/LG-16050

Conversation

@shanechesnutt-ft
Copy link
Contributor

@shanechesnutt-ft shanechesnutt-ft commented Apr 28, 2025

🎫 Ticket

Link to the relevant ticket:
LG-16050

🛠 Summary of changes

Added submit logic to the in-person choose id type controller

📜 Testing Plan

Setup: Ensure the following environment variables are set for passport to work in IPP.

  in_person_proofing_enabled: true
  in_person_proofing_opt_in_enabled: true
  in_person_passports_enabled: true
  doc_auth_passports_enabled: true
  doc_auth_passports_percent: 100

Scenario: User selects passport option on the choose ID type page

  • Login through the oidc sinatra application selecting the Identity Verified level of service.
  • Create a new account
  • Complete the ID-IPP flow reaching the choose ID type page
  • Choose the U.S. passport book option
  • Clicks submit
  • Ensure user is taken to the /verify/in_person/passport url. (Currently a 404)

Scenario: User selects state-id option on the choose ID type page

  • Login through the oidc sinatra application selecting the Identity Verified level of service.
  • Create a new account
  • Complete the ID-IPP flow reaching the choose ID type page
  • Choose the U.S. driver’s license or state ID option
  • Clicks submit
  • Ensure user is taken to the /verify/in_person/state_id url

Scenario: User selects no ID type o the choose ID type page

  • Login through the oidc sinatra application selecting the Identity Verified level of service.
  • Create a new account
  • Complete the ID-IPP flow reaching the choose ID type page
  • Clicks submit
  • The Select the type of document that you have error appears on the form

👀 Screenshots

Choose ID type page Screenshot 2025-04-29 at 11 05 29 AM
Choose ID type page: State-ID selected Screenshot 2025-04-29 at 11 05 58 AM
Choose ID type page: Passport selected Screenshot 2025-04-29 at 2 44 06 PM
Choose ID type page: Error (No Selection) Screenshot 2025-04-29 at 11 05 49 AM

@gina-yamada
Copy link
Contributor

gina-yamada commented Apr 29, 2025

Nice work Shane! I did a bunch of testing and this looks great. Here are my notes.

Scenario: User selects passport option on the choose ID type page
✅ I am taken to /verify/in_person/passport url. (Currently a 404), AWS Event idv_in_person_proofing_choose_id_type_submitted logged with accurate info (chosen id type = passport, flow path = standard, opt-in ipp = true, path, step, etc), document_capture_session.passport_status is updated to requested

Scenario: User selects state-id option on the choose ID type page
✅ I am taken to the /verify/in_person/state_id url, AWS Event idv_in_person_proofing_choose_id_type_submitted logged with accurate info (chosen id type = drivers_license, flow path = standard, opt-in ipp = true, path, step, etc), document_capture_session.passport_status is updated to not requested

Scenario: User selects no ID type o the choose ID type page
✅ Error appear on Choose your ID type form. I do not move forward in the flow. AWS event does not log for form submission. Error message and design is working as expected. Error message in all languages displays.

Looking at the AC List in your ticket
📝 ✅ The AC in your ticket is no longer entirly accurate now that we have decided to move the DOS check. We will no longer update the user's in person enrollment on form submission on Choose your Id. The in person enrollment document type will be set on form submission on the State ID and Passport view. We are letting users move from Passport to State ID (bottom help link) without revisiting the Choose your ID page so our enrollment would be out of sync otherwise.

Extra Testing
✅ I did some testing in remote. After pick Continue online and Upload photos I am taken to Choose your ID. I am taken to /verify/document_capture for both selections. If I select state ID, H1 shows Add photos of your driver's license or state ID card. If I select Passport, H1 shows Add a photo of your passport. [hybrid handoff] After picking Send a Link, I am taken to the Choose your ID type view. I cannot move forward without a selection. In both cases, I move to /verify/hybrid_mobile/document_capture and again the content is modified as I'd expect based on my selection

Copy link

@rutvigupta-design rutvigupta-design left a comment

Choose a reason for hiding this comment

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

The error state LGTM! Just noting one minor nit: the selected state ID radio button vs the selected passport radio button looks a little different.

Edit: JK, it was just a focus state thing. All good from design!

Copy link
Contributor

@lmgeorge lmgeorge left a comment

Choose a reason for hiding this comment

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

Overall, looks good. Only real change needed is the selected_id_type.

Copy link
Contributor

Choose a reason for hiding this comment

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

issue: spelling

Suggested change
context 'when the paremeters has allowed params' do
context 'when the parameters has allowed params' do

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Ruby docs prefix method names with # not .

Suggested change
describe '.chosen_id_type' do
describe '#chosen_id_type' do

Copy link
Contributor

Choose a reason for hiding this comment

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

issue: let's align this language with other parts of the code (see: idv/document_capture_concern.rb#L139). In this case, we are moving away from drivers_license for internal use. (I may have missed this in previous PRs, but we should try to rectify the language where we can.)

Suggested change
'drivers_license' => idv_in_person_state_id_url,
'state_id' => idv_in_person_state_id_url,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with this change. I just need to get approval from @amirbey for this change. It was an existing thing in the ChooseIdTypeConcern that came from existing code.

Copy link
Contributor

Choose a reason for hiding this comment

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

We decided to follow up in a separate work item to unblock this one:
https://cm-jira.usa.gov/browse/LG-16162

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to make a separate task for this comment. https://cm-jira.usa.gov/browse/LG-16162

Copy link
Contributor

Choose a reason for hiding this comment

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

fix: grammar

Suggested change
it 'does not returns invalid choose_id_type form params' do
it 'does not return invalid choose_id_type form params' do

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let(:id_type) { 'drivers_license' }
let(:id_type) { 'state_id' }

changelog: Upcoming Features, In-person proofing, Add submit logic to IPP choose ID type controller
@shanechesnutt-ft shanechesnutt-ft changed the title LG-16050 Add choose id type controller IPP submit logic LG-16050 Add submit logic to IPP choose id type controller Apr 30, 2025
@shanechesnutt-ft shanechesnutt-ft merged commit 27b1da1 into main Apr 30, 2025
1 check passed
@shanechesnutt-ft shanechesnutt-ft deleted the sc/LG-16050 branch April 30, 2025 14:37
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.

4 participants