Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/forms/idv/phone_confirmation_otp_verification_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def extra_analytics_attributes
{
code_expired: user_phone_confirmation_session.expired?,
code_matches: user_phone_confirmation_session.matches_code?(code),
delivery_method: user_phone_confirmation_session.delivery_method,
otp_delivery_preference: user_phone_confirmation_session.delivery_method,
second_factor_attempts_count: user.second_factor_attempts_count,
second_factor_locked_at: user.second_factor_locked_at,
}
Expand Down
6 changes: 3 additions & 3 deletions app/services/analytics_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2930,7 +2930,7 @@ def idv_phone_confirmation_otp_sent(
# @param [Hash] errors
# @param [Boolean] code_expired if the one-time code expired
# @param [Boolean] code_matches
# @param [:sms,:voice] delivery_method
# @param [:sms,:voice] otp_delivery_preference
# @param [Integer] second_factor_attempts_count number of attempts to confirm this phone
# @param [Time, nil] second_factor_locked_at timestamp when the phone was locked out
# @param [Idv::ProofingComponentsLogging] proofing_components User's current proofing components
Expand All @@ -2942,7 +2942,7 @@ def idv_phone_confirmation_otp_submitted(
errors:,
code_expired:,
code_matches:,
delivery_method:,
otp_delivery_preference:,
second_factor_attempts_count:,
second_factor_locked_at:,
proofing_components: nil,
Expand All @@ -2956,7 +2956,7 @@ def idv_phone_confirmation_otp_submitted(
errors: errors,
code_expired: code_expired,
code_matches: code_matches,
delivery_method: delivery_method,
otp_delivery_preference: otp_delivery_preference,
second_factor_attempts_count: second_factor_attempts_count,
second_factor_locked_at: second_factor_locked_at,
proofing_components: proofing_components,
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/idv/otp_verification_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
errors: {},
code_expired: false,
code_matches: true,
delivery_method: :sms,
otp_delivery_preference: :sms,
second_factor_attempts_count: 0,
second_factor_locked_at: nil,
**ab_test_args,
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 @@ -124,7 +124,7 @@
proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }
},
'IdV: phone confirmation otp submitted' => {
success: true, code_expired: false, code_matches: true, delivery_method: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, skip_hybrid_handoff: nil,
success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, skip_hybrid_handoff: nil,
active_profile_idv_level: nil, pending_profile_idv_level: nil,
proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }
},
Expand Down Expand Up @@ -250,7 +250,7 @@
proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }
},
'IdV: phone confirmation otp submitted' => {
success: true, code_expired: false, code_matches: true, delivery_method: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, skip_hybrid_handoff: nil,
success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, skip_hybrid_handoff: nil,
active_profile_idv_level: nil, pending_profile_idv_level: nil,
proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }
},
Expand Down Expand Up @@ -486,7 +486,7 @@
proofing_components: { address_check: 'lexis_nexis_address', document_check: 'usps', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', source_check: 'aamva' }
},
'IdV: phone confirmation otp submitted' => {
success: true, code_expired: false, code_matches: true, delivery_method: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, skip_hybrid_handoff: nil,
success: true, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {}, acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, skip_hybrid_handoff: nil,
active_profile_idv_level: nil, pending_profile_idv_level: nil,
proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }
},
Expand Down Expand Up @@ -624,7 +624,7 @@
proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }
},
'IdV: phone confirmation otp submitted' => {
success: true, acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, skip_hybrid_handoff: anything, code_expired: false, code_matches: true, delivery_method: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {},
success: true, acuant_sdk_upgrade_ab_test_bucket: :default, lexisnexis_instant_verify_workflow_ab_test_bucket: :default, skip_hybrid_handoff: anything, code_expired: false, code_matches: true, otp_delivery_preference: :sms, second_factor_attempts_count: 0, second_factor_locked_at: nil, errors: {},
active_profile_idv_level: nil, pending_profile_idv_level: nil,
proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }
},
Expand Down
12 changes: 6 additions & 6 deletions spec/support/fake_analytics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
to raise_error(RSpec::Expectations::ExpectationNotMetError) do |err|
assert_error_messages_equal(err, <<~MESSAGE)
Expected that FakeAnalytics would have received event nil

Events received:
{}
MESSAGE
Expand Down Expand Up @@ -87,7 +87,7 @@
to raise_error(RSpec::Expectations::ExpectationNotMetError) do |err|
assert_error_messages_equal(err, <<~MESSAGE)
Expected that FakeAnalytics would have received event :my_event once but it was received 0 times

Events received:
{}
MESSAGE
Expand Down Expand Up @@ -169,7 +169,7 @@
Diff:
@@ -1 +1 @@
-:arg1 => 42,
+:arg1 => 43,
+:arg1 => 43,
MESSAGE
end
end
Expand Down Expand Up @@ -560,7 +560,7 @@
errors: true,
code_expired: true,
code_matches: true,
delivery_method: :sms,
otp_delivery_preference: :sms,
second_factor_attempts_count: true,
second_factor_locked_at: true,
proofing_components: true,
Expand All @@ -576,7 +576,7 @@
errors: true,
code_expired: true,
code_matches: true,
delivery_method: :sms,
otp_delivery_preference: :sms,
second_factor_attempts_count: true,
second_factor_locked_at: true,
proofing_components: true,
Expand All @@ -595,7 +595,7 @@
errors: true,
code_expired: true,
code_matches: true,
delivery_method: :sms,
otp_delivery_preference: :sms,
second_factor_attempts_count: true,
second_factor_locked_at: true,
proofing_components: true,
Expand Down