Skip to content
6 changes: 3 additions & 3 deletions app/controllers/concerns/idv/verify_info_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/idv/in_person/verify_info_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion app/controllers/idv/session_errors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/idv/verify_info_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
38 changes: 38 additions & 0 deletions spec/features/idv/steps/in_person/verify_info_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we add to this test so that we correct the bad ssn and then continue on as expected?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@svalexander I added a test to show the flow proceeds if resolution passes with commit 6abc88e

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good!


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