diff --git a/spec/features/idv/doc_auth/redo_document_capture_spec.rb b/spec/features/idv/doc_auth/redo_document_capture_spec.rb index 4029bc718ec..67a0f71382a 100644 --- a/spec/features/idv/doc_auth/redo_document_capture_spec.rb +++ b/spec/features/idv/doc_auth/redo_document_capture_spec.rb @@ -20,11 +20,7 @@ attach_and_submit_images click_idv_continue - if use_bad_ssn - fill_out_ssn_form_with_ssn_that_fails_resolution - else - fill_out_ssn_form_ok - end + handle_ssn_page click_idv_continue end @@ -148,4 +144,19 @@ end end end + + def handle_ssn_page + # we don't know why it might still be on document capture, but handle it anyway + if current_url == idv_document_capture_url + mock_doc_auth_attention_with_barcode + attach_and_submit_images + click_idv_continue + end + + if use_bad_ssn + fill_out_ssn_form_with_ssn_that_fails_resolution + else + fill_out_ssn_form_ok + end + end end