diff --git a/app/forms/idv/phone_confirmation_otp_verification_form.rb b/app/forms/idv/phone_confirmation_otp_verification_form.rb index fbcbdd0b427..026ae7b2344 100644 --- a/app/forms/idv/phone_confirmation_otp_verification_form.rb +++ b/app/forms/idv/phone_confirmation_otp_verification_form.rb @@ -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, } diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index 3d239feb5ca..8e98b531e89 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -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 @@ -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, @@ -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, diff --git a/spec/controllers/idv/otp_verification_controller_spec.rb b/spec/controllers/idv/otp_verification_controller_spec.rb index 2c63bf95561..9b64b16526b 100644 --- a/spec/controllers/idv/otp_verification_controller_spec.rb +++ b/spec/controllers/idv/otp_verification_controller_spec.rb @@ -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, diff --git a/spec/features/idv/analytics_spec.rb b/spec/features/idv/analytics_spec.rb index add47ef4f30..be6232ac291 100644 --- a/spec/features/idv/analytics_spec.rb +++ b/spec/features/idv/analytics_spec.rb @@ -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' } }, @@ -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' } }, @@ -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' } }, @@ -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' } }, diff --git a/spec/support/fake_analytics_spec.rb b/spec/support/fake_analytics_spec.rb index 3c3cc579777..381aa6fa95f 100644 --- a/spec/support/fake_analytics_spec.rb +++ b/spec/support/fake_analytics_spec.rb @@ -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 @@ -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 @@ -169,7 +169,7 @@ Diff: @@ -1 +1 @@ -:arg1 => 42, - +:arg1 => 43, + +:arg1 => 43, MESSAGE end end @@ -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, @@ -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, @@ -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,