diff --git a/app/controllers/concerns/idv/ab_test_analytics_concern.rb b/app/controllers/concerns/idv/ab_test_analytics_concern.rb new file mode 100644 index 00000000000..874523a3503 --- /dev/null +++ b/app/controllers/concerns/idv/ab_test_analytics_concern.rb @@ -0,0 +1,11 @@ +module Idv + module AbTestAnalyticsConcern + include AcuantConcern + include Idv::GettingStartedAbTestConcern + + def ab_test_analytics_buckets + acuant_sdk_ab_test_analytics_args. + merge(getting_started_ab_test_analytics_bucket) + end + end +end diff --git a/app/controllers/concerns/idv/getting_started_ab_test_concern.rb b/app/controllers/concerns/idv/getting_started_ab_test_concern.rb index 212404a699c..97c191110a3 100644 --- a/app/controllers/concerns/idv/getting_started_ab_test_concern.rb +++ b/app/controllers/concerns/idv/getting_started_ab_test_concern.rb @@ -1,13 +1,28 @@ module Idv module GettingStartedAbTestConcern - def getting_started_a_b_test_bucket - AbTests::IDV_GETTING_STARTED.bucket(sp_session[:request_id] || session.id) + def getting_started_ab_test_bucket + AbTests::IDV_GETTING_STARTED.bucket(getting_started_user.uuid) + end + + def getting_started_user + if defined?(document_capture_user) # hybrid flow + document_capture_user + else + current_user + end end def maybe_redirect_for_getting_started_ab_test - return if getting_started_a_b_test_bucket != :getting_started + return if getting_started_ab_test_bucket != :getting_started redirect_to idv_getting_started_url end + + def getting_started_ab_test_analytics_bucket + { + getting_started_ab_test_bucket: + getting_started_ab_test_bucket, + } + end end end diff --git a/app/controllers/concerns/idv/hybrid_mobile/hybrid_mobile_concern.rb b/app/controllers/concerns/idv/hybrid_mobile/hybrid_mobile_concern.rb index 634f89ee9cf..6d5054110e1 100644 --- a/app/controllers/concerns/idv/hybrid_mobile/hybrid_mobile_concern.rb +++ b/app/controllers/concerns/idv/hybrid_mobile/hybrid_mobile_concern.rb @@ -4,6 +4,7 @@ module HybridMobileConcern extend ActiveSupport::Concern include AcuantConcern + include Idv::AbTestAnalyticsConcern def check_valid_document_capture_session if !document_capture_user diff --git a/app/controllers/concerns/idv/step_utilities_concern.rb b/app/controllers/concerns/idv/step_utilities_concern.rb deleted file mode 100644 index 51e4ac581e0..00000000000 --- a/app/controllers/concerns/idv/step_utilities_concern.rb +++ /dev/null @@ -1,23 +0,0 @@ -module Idv - module StepUtilitiesConcern - extend ActiveSupport::Concern - include AcuantConcern - - def irs_reproofing? - current_user&.reproof_for_irs?( - service_provider: current_sp, - ).present? - end - - def document_capture_session_uuid - flow_session[:document_capture_session_uuid] - end - - def document_capture_session - return @document_capture_session if defined?(@document_capture_session) - @document_capture_session = DocumentCaptureSession.find_by( - uuid: document_capture_session_uuid, - ) - end - end -end diff --git a/app/controllers/concerns/idv/verify_info_concern.rb b/app/controllers/concerns/idv/verify_info_concern.rb index 37fd362d35f..35d49b0914d 100644 --- a/app/controllers/concerns/idv/verify_info_concern.rb +++ b/app/controllers/concerns/idv/verify_info_concern.rb @@ -195,7 +195,7 @@ def async_state_done(current_async_state) address_line2_present: !pii[:address2].blank?, pii_like_keypaths: [[:errors, :ssn], [:response_body, :first_name], [:state_id, :state_id_jurisdiction]], - }, + }.merge(ab_test_analytics_buckets), ) log_idv_verification_submitted_event( success: form_response.success?, diff --git a/app/controllers/concerns/idv_session.rb b/app/controllers/concerns/idv_session.rb index 3dd264acdc6..1cc02a797e5 100644 --- a/app/controllers/concerns/idv_session.rb +++ b/app/controllers/concerns/idv_session.rb @@ -37,6 +37,23 @@ def flow_session user_session['idv/doc_auth'] ||= {} end + def irs_reproofing? + current_user&.reproof_for_irs?( + service_provider: current_sp, + ).present? + end + + def document_capture_session_uuid + flow_session[:document_capture_session_uuid] + end + + def document_capture_session + return @document_capture_session if defined?(@document_capture_session) + @document_capture_session = DocumentCaptureSession.find_by( + uuid: document_capture_session_uuid, + ) + end + def redirect_unless_idv_session_user redirect_to root_url if !idv_session_user end diff --git a/app/controllers/concerns/idv_step_concern.rb b/app/controllers/concerns/idv_step_concern.rb index d79fda7382e..d9fa8721075 100644 --- a/app/controllers/concerns/idv_step_concern.rb +++ b/app/controllers/concerns/idv_step_concern.rb @@ -5,6 +5,7 @@ module IdvStepConcern include RateLimitConcern include FraudReviewConcern include Idv::OutageConcern + include Idv::AbTestAnalyticsConcern included do before_action :confirm_two_factor_authenticated diff --git a/app/controllers/idv/agreement_controller.rb b/app/controllers/idv/agreement_controller.rb index dda0c8b750f..5f0eb826325 100644 --- a/app/controllers/idv/agreement_controller.rb +++ b/app/controllers/idv/agreement_controller.rb @@ -2,7 +2,6 @@ module Idv class AgreementController < ApplicationController include IdvStepConcern include StepIndicatorConcern - include StepUtilitiesConcern before_action :confirm_welcome_step_complete before_action :confirm_agreement_needed @@ -43,7 +42,7 @@ def analytics_arguments step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: irs_reproofing?, - } + }.merge(ab_test_analytics_buckets) end def skip_to_capture diff --git a/app/controllers/idv/document_capture_controller.rb b/app/controllers/idv/document_capture_controller.rb index ba4a87a6ffd..61489f58413 100644 --- a/app/controllers/idv/document_capture_controller.rb +++ b/app/controllers/idv/document_capture_controller.rb @@ -4,8 +4,6 @@ class DocumentCaptureController < ApplicationController include DocumentCaptureConcern include IdvStepConcern include StepIndicatorConcern - include StepUtilitiesConcern - include RateLimitConcern before_action :confirm_hybrid_handoff_complete before_action :confirm_document_capture_needed @@ -77,7 +75,7 @@ def analytics_arguments analytics_id: 'Doc Auth', irs_reproofing: irs_reproofing?, redo_document_capture: flow_session[:redo_document_capture], - }.compact.merge(**acuant_sdk_ab_test_analytics_args) + }.compact.merge(ab_test_analytics_buckets) end def handle_stored_result diff --git a/app/controllers/idv/getting_started_controller.rb b/app/controllers/idv/getting_started_controller.rb index e0a38117053..ccaba1b1de8 100644 --- a/app/controllers/idv/getting_started_controller.rb +++ b/app/controllers/idv/getting_started_controller.rb @@ -1,7 +1,6 @@ module Idv class GettingStartedController < ApplicationController include IdvStepConcern - include StepUtilitiesConcern before_action :confirm_agreement_needed @@ -49,7 +48,7 @@ def analytics_arguments step: 'getting_started', analytics_id: 'Doc Auth', irs_reproofing: irs_reproofing?, - } + }.merge(ab_test_analytics_buckets) end def create_document_capture_session diff --git a/app/controllers/idv/hybrid_handoff_controller.rb b/app/controllers/idv/hybrid_handoff_controller.rb index c01e882cf95..16f64a09205 100644 --- a/app/controllers/idv/hybrid_handoff_controller.rb +++ b/app/controllers/idv/hybrid_handoff_controller.rb @@ -3,7 +3,6 @@ class HybridHandoffController < ApplicationController include ActionView::Helpers::DateHelper include IdvStepConcern include StepIndicatorConcern - include StepUtilitiesConcern before_action :confirm_agreement_step_complete before_action :confirm_hybrid_handoff_needed, only: :show @@ -157,7 +156,7 @@ def analytics_arguments analytics_id: 'Doc Auth', irs_reproofing: irs_reproofing?, redo_document_capture: params[:redo] ? true : nil, - }.compact.merge(**acuant_sdk_ab_test_analytics_args) + }.compact.merge(ab_test_analytics_buckets) end def form_response(destination:) diff --git a/app/controllers/idv/hybrid_mobile/capture_complete_controller.rb b/app/controllers/idv/hybrid_mobile/capture_complete_controller.rb index 005033c42be..13b2e88acf1 100644 --- a/app/controllers/idv/hybrid_mobile/capture_complete_controller.rb +++ b/app/controllers/idv/hybrid_mobile/capture_complete_controller.rb @@ -22,7 +22,7 @@ def analytics_arguments step: 'capture_complete', analytics_id: 'Doc Auth', irs_reproofing: irs_reproofing?, - }.merge(**acuant_sdk_ab_test_analytics_args) + }.merge(ab_test_analytics_buckets) end end end diff --git a/app/controllers/idv/hybrid_mobile/document_capture_controller.rb b/app/controllers/idv/hybrid_mobile/document_capture_controller.rb index 41c3fd4781d..2241569439d 100644 --- a/app/controllers/idv/hybrid_mobile/document_capture_controller.rb +++ b/app/controllers/idv/hybrid_mobile/document_capture_controller.rb @@ -44,7 +44,6 @@ def extra_view_variables document_capture_session_uuid: document_capture_session_uuid, failure_to_proof_url: return_to_sp_failure_to_proof_url(step: 'document_capture'), }.merge( - native_camera_ab_testing_variables, acuant_sdk_upgrade_a_b_testing_variables, ) end @@ -57,7 +56,7 @@ def analytics_arguments step: 'document_capture', analytics_id: 'Doc Auth', irs_reproofing: irs_reproofing?, - }.merge(**acuant_sdk_ab_test_analytics_args) + }.merge(ab_test_analytics_buckets) end def handle_stored_result @@ -70,13 +69,6 @@ def handle_stored_result failure(I18n.t('doc_auth.errors.general.network_error'), extra) end end - - def native_camera_ab_testing_variables - { - acuant_sdk_upgrade_ab_test_bucket: - AbTests::ACUANT_SDK.bucket(document_capture_session_uuid), - } - end end end end diff --git a/app/controllers/idv/in_person/ssn_controller.rb b/app/controllers/idv/in_person/ssn_controller.rb index 7b19a8d75e5..7fb74026d54 100644 --- a/app/controllers/idv/in_person/ssn_controller.rb +++ b/app/controllers/idv/in_person/ssn_controller.rb @@ -3,7 +3,6 @@ module InPerson class SsnController < ApplicationController include IdvStepConcern include StepIndicatorConcern - include StepUtilitiesConcern include Steps::ThreatMetrixStepHelper include ThreatMetrixConcern @@ -84,7 +83,7 @@ def analytics_arguments step: 'ssn', analytics_id: 'In Person Proofing', irs_reproofing: irs_reproofing?, - }.merge(**acuant_sdk_ab_test_analytics_args) + }.merge(ab_test_analytics_buckets) end def updating_ssn? diff --git a/app/controllers/idv/in_person/verify_info_controller.rb b/app/controllers/idv/in_person/verify_info_controller.rb index 724bf424a50..54c9d7a3910 100644 --- a/app/controllers/idv/in_person/verify_info_controller.rb +++ b/app/controllers/idv/in_person/verify_info_controller.rb @@ -3,7 +3,6 @@ module InPerson class VerifyInfoController < ApplicationController include IdvStepConcern include StepIndicatorConcern - include StepUtilitiesConcern include Steps::ThreatMetrixStepHelper include VerifyInfoConcern @@ -63,7 +62,7 @@ def pii @pii = flow_session[:pii_from_user] end - # override StepUtilitiesConcern + # override IdvSession concern def flow_session user_session.fetch('idv/in_person', {}) end @@ -74,7 +73,7 @@ def analytics_arguments step: 'verify', analytics_id: 'In Person Proofing', irs_reproofing: irs_reproofing?, - }.merge(**acuant_sdk_ab_test_analytics_args). + }.merge(ab_test_analytics_buckets). merge(**extra_analytics_properties) end diff --git a/app/controllers/idv/link_sent_controller.rb b/app/controllers/idv/link_sent_controller.rb index bc2c9acf34a..3c90687cdad 100644 --- a/app/controllers/idv/link_sent_controller.rb +++ b/app/controllers/idv/link_sent_controller.rb @@ -3,7 +3,6 @@ class LinkSentController < ApplicationController include DocumentCaptureConcern include IdvStepConcern include StepIndicatorConcern - include StepUtilitiesConcern before_action :confirm_hybrid_handoff_complete before_action :confirm_document_capture_needed @@ -63,7 +62,7 @@ def analytics_arguments analytics_id: 'Doc Auth', flow_path: 'hybrid', irs_reproofing: irs_reproofing?, - }.merge(**acuant_sdk_ab_test_analytics_args) + }.merge(ab_test_analytics_buckets) end def handle_document_verification_success(get_results_response) diff --git a/app/controllers/idv/review_controller.rb b/app/controllers/idv/review_controller.rb index 6a1437a45a0..da22db72690 100644 --- a/app/controllers/idv/review_controller.rb +++ b/app/controllers/idv/review_controller.rb @@ -24,6 +24,7 @@ def confirm_current_password gpo_verification_pending: current_user.gpo_verification_pending_profile?, fraud_review_pending: fraud_review_pending?, fraud_rejection: fraud_rejection?, + **ab_test_analytics_buckets, ) irs_attempts_api_tracker.idv_password_entered(success: false) @@ -34,7 +35,10 @@ def confirm_current_password def new Funnel::DocAuth::RegisterStep.new(current_user.id, current_sp&.issuer). call(:encrypt, :view, true) - analytics.idv_review_info_visited(address_verification_method: address_verification_method) + analytics.idv_review_info_visited( + address_verification_method: address_verification_method, + **ab_test_analytics_buckets, + ) gpo_mail_service = Idv::GpoMail.new(current_user) flash_now = flash.now @@ -67,6 +71,7 @@ def create fraud_rejection: idv_session.profile.fraud_rejection?, gpo_verification_pending: idv_session.profile.gpo_verification_pending?, deactivation_reason: idv_session.profile.deactivation_reason, + **ab_test_analytics_buckets, ) Funnel::DocAuth::RegisterStep.new(current_user.id, current_sp&.issuer). call(:verified, :view, true) @@ -76,6 +81,7 @@ def create fraud_rejection: idv_session.profile.fraud_rejection?, gpo_verification_pending: idv_session.profile.gpo_verification_pending?, deactivation_reason: idv_session.profile.deactivation_reason, + **ab_test_analytics_buckets, ) return unless FeatureManagement.reveal_gpo_code? diff --git a/app/controllers/idv/ssn_controller.rb b/app/controllers/idv/ssn_controller.rb index ec04107b627..942c11b05bf 100644 --- a/app/controllers/idv/ssn_controller.rb +++ b/app/controllers/idv/ssn_controller.rb @@ -2,7 +2,6 @@ module Idv class SsnController < ApplicationController include IdvStepConcern include StepIndicatorConcern - include StepUtilitiesConcern include Steps::ThreatMetrixStepHelper include ThreatMetrixConcern @@ -90,7 +89,7 @@ def analytics_arguments step: 'ssn', analytics_id: 'Doc Auth', irs_reproofing: irs_reproofing?, - }.merge(**acuant_sdk_ab_test_analytics_args) + }.merge(ab_test_analytics_buckets) end def updating_ssn? diff --git a/app/controllers/idv/verify_info_controller.rb b/app/controllers/idv/verify_info_controller.rb index 02c0bf9b16a..9918d141c09 100644 --- a/app/controllers/idv/verify_info_controller.rb +++ b/app/controllers/idv/verify_info_controller.rb @@ -1,7 +1,6 @@ module Idv class VerifyInfoController < ApplicationController include IdvStepConcern - include StepUtilitiesConcern include StepIndicatorConcern include VerifyInfoConcern include Steps::ThreatMetrixStepHelper @@ -52,7 +51,7 @@ def analytics_arguments step: 'verify', analytics_id: 'Doc Auth', irs_reproofing: irs_reproofing?, - }.merge(**acuant_sdk_ab_test_analytics_args) + }.merge(ab_test_analytics_buckets) end # copied from verify_step diff --git a/app/controllers/idv/welcome_controller.rb b/app/controllers/idv/welcome_controller.rb index f352e6ca4ec..966a896fd2c 100644 --- a/app/controllers/idv/welcome_controller.rb +++ b/app/controllers/idv/welcome_controller.rb @@ -2,7 +2,6 @@ module Idv class WelcomeController < ApplicationController include IdvStepConcern include StepIndicatorConcern - include StepUtilitiesConcern include GettingStartedAbTestConcern before_action :confirm_welcome_needed @@ -37,7 +36,7 @@ def analytics_arguments step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: irs_reproofing?, - } + }.merge(ab_test_analytics_buckets) end def create_document_capture_session diff --git a/spec/controllers/concerns/idv/ab_test_analytics_concern_spec.rb b/spec/controllers/concerns/idv/ab_test_analytics_concern_spec.rb new file mode 100644 index 00000000000..5181f0a8470 --- /dev/null +++ b/spec/controllers/concerns/idv/ab_test_analytics_concern_spec.rb @@ -0,0 +1,35 @@ +require 'rails_helper' + +RSpec.describe 'AbTestAnalyticsConcern' do + module Idv + class StepController < ApplicationController + include AbTestAnalyticsConcern + end + end + + let(:user) { create(:user) } + + describe '#ab_test_analytics_buckets' do + controller Idv::StepController do + end + + let(:acuant_sdk_args) { { as_bucket: :as_value } } + let(:getting_started_args) { { gs_bucket: :gs_value } } + + before do + allow(subject).to receive(:current_user).and_return(user) + expect(subject).to receive(:acuant_sdk_ab_test_analytics_args). + and_return(acuant_sdk_args) + expect(subject).to receive(:getting_started_ab_test_analytics_bucket). + and_return(getting_started_args) + end + + it 'includes acuant_sdk_ab_test_analytics_args' do + expect(controller.ab_test_analytics_buckets).to include(acuant_sdk_args) + end + + it 'includes getting_started_ab_test_analytics_bucket' do + expect(controller.ab_test_analytics_buckets).to include(getting_started_args) + end + end +end diff --git a/spec/controllers/concerns/idv/getting_started_ab_test_concern_spec.rb b/spec/controllers/concerns/idv/getting_started_ab_test_concern_spec.rb index 464e40ddf96..518d5131f40 100644 --- a/spec/controllers/concerns/idv/getting_started_ab_test_concern_spec.rb +++ b/spec/controllers/concerns/idv/getting_started_ab_test_concern_spec.rb @@ -1,75 +1,82 @@ require 'rails_helper' -RSpec.describe 'GettingStartedAbTestConcern' do +RSpec.describe Idv::GettingStartedAbTestConcern do let(:user) { create(:user, :fully_registered, email: 'old_email@example.com') } - let(:idv_session) do - Idv::Session.new(user_session: subject.user_session, current_user: user, service_provider: nil) - end - - module Idv - class StepController < ApplicationController - include GettingStartedAbTestConcern - def show - render plain: 'Hello' - end - end - end + controller(ApplicationController) do + include Idv::GettingStartedAbTestConcern - describe '#getting_started_a_b_test_bucket' do - let(:sp_session) { {} } + before_action :maybe_redirect_for_getting_started_ab_test - controller Idv::StepController do + def index + render plain: 'Hello' end + end + describe '#getting_started_ab_test_bucket' do before do - allow(session).to receive(:id).and_return('session-id') - allow(controller).to receive(:sp_session).and_return(sp_session) + allow(controller).to receive(:current_user).and_return(user) allow(AbTests::IDV_GETTING_STARTED).to receive(:bucket) do |discriminator| case discriminator - when 'session-id' - :welcome - when 'request-id' + when user.uuid :getting_started + else :welcome end end end - it 'returns the bucket based on session id' do - expect(controller.getting_started_a_b_test_bucket).to eq(:welcome) + it 'returns the bucket based on user id' do + expect(controller.getting_started_ab_test_bucket).to eq(:getting_started) end - context 'with associated sp session request id' do - let(:sp_session) { { request_id: 'request-id' } } - - it 'returns the bucket based on request id' do - expect(controller.getting_started_a_b_test_bucket).to eq(:getting_started) + context 'with a different user' do + before do + user2 = create(:user, :fully_registered, email: 'new_email@example.com') + allow(controller).to receive(:current_user).and_return(user2) + end + it 'returns the bucket based on user id' do + expect(controller.getting_started_ab_test_bucket).to eq(:welcome) end end end - context '#maybe_redirect_for_getting_started_ab_test' do - controller Idv::StepController do - before_action :maybe_redirect_for_getting_started_ab_test + describe '#getting_started_user' do + let(:document_capture_user) { create(:user) } + let(:current_user) { create(:user) } + before do + allow(controller).to receive(:current_user).and_return(current_user) end - before do - sign_in(user) - routes.draw do - get 'show' => 'idv/step#show' + context 'when document_capture_user is defined (hybrid flow)' do + before do + allow(controller).to receive(:document_capture_user).and_return(document_capture_user) + end + + it 'uses the document_capture_user to choose a bucket' do + expect(controller.getting_started_user).to eq(document_capture_user) + end + end + + context 'when falling back to current_user' do + it 'falls back to current_user when document_capture_user undefined' do + expect(controller.getting_started_user).to eq(current_user) end end + end - let(:session_uuid) { SecureRandom.uuid } + context '#maybe_redirect_for_getting_started_ab_test' do + before do + sign_in(user) + end context 'A/B test specifies getting started page' do before do - allow(controller).to receive(:getting_started_a_b_test_bucket). + allow(controller).to receive(:getting_started_ab_test_bucket). and_return(:getting_started) end it 'redirects to idv_getting_started_url' do - get :show + get :index expect(response).to redirect_to(idv_getting_started_url) end @@ -77,12 +84,12 @@ def show context 'A/B test specifies welcome page' do before do - allow(controller).to receive(:getting_started_a_b_test_bucket). + allow(controller).to receive(:getting_started_ab_test_bucket). and_return(:welcome) end it 'does not redirect users away from welcome page' do - get :show + get :index expect(response.body).to eq('Hello') expect(response.status).to eq(200) @@ -91,12 +98,12 @@ def show context 'A/B test specifies some other value' do before do - allow(controller).to receive(:getting_started_a_b_test_bucket). + allow(controller).to receive(:getting_started_ab_test_bucket). and_return(:something_else) end it 'does not redirect users away from welcome page' do - get :show + get :index expect(response.body).to eq('Hello') expect(response.status).to eq(200) diff --git a/spec/controllers/idv/agreement_controller_spec.rb b/spec/controllers/idv/agreement_controller_spec.rb index 5a87003d951..36b498a5ff2 100644 --- a/spec/controllers/idv/agreement_controller_spec.rb +++ b/spec/controllers/idv/agreement_controller_spec.rb @@ -5,11 +5,16 @@ let(:user) { create(:user) } + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do stub_sign_in(user) stub_analytics subject.user_session['idv/doc_auth'] = {} subject.idv_session.welcome_visited = true + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -31,9 +36,11 @@ describe '#show' do let(:analytics_name) { 'IdV: doc auth agreement visited' } let(:analytics_args) do - { step: 'agreement', + { + step: 'agreement', analytics_id: 'Doc Auth', - irs_reproofing: false } + irs_reproofing: false, + }.merge(ab_test_args) end it 'renders the show template' do @@ -81,11 +88,13 @@ let(:analytics_name) { 'IdV: doc auth agreement submitted' } let(:analytics_args) do - { success: true, + { + success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', - irs_reproofing: false } + irs_reproofing: false, + }.merge(ab_test_args) end it 'sends analytics_submitted event with consent given' do diff --git a/spec/controllers/idv/document_capture_controller_spec.rb b/spec/controllers/idv/document_capture_controller_spec.rb index fc8ddda6f7c..e5beb10e1f5 100644 --- a/spec/controllers/idv/document_capture_controller_spec.rb +++ b/spec/controllers/idv/document_capture_controller_spec.rb @@ -10,11 +10,17 @@ let(:user) { create(:user) } + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do stub_sign_in(user) stub_analytics subject.idv_session.flow_path = 'standard' subject.user_session['idv/doc_auth'] = flow_session + + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -48,8 +54,7 @@ flow_path: 'standard', irs_reproofing: false, step: 'document_capture', - acuant_sdk_upgrade_ab_test_bucket: :default, - } + }.merge(ab_test_args) end it 'renders the show template' do @@ -140,8 +145,7 @@ flow_path: 'standard', irs_reproofing: false, step: 'document_capture', - acuant_sdk_upgrade_ab_test_bucket: :default, - } + }.merge(ab_test_args) end let(:result) { { success: true, errors: {} } } diff --git a/spec/controllers/idv/getting_started_controller_spec.rb b/spec/controllers/idv/getting_started_controller_spec.rb index 0eaaa0ac9c0..8464710356f 100644 --- a/spec/controllers/idv/getting_started_controller_spec.rb +++ b/spec/controllers/idv/getting_started_controller_spec.rb @@ -5,10 +5,15 @@ let(:user) { create(:user) } + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do stub_sign_in(user) stub_analytics subject.user_session['idv/doc_auth'] = {} + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -30,9 +35,11 @@ describe '#show' do let(:analytics_name) { 'IdV: doc auth getting_started visited' } let(:analytics_args) do - { step: 'getting_started', + { + step: 'getting_started', analytics_id: 'Doc Auth', - irs_reproofing: false } + irs_reproofing: false, + }.merge(ab_test_args) end it 'renders the show template' do @@ -88,11 +95,13 @@ let(:analytics_name) { 'IdV: doc auth getting_started submitted' } let(:analytics_args) do - { success: true, + { + success: true, errors: {}, step: 'getting_started', analytics_id: 'Doc Auth', - irs_reproofing: false } + irs_reproofing: false, + }.merge(ab_test_args) end it 'sends analytics_submitted event with consent given' do diff --git a/spec/controllers/idv/hybrid_handoff_controller_spec.rb b/spec/controllers/idv/hybrid_handoff_controller_spec.rb index 351a059ecb6..448c574413c 100644 --- a/spec/controllers/idv/hybrid_handoff_controller_spec.rb +++ b/spec/controllers/idv/hybrid_handoff_controller_spec.rb @@ -5,12 +5,17 @@ let(:user) { create(:user) } + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do stub_sign_in(user) stub_analytics stub_attempts_tracker subject.user_session['idv/doc_auth'] = {} subject.idv_session.idv_consent_given = true + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -46,9 +51,11 @@ describe '#show' do let(:analytics_name) { 'IdV: doc auth hybrid handoff visited' } let(:analytics_args) do - { step: 'hybrid_handoff', + { + step: 'hybrid_handoff', analytics_id: 'Doc Auth', - irs_reproofing: false } + irs_reproofing: false, + }.merge(ab_test_args) end it 'renders the show template' do @@ -141,17 +148,21 @@ context 'hybrid flow' do let(:analytics_args) do - { success: true, + { + success: true, errors: { message: nil }, destination: :link_sent, flow_path: 'hybrid', step: 'hybrid_handoff', analytics_id: 'Doc Auth', irs_reproofing: false, - telephony_response: { errors: {}, - message_id: 'fake-message-id', - request_id: 'fake-message-request-id', - success: true } } + telephony_response: { + errors: {}, + message_id: 'fake-message-id', + request_id: 'fake-message-request-id', + success: true, + }, + }.merge(ab_test_args) end it 'sends analytics_submitted event for hybrid' do @@ -164,14 +175,16 @@ context 'desktop flow' do let(:analytics_args) do - { success: true, + { + success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', analytics_id: 'Doc Auth', irs_reproofing: false, - skip_upload_step: false } + skip_upload_step: false, + }.merge(ab_test_args) end it 'sends analytics_submitted event for desktop' do diff --git a/spec/controllers/idv/hybrid_mobile/capture_complete_controller_spec.rb b/spec/controllers/idv/hybrid_mobile/capture_complete_controller_spec.rb index 74802292299..f5d87d9fdd9 100644 --- a/spec/controllers/idv/hybrid_mobile/capture_complete_controller_spec.rb +++ b/spec/controllers/idv/hybrid_mobile/capture_complete_controller_spec.rb @@ -22,6 +22,10 @@ ) end + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do session[:doc_capture_user_id] = user&.id session[:document_capture_session_uuid] = document_capture_session_uuid @@ -29,6 +33,7 @@ allow(@analytics).to receive(:track_event) allow(subject).to receive(:confirm_document_capture_session_complete). and_return(true) + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -44,12 +49,11 @@ let(:analytics_name) { 'IdV: doc auth capture_complete visited' } let(:analytics_args) do { - acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', flow_path: 'hybrid', irs_reproofing: false, step: 'capture_complete', - } + }.merge(ab_test_args) end it 'renders the show template' do diff --git a/spec/controllers/idv/hybrid_mobile/document_capture_controller_spec.rb b/spec/controllers/idv/hybrid_mobile/document_capture_controller_spec.rb index 3c410025118..fcacb00a32a 100644 --- a/spec/controllers/idv/hybrid_mobile/document_capture_controller_spec.rb +++ b/spec/controllers/idv/hybrid_mobile/document_capture_controller_spec.rb @@ -16,12 +16,18 @@ let(:document_capture_session_requested_at) { Time.zone.now } + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do stub_analytics stub_attempts_tracker session[:doc_capture_user_id] = user&.id session[:document_capture_session_uuid] = document_capture_session_uuid + + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -48,12 +54,11 @@ let(:analytics_name) { 'IdV: doc auth document_capture visited' } let(:analytics_args) do { - acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', flow_path: 'hybrid', irs_reproofing: false, step: 'document_capture', - } + }.merge(ab_test_args) end it 'renders the show template' do @@ -132,8 +137,7 @@ flow_path: 'hybrid', irs_reproofing: false, step: 'document_capture', - acuant_sdk_upgrade_ab_test_bucket: :default, - } + }.merge(ab_test_args) end before do diff --git a/spec/controllers/idv/in_person/ssn_controller_spec.rb b/spec/controllers/idv/in_person/ssn_controller_spec.rb index fea0ab023ee..7ef46e95e25 100644 --- a/spec/controllers/idv/in_person/ssn_controller_spec.rb +++ b/spec/controllers/idv/in_person/ssn_controller_spec.rb @@ -14,12 +14,17 @@ let(:user) { create(:user) } + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do stub_sign_in(user) subject.user_session['idv/in_person'] = flow_session stub_analytics stub_attempts_tracker allow(@analytics).to receive(:track_event) + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -88,7 +93,7 @@ flow_path: 'standard', irs_reproofing: false, step: 'ssn', - } + }.merge(ab_test_args) end it 'renders the show template' do diff --git a/spec/controllers/idv/in_person/verify_info_controller_spec.rb b/spec/controllers/idv/in_person/verify_info_controller_spec.rb index c19ca5bfaf6..fb2ae1d1779 100644 --- a/spec/controllers/idv/in_person/verify_info_controller_spec.rb +++ b/spec/controllers/idv/in_person/verify_info_controller_spec.rb @@ -13,9 +13,14 @@ let(:user) { build(:user, :with_phone, with: { phone: '+1 (415) 555-0130' }) } let(:service_provider) { create(:service_provider) } + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do allow(subject).to receive(:flow_session).and_return(flow_session) stub_sign_in(user) + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -64,7 +69,7 @@ step: 'verify', same_address_as_id: true, pii_like_keypaths: [[:same_address_as_id], [:state_id, :state_id_jurisdiction]], - } + }.merge(ab_test_args) end it 'renders the show template' do diff --git a/spec/controllers/idv/link_sent_controller_spec.rb b/spec/controllers/idv/link_sent_controller_spec.rb index 9a4268d8411..fd570d7b43a 100644 --- a/spec/controllers/idv/link_sent_controller_spec.rb +++ b/spec/controllers/idv/link_sent_controller_spec.rb @@ -4,12 +4,16 @@ include IdvHelper let(:flow_session) do - { 'document_capture_session_uuid' => 'fd14e181-6fb1-4cdc-92e0-ef66dad0df4e', - :threatmetrix_session_id => 'c90ae7a5-6629-4e77-b97c-f1987c2df7d0' } + { document_capture_session_uuid: 'fd14e181-6fb1-4cdc-92e0-ef66dad0df4e', + threatmetrix_session_id: 'c90ae7a5-6629-4e77-b97c-f1987c2df7d0' } end let(:user) { create(:user) } + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do allow(subject).to receive(:flow_session).and_return(flow_session) stub_sign_in(user) @@ -17,6 +21,7 @@ stub_analytics stub_attempts_tracker allow(@analytics).to receive(:track_event) + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -50,7 +55,7 @@ flow_path: 'hybrid', irs_reproofing: false, step: 'link_sent', - } + }.merge(ab_test_args) end it 'renders the show template' do @@ -113,7 +118,7 @@ flow_path: 'hybrid', irs_reproofing: false, step: 'link_sent', - } + }.merge(ab_test_args) end it 'sends analytics_submitted event' do diff --git a/spec/controllers/idv/review_controller_spec.rb b/spec/controllers/idv/review_controller_spec.rb index 472dee4e527..dfa499b8a79 100644 --- a/spec/controllers/idv/review_controller_spec.rb +++ b/spec/controllers/idv/review_controller_spec.rb @@ -25,9 +25,14 @@ idv_session end + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do stub_analytics allow(IdentityConfig.store).to receive(:usps_mock_fallback).and_return(false) + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -255,6 +260,7 @@ def show gpo_verification_pending: false, proofing_components: nil, deactivation_reason: nil, + **ab_test_args, ) end end @@ -277,6 +283,7 @@ def show gpo_verification_pending: false, proofing_components: nil, deactivation_reason: anything, + **ab_test_args, ) expect(@analytics).to have_logged_event( 'IdV: final resolution', @@ -613,6 +620,7 @@ def show gpo_verification_pending: false, proofing_components: nil, deactivation_reason: nil, + **ab_test_args, ) expect(@analytics).to have_logged_event( 'IdV: final resolution', @@ -622,6 +630,7 @@ def show gpo_verification_pending: false, proofing_components: nil, deactivation_reason: nil, + **ab_test_args, ) end diff --git a/spec/controllers/idv/ssn_controller_spec.rb b/spec/controllers/idv/ssn_controller_spec.rb index e09163a90ed..3ee13eee5af 100644 --- a/spec/controllers/idv/ssn_controller_spec.rb +++ b/spec/controllers/idv/ssn_controller_spec.rb @@ -13,6 +13,10 @@ let(:user) { create(:user) } + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do stub_sign_in(user) subject.user_session['idv/doc_auth'] = flow_session @@ -20,6 +24,7 @@ stub_analytics stub_attempts_tracker allow(@analytics).to receive(:track_event) + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -60,7 +65,7 @@ flow_path: 'standard', irs_reproofing: false, step: 'ssn', - } + }.merge(ab_test_args) end it 'renders the show template' do @@ -166,7 +171,7 @@ success: true, errors: {}, pii_like_keypaths: [[:errors, :ssn], [:error_details, :ssn]], - } + }.merge(ab_test_args) end it 'merges ssn into pii session value' do @@ -242,7 +247,7 @@ }, error_details: { ssn: [:invalid] }, pii_like_keypaths: [[:errors, :ssn], [:error_details, :ssn]], - } + }.merge(ab_test_args) end render_views diff --git a/spec/controllers/idv/verify_info_controller_spec.rb b/spec/controllers/idv/verify_info_controller_spec.rb index 8a96ceea9e8..65d72cd5d2a 100644 --- a/spec/controllers/idv/verify_info_controller_spec.rb +++ b/spec/controllers/idv/verify_info_controller_spec.rb @@ -17,7 +17,11 @@ flow_path: 'standard', irs_reproofing: false, step: 'verify', - } + }.merge(ab_test_args) + end + + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } end before do @@ -26,6 +30,7 @@ stub_idv_steps_before_verify_step(user) subject.idv_session.flow_path = 'standard' subject.user_session['idv/doc_auth'] = flow_session + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -59,7 +64,7 @@ flow_path: 'standard', irs_reproofing: false, step: 'verify', - } + }.merge(ab_test_args) end it 'renders the show template' do diff --git a/spec/controllers/idv/welcome_controller_spec.rb b/spec/controllers/idv/welcome_controller_spec.rb index ca531e9414b..74eca03573b 100644 --- a/spec/controllers/idv/welcome_controller_spec.rb +++ b/spec/controllers/idv/welcome_controller_spec.rb @@ -5,10 +5,15 @@ let(:user) { create(:user) } + let(:ab_test_args) do + { sample_bucket1: :sample_value1, sample_bucket2: :sample_value2 } + end + before do stub_sign_in(user) stub_analytics subject.user_session['idv/doc_auth'] = {} + allow(subject).to receive(:ab_test_analytics_buckets).and_return(ab_test_args) end describe 'before_actions' do @@ -37,9 +42,11 @@ describe '#show' do let(:analytics_name) { 'IdV: doc auth welcome visited' } let(:analytics_args) do - { step: 'welcome', + { + step: 'welcome', analytics_id: 'Doc Auth', - irs_reproofing: false } + irs_reproofing: false, + }.merge(ab_test_args) end it 'renders the show template' do @@ -87,9 +94,11 @@ let(:analytics_name) { 'IdV: doc auth welcome submitted' } let(:analytics_args) do - { step: 'welcome', + { + step: 'welcome', analytics_id: 'Doc Auth', - irs_reproofing: false } + irs_reproofing: false, + }.merge(ab_test_args) end it 'sends analytics_submitted event' do diff --git a/spec/features/idv/analytics_spec.rb b/spec/features/idv/analytics_spec.rb index 37bb9259006..7ee0c172226 100644 --- a/spec/features/idv/analytics_spec.rb +++ b/spec/features/idv/analytics_spec.rb @@ -32,33 +32,33 @@ let(:happy_path_events) do { 'IdV: intro visited' => {}, - 'IdV: doc auth welcome visited' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth welcome submitted' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth agreement visited' => { step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth welcome visited' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth welcome submitted' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth agreement visited' => { step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome }, 'IdV: consent checkbox toggled' => { checked: true }, - 'IdV: doc auth agreement submitted' => { success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth hybrid handoff submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false }, - 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth agreement submitted' => { success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth hybrid handoff submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false }, + 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, 'Frontend: IdV: front image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything }, 'Frontend: IdV: back image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything }, 'IdV: doc auth image upload form submitted' => { success: true, errors: {}, attempts: 1, remaining_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String) }, 'IdV: doc auth image upload vendor pii validation' => { success: true, errors: {}, user_id: user.uuid, attempts: 1, remaining_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String) }, - 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth ssn visited' => { flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth ssn submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth verify visited' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth verify submitted' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth verify proofing results' => { success: true, errors: {}, address_edited: false, address_line2_present: false, ssn_is_unique: true, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', double_address_verification: false, resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired' }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, + 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth ssn visited' => { flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth ssn submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth verify visited' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth verify submitted' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth verify proofing results' => { success: true, errors: {}, address_edited: false, address_line2_present: false, ssn_is_unique: true, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', double_address_verification: false, resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired' }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone of record visited' => { proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass' } }, 'IdV: phone confirmation form' => { success: true, errors: {}, phone_type: :mobile, types: [:fixed_or_mobile], carrier: 'Test Mobile Carrier', country_code: 'US', area_code: '202', proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass' }, otp_delivery_preference: 'sms' }, 'IdV: phone confirmation vendor' => { success: true, errors: {}, vendor: { exception: nil, vendor_name: 'AddressMock', transaction_id: 'address-mock-transaction-id-123', timed_out: false, reference: '' }, new_phone_added: false, 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' }, area_code: '202', country_code: 'US', phone_fingerprint: anything }, 'IdV: phone confirmation otp sent' => { success: true, otp_delivery_preference: :sms, country_code: 'US', area_code: '202', 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' }, adapter: :test, errors: {}, phone_fingerprint: anything, rate_limit_exceeded: false, telephony_response: anything }, 'IdV: phone confirmation otp visited' => { 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, second_factor_attempts_count: 0, second_factor_locked_at: 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' }, errors: {} }, - 'IdV: review info visited' => { address_verification_method: 'phone', 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: review complete' => { success: true, 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' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: false, deactivation_reason: nil }, - 'IdV: final resolution' => { success: true, 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' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: false, deactivation_reason: nil }, + 'IdV: review info visited' => { address_verification_method: 'phone', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, 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: review complete' => { success: true, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, 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' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: false, deactivation_reason: nil }, + 'IdV: final resolution' => { success: true, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, 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' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: false, deactivation_reason: nil }, 'IdV: personal key visited' => { address_verification_method: 'phone', 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: personal key acknowledgment toggled' => { checked: true, 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: personal key submitted' => { address_verification_method: 'phone', 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' }, fraud_review_pending: false, fraud_rejection: false, deactivation_reason: nil }, @@ -68,42 +68,42 @@ let(:gpo_path_events) do { 'IdV: intro visited' => {}, - 'IdV: doc auth welcome visited' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth welcome submitted' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth agreement visited' => { step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth agreement submitted' => { success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth hybrid handoff submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false }, - 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth welcome visited' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth welcome submitted' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth agreement visited' => { step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth agreement submitted' => { success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth hybrid handoff submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false }, + 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, 'Frontend: IdV: front image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything }, 'Frontend: IdV: back image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything }, 'IdV: doc auth image upload form submitted' => { success: true, errors: {}, attempts: 1, remaining_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String) }, 'IdV: doc auth image upload vendor pii validation' => { success: true, errors: {}, user_id: user.uuid, attempts: 1, remaining_attempts: 3, flow_path: 'standard', attention_with_barcode: false, front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String) }, - 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth ssn visited' => { flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth ssn submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth verify visited' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth verify submitted' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth verify proofing results' => { success: true, errors: {}, address_edited: false, address_line2_present: false, ssn_is_unique: true, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', double_address_verification: false, should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired' }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, + 'IdV: doc auth document_capture submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth ssn visited' => { flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth ssn submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'ssn', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth verify visited' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth verify submitted' => { flow_path: 'standard', step: 'verify', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth verify proofing results' => { success: true, errors: {}, address_edited: false, address_line2_present: false, ssn_is_unique: true, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', resolution_adjudication_reason: 'pass_resolution_and_state_id', double_address_verification: false, should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired' }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone of record visited' => { proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass' } }, 'IdV: USPS address letter requested' => { resend: false, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass' } }, - 'IdV: review info visited' => { address_verification_method: 'gpo', proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'gpo_letter' } }, + 'IdV: review info visited' => { address_verification_method: 'gpo', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'gpo_letter' } }, 'IdV: USPS address letter enqueued' => { enqueued_at: Time.zone.now.utc, resend: false, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'gpo_letter' } }, - 'IdV: review complete' => { success: true, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'gpo_letter' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: true, deactivation_reason: nil }, - 'IdV: final resolution' => { success: true, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'gpo_letter' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: true, deactivation_reason: nil }, + 'IdV: review complete' => { success: true, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'gpo_letter' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: true, deactivation_reason: nil }, + 'IdV: final resolution' => { success: true, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'gpo_letter' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: true, deactivation_reason: nil }, 'IdV: come back later visited' => { proofing_components: { document_check: 'mock', document_type: 'state_id', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'gpo_letter' } }, } end let(:in_person_path_events) do { - 'IdV: doc auth welcome visited' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth welcome submitted' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth agreement visited' => { step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth agreement submitted' => { success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, - 'IdV: doc auth hybrid handoff submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false }, - 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth welcome visited' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth welcome submitted' => { step: 'welcome', analytics_id: 'Doc Auth', irs_reproofing: false, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth agreement visited' => { step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth agreement submitted' => { success: true, errors: {}, step: 'agreement', analytics_id: 'Doc Auth', irs_reproofing: false, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth hybrid handoff visited' => { step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, + 'IdV: doc auth hybrid handoff submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'hybrid_handoff', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false }, + 'IdV: doc auth document_capture visited' => { flow_path: 'standard', step: 'document_capture', acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, analytics_id: 'Doc Auth', irs_reproofing: false }, 'Frontend: IdV: front image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything }, 'Frontend: IdV: back image added' => { 'width' => 284, 'height' => 38, 'mimeType' => 'image/png', 'source' => 'upload', 'size' => 3694, 'attempt' => 1, 'flow_path' => 'standard', 'acuant_sdk_upgrade_a_b_testing_enabled' => 'false', 'use_alternate_sdk' => anything, 'acuant_version' => anything }, 'IdV: doc auth image upload form submitted' => { success: true, errors: {}, attempts: 1, remaining_attempts: 3, user_id: user.uuid, flow_path: 'standard', front_image_fingerprint: an_instance_of(String), back_image_fingerprint: an_instance_of(String) }, @@ -119,17 +119,17 @@ 'IdV: in person proofing address submitted' => { success: true, step: 'address', flow_path: 'standard', step_count: 1, analytics_id: 'In Person Proofing', irs_reproofing: false, errors: {}, same_address_as_id: true }, 'IdV: doc auth ssn visited' => { analytics_id: 'In Person Proofing', step: 'ssn', flow_path: 'standard', step_count: 1, irs_reproofing: false, same_address_as_id: true }, 'IdV: doc auth ssn submitted' => { analytics_id: 'In Person Proofing', success: true, step: 'ssn', flow_path: 'standard', step_count: 1, irs_reproofing: false, errors: {}, same_address_as_id: true }, - 'IdV: doc auth verify visited' => { analytics_id: 'In Person Proofing', step: 'verify', flow_path: 'standard', irs_reproofing: false, same_address_as_id: true }, - 'IdV: doc auth verify submitted' => { analytics_id: 'In Person Proofing', step: 'verify', flow_path: 'standard', irs_reproofing: false, same_address_as_id: true }, - 'IdV: doc auth verify proofing results' => { success: true, errors: {}, address_edited: false, address_line2_present: false, ssn_is_unique: true, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', double_address_verification: false, resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired' }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, + 'IdV: doc auth verify visited' => { analytics_id: 'In Person Proofing', step: 'verify', flow_path: 'standard', irs_reproofing: false, same_address_as_id: true, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth verify submitted' => { analytics_id: 'In Person Proofing', step: 'verify', flow_path: 'standard', irs_reproofing: false, same_address_as_id: true, getting_started_ab_test_bucket: :welcome }, + 'IdV: doc auth verify proofing results' => { success: true, errors: {}, address_edited: false, address_line2_present: false, ssn_is_unique: true, getting_started_ab_test_bucket: :welcome, proofing_results: { exception: nil, timed_out: false, threatmetrix_review_status: 'pass', context: { device_profiling_adjudication_reason: 'device_profiling_result_pass', double_address_verification: false, resolution_adjudication_reason: 'pass_resolution_and_state_id', should_proof_state_id: true, stages: { resolution: { success: true, errors: {}, exception: nil, timed_out: false, transaction_id: 'resolution-mock-transaction-id-123', reference: 'aaa-bbb-ccc', can_pass_with_additional_verification: false, attributes_requiring_additional_verification: [], vendor_name: 'ResolutionMock', vendor_workflow: nil }, residential_address: { errors: {}, exception: nil, reference: '', success: true, timed_out: false, transaction_id: '', vendor_name: 'ResidentialAddressNotRequired' }, state_id: { success: true, errors: {}, exception: nil, mva_exception: nil, timed_out: false, transaction_id: 'state-id-mock-transaction-id-456', vendor_name: 'StateIdMock', verified_attributes: [], state: 'MT', state_id_jurisdiction: 'ND', state_id_number: '#############' }, threatmetrix: threatmetrix_response } } } }, 'IdV: phone confirmation form' => { success: true, errors: {}, phone_type: :mobile, types: [:fixed_or_mobile], carrier: 'Test Mobile Carrier', country_code: 'US', area_code: '202', proofing_components: { document_check: 'usps', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', source_check: 'aamva' }, otp_delivery_preference: 'sms' }, 'IdV: phone confirmation vendor' => { success: true, errors: {}, vendor: { exception: nil, vendor_name: 'AddressMock', transaction_id: 'address-mock-transaction-id-123', timed_out: false, reference: '' }, new_phone_added: false, proofing_components: { address_check: 'lexis_nexis_address', document_check: 'usps', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', source_check: 'aamva' }, area_code: '202', country_code: 'US', phone_fingerprint: anything }, 'IdV: phone confirmation otp sent' => { success: true, otp_delivery_preference: :sms, country_code: 'US', area_code: '202', proofing_components: { address_check: 'lexis_nexis_address', document_check: 'usps', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', source_check: 'aamva' }, adapter: :test, errors: {}, phone_fingerprint: anything, rate_limit_exceeded: false, telephony_response: anything }, 'IdV: phone confirmation otp visited' => { 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, second_factor_attempts_count: 0, second_factor_locked_at: nil, proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }, errors: {} }, - 'IdV: review info visited' => { proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }, address_verification_method: 'phone' }, - 'IdV: review complete' => { success: true, proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: false, deactivation_reason: 'in_person_verification_pending' }, - 'IdV: final resolution' => { success: true, proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: false, deactivation_reason: 'in_person_verification_pending' }, + 'IdV: review info visited' => { acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }, address_verification_method: 'phone' }, + 'IdV: review complete' => { success: true, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: false, deactivation_reason: 'in_person_verification_pending' }, + 'IdV: final resolution' => { success: true, acuant_sdk_upgrade_ab_test_bucket: :default, getting_started_ab_test_bucket: :welcome, proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }, fraud_review_pending: false, fraud_rejection: false, gpo_verification_pending: false, deactivation_reason: 'in_person_verification_pending' }, 'IdV: personal key visited' => { proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }, address_verification_method: 'phone' }, 'IdV: personal key acknowledgment toggled' => { checked: true, proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' } }, 'IdV: personal key submitted' => { proofing_components: { document_check: 'usps', source_check: 'aamva', resolution_check: 'lexis_nexis', threatmetrix: threatmetrix, threatmetrix_review_status: 'pass', address_check: 'lexis_nexis_address' }, address_verification_method: 'phone', fraud_review_pending: false, fraud_rejection: false, deactivation_reason: 'in_person_verification_pending' }, diff --git a/spec/features/idv/hybrid_mobile/hybrid_mobile_spec.rb b/spec/features/idv/hybrid_mobile/hybrid_mobile_spec.rb index 2f8ad0ff54c..72d008befb8 100644 --- a/spec/features/idv/hybrid_mobile/hybrid_mobile_spec.rb +++ b/spec/features/idv/hybrid_mobile/hybrid_mobile_spec.rb @@ -45,6 +45,12 @@ expect(page).to have_current_path(root_url) visit idv_hybrid_mobile_document_capture_url + # Confirm that jumping to Welcome page does not cause errors + # This was added for the GettingStarted A/B Test + visit idv_welcome_url + expect(page).to have_current_path(root_url) + visit idv_hybrid_mobile_document_capture_url + attach_and_submit_images expect(page).to have_current_path(idv_hybrid_mobile_capture_complete_url)