Skip to content

Commit

Permalink
LG-13214: Log presence of issue date and exp date (#10658)
Browse files Browse the repository at this point in the history
* LG-13214: Log presence of issue date and exp date

changelog: Internal, Logging, Log whether the state ID issue/exp dates are present.

* feature specs
  • Loading branch information
solipet authored May 20, 2024
1 parent 5cb708a commit da4e985
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
2 changes: 2 additions & 0 deletions app/forms/idv/doc_pii_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions spec/controllers/idv/image_uploads_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions spec/features/idv/analytics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions spec/forms/idv/doc_pii_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit da4e985

Please sign in to comment.