diff --git a/app/forms/idv/doc_pii_form.rb b/app/forms/idv/doc_pii_form.rb index 6b62481c092..f29c13094c6 100644 --- a/app/forms/idv/doc_pii_form.rb +++ b/app/forms/idv/doc_pii_form.rb @@ -43,6 +43,8 @@ def submit extra: { pii_like_keypaths: self.class.pii_like_keypaths, attention_with_barcode: attention_with_barcode?, + id_issued_status: pii_from_doc[:state_id_issued].present? ? 'present' : 'missing', + id_expiration_status: pii_from_doc[:state_id_expiration].present? ? 'present' : 'missing', }, ) response.pii_from_doc = pii_from_doc diff --git a/spec/controllers/idv/image_uploads_controller_spec.rb b/spec/controllers/idv/image_uploads_controller_spec.rb index aa036df6249..b458af87f1a 100644 --- a/spec/controllers/idv/image_uploads_controller_spec.rb +++ b/spec/controllers/idv/image_uploads_controller_spec.rb @@ -478,6 +478,8 @@ selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: a_kind_of(Hash), + id_issued_status: 'present', + id_expiration_status: 'present', ) expect_funnel_update_counts(user, 1) @@ -669,6 +671,8 @@ Front: hash_including(ClassName: 'Identification Card', CountryCode: 'USA'), Back: hash_including(ClassName: 'Identification Card', CountryCode: 'USA'), ), + id_issued_status: 'missing', + id_expiration_status: 'missing', ) end end @@ -780,6 +784,8 @@ Front: hash_including(ClassName: 'Identification Card', CountryCode: 'USA'), Back: hash_including(ClassName: 'Identification Card', CountryCode: 'USA'), ), + id_issued_status: 'missing', + id_expiration_status: 'missing', ) end end @@ -888,6 +894,8 @@ selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: hash_including(:Front, :Back), + id_issued_status: 'missing', + id_expiration_status: 'missing', ) end end @@ -996,6 +1004,8 @@ selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: hash_including(:Front, :Back), + id_issued_status: 'missing', + id_expiration_status: 'missing', ) end end diff --git a/spec/features/idv/analytics_spec.rb b/spec/features/idv/analytics_spec.rb index b8b6a03c696..e7a281028be 100644 --- a/spec/features/idv/analytics_spec.rb +++ b/spec/features/idv/analytics_spec.rb @@ -78,7 +78,7 @@ }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {} + success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, analytics_id: 'Doc Auth', skip_hybrid_handoff: nil, irs_reproofing: false, selfie_check_required: boolean, liveness_checking_required: boolean @@ -204,7 +204,7 @@ }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'hybrid', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'hybrid', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {} + success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'hybrid', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, flow_path: 'hybrid', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, selfie_check_required: boolean, liveness_checking_required: boolean @@ -327,7 +327,7 @@ }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {} + success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: nil, liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, skip_hybrid_handoff: nil, analytics_id: 'Doc Auth', irs_reproofing: false, selfie_check_required: boolean, liveness_checking_required: boolean @@ -575,7 +575,7 @@ }, 'IdV: doc auth image upload vendor submitted' => hash_including(success: true, flow_path: 'standard', attention_with_barcode: false, doc_auth_result: 'Passed', liveness_checking_required: boolean), 'IdV: doc auth image upload vendor pii validation' => { - success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: an_instance_of(String), liveness_checking_required: boolean, classification_info: {} + success: true, errors: {}, user_id: user.uuid, submit_attempts: 1, remaining_submit_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String), selfie_image_fingerprint: an_instance_of(String), liveness_checking_required: boolean, classification_info: {}, id_issued_status: 'present', id_expiration_status: 'present' }, 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'document_capture', redo_document_capture: nil, skip_hybrid_handoff: nil, acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, selfie_check_required: boolean, liveness_checking_required: true diff --git a/spec/forms/idv/doc_pii_form_spec.rb b/spec/forms/idv/doc_pii_form_spec.rb index 1f6ba9f45f0..b955572a395 100644 --- a/spec/forms/idv/doc_pii_form_spec.rb +++ b/spec/forms/idv/doc_pii_form_spec.rb @@ -19,6 +19,8 @@ state: Faker::Address.state_abbr, state_id_jurisdiction: 'AL', state_id_number: 'S59397998', + state_id_issued: '2024-01-01', + state_id_expiration: '2024-01-01', } end let(:name_errors_pii) do @@ -138,6 +140,8 @@ expect(result.extra).to eq( attention_with_barcode: false, pii_like_keypaths: pii_like_keypaths, + id_issued_status: 'present', + id_expiration_status: 'present', ) end end @@ -154,6 +158,8 @@ expect(result.extra).to eq( attention_with_barcode: false, pii_like_keypaths: pii_like_keypaths, + id_issued_status: 'missing', + id_expiration_status: 'missing', ) end end @@ -176,6 +182,8 @@ expect(result.extra).to eq( attention_with_barcode: false, pii_like_keypaths: pii_like_keypaths, + id_issued_status: 'missing', + id_expiration_status: 'missing', ) end end @@ -194,6 +202,8 @@ expect(result.extra).to eq( attention_with_barcode: false, pii_like_keypaths: pii_like_keypaths, + id_issued_status: 'missing', + id_expiration_status: 'missing', ) end end @@ -212,6 +222,8 @@ expect(result.extra).to eq( attention_with_barcode: false, pii_like_keypaths: pii_like_keypaths, + id_issued_status: 'missing', + id_expiration_status: 'missing', ) end end @@ -230,6 +242,8 @@ expect(result.extra).to eq( attention_with_barcode: false, pii_like_keypaths: pii_like_keypaths, + id_issued_status: 'missing', + id_expiration_status: 'missing', ) end end @@ -256,6 +270,8 @@ expect(result.extra).to eq( attention_with_barcode: false, pii_like_keypaths: pii_like_keypaths, + id_issued_status: 'missing', + id_expiration_status: 'missing', ) end end