diff --git a/app/controllers/concerns/idv/verify_info_concern.rb b/app/controllers/concerns/idv/verify_info_concern.rb index f0df5b5e4da..301a74baf91 100644 --- a/app/controllers/concerns/idv/verify_info_concern.rb +++ b/app/controllers/concerns/idv/verify_info_concern.rb @@ -146,15 +146,15 @@ def throttled_url end def exception_url - idv_session_errors_exception_url + idv_session_errors_exception_url(flow: flow_param) end def state_id_warning_url - idv_session_errors_state_id_warning_url + idv_session_errors_state_id_warning_url(flow: flow_param) end def warning_url - idv_session_errors_warning_url + idv_session_errors_warning_url(flow: flow_param) end def process_async_state(current_async_state) diff --git a/app/controllers/idv/in_person/verify_info_controller.rb b/app/controllers/idv/in_person/verify_info_controller.rb index 787d2b967e9..74fb044bc2a 100644 --- a/app/controllers/idv/in_person/verify_info_controller.rb +++ b/app/controllers/idv/in_person/verify_info_controller.rb @@ -48,6 +48,10 @@ def update private + def flow_param + 'in_person' + end + # state_id_type is hard-coded here because it's required for proofing against # AAMVA. We're sticking with driver's license because most states don't discern # between various ID types and driver's license is the most common one that will diff --git a/app/controllers/idv/session_errors_controller.rb b/app/controllers/idv/session_errors_controller.rb index b46d128caed..bc154a435c8 100644 --- a/app/controllers/idv/session_errors_controller.rb +++ b/app/controllers/idv/session_errors_controller.rb @@ -80,7 +80,11 @@ def ignore_form_step_wait_requests def set_try_again_path if in_person_flow? - @try_again_path = idv_in_person_path + if IdentityConfig.store.in_person_verify_info_controller_enabled + @try_again_path = idv_in_person_verify_info_url + else + @try_again_path = idv_in_person_path + end else @try_again_path = idv_verify_info_url end diff --git a/app/controllers/idv/verify_info_controller.rb b/app/controllers/idv/verify_info_controller.rb index ac3afbbe809..0fdc0e482eb 100644 --- a/app/controllers/idv/verify_info_controller.rb +++ b/app/controllers/idv/verify_info_controller.rb @@ -50,6 +50,8 @@ def update private + def flow_param; end + # state ID type isn't manually set for Idv::VerifyInfoController def set_state_id_type; end diff --git a/spec/features/idv/steps/in_person/verify_info_spec.rb b/spec/features/idv/steps/in_person/verify_info_spec.rb index a5a85a4dd22..6e22b263555 100644 --- a/spec/features/idv/steps/in_person/verify_info_spec.rb +++ b/spec/features/idv/steps/in_person/verify_info_spec.rb @@ -196,5 +196,43 @@ expect(page).to have_text(InPersonHelper::GOOD_IDENTITY_DOC_ZIPCODE).twice expect(page).to have_text(DocAuthHelper::GOOD_SSN_MASKED) end + + it 'does not proceed to the next page if resolution fails', + allow_browser_log: true do + sign_in_and_2fa_user + begin_in_person_proofing(user) + complete_prepare_step(user) + complete_location_step(user) + complete_state_id_step( + user, same_address_as_id: same_address_as_id, + double_address_verification: double_address_verification + ) + click_idv_continue + fill_out_ssn_form_with_ssn_that_fails_resolution + click_idv_continue + click_idv_continue + + expect(page).to have_current_path(idv_session_errors_warning_path(flow: 'in_person')) + click_on t('idv.failure.button.warning') + + expect(page).to have_current_path(idv_in_person_verify_info_path) + end + + it 'proceeds to the next page if resolution passes', + allow_browser_log: true do + sign_in_and_2fa_user + begin_in_person_proofing(user) + complete_prepare_step(user) + complete_location_step(user) + complete_state_id_step( + user, same_address_as_id: same_address_as_id, + double_address_verification: double_address_verification + ) + click_idv_continue + complete_ssn_step(user) + complete_verify_step(user) + + expect(page).to have_content(t('titles.idv.phone')) + end end end