From a027dcccfccfe497eebed4af7fe3ef73cfd767aa Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 16 Aug 2024 09:52:50 -0400 Subject: [PATCH 1/4] Document analytics methods in critical IdV flow --- app/services/analytics_events.rb | 3 +++ spec/features/idv/account_creation_spec.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/services/analytics_events.rb b/app/services/analytics_events.rb index 45edc502c4a..87b6c76bc44 100644 --- a/app/services/analytics_events.rb +++ b/app/services/analytics_events.rb @@ -1478,6 +1478,7 @@ def idv_doc_auth_submitted_image_upload_form( # @param [Boolean] selfie_quality_good Selfie quality result # @param [String] workflow LexisNexis TrueID workflow # @param [String] birth_year Birth year from document + # @param [Integer] issue_year Year document was issued # @option extra [String] 'DocumentName' # @option extra [String] 'DocAuthResult' # @option extra [String] 'DocIssuerCode' @@ -1505,6 +1506,7 @@ def idv_doc_auth_submitted_image_upload_vendor( client_image_metrics:, flow_path:, liveness_checking_required:, + issue_year:, billed: nil, doc_auth_result: nil, vendor_request_time_in_ms: nil, @@ -1578,6 +1580,7 @@ def idv_doc_auth_submitted_image_upload_vendor( selfie_quality_good:, workflow:, birth_year:, + issue_year:, **extra, ) end diff --git a/spec/features/idv/account_creation_spec.rb b/spec/features/idv/account_creation_spec.rb index ffb7475f902..76bf8d6fc12 100644 --- a/spec/features/idv/account_creation_spec.rb +++ b/spec/features/idv/account_creation_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe 'IAL2 account creation', allowed_extra_analytics: [:*] do +RSpec.describe 'IAL2 account creation' do include IdvHelper include DocAuthHelper include SamlAuthHelper From f662185181ac516c91a9cfa14d70058fc28dbc8b Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 16 Aug 2024 11:37:24 -0400 Subject: [PATCH 2/4] Remove unnecessary allowed_extra_analytics --- spec/controllers/idv/image_uploads_controller_spec.rb | 2 +- spec/features/idv/cancel_spec.rb | 2 +- spec/features/idv/doc_auth/ssn_step_spec.rb | 2 +- spec/features/idv/gpo_disabled_spec.rb | 2 +- spec/features/idv/phone_input_spec.rb | 2 +- spec/features/idv/proofing_components_spec.rb | 2 +- spec/features/idv/sp_requested_attributes_spec.rb | 2 +- spec/features/idv/step_up_spec.rb | 2 +- spec/features/idv/steps/phone_otp_verification_step_spec.rb | 2 +- spec/features/idv/threat_metrix_pending_spec.rb | 2 +- spec/features/idv/uak_password_spec.rb | 2 +- spec/features/sp_cost_tracking_spec.rb | 2 +- spec/features/users/password_recovery_via_recovery_code_spec.rb | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/spec/controllers/idv/image_uploads_controller_spec.rb b/spec/controllers/idv/image_uploads_controller_spec.rb index 7f88b87a450..6dc3d4cb7e4 100644 --- a/spec/controllers/idv/image_uploads_controller_spec.rb +++ b/spec/controllers/idv/image_uploads_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe Idv::ImageUploadsController, allowed_extra_analytics: [:*] do +RSpec.describe Idv::ImageUploadsController do include DocPiiHelper let(:document_filename_regex) { /^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}\.[a-z]+$/ } diff --git a/spec/features/idv/cancel_spec.rb b/spec/features/idv/cancel_spec.rb index 0eddb6e18d0..158eadf7835 100644 --- a/spec/features/idv/cancel_spec.rb +++ b/spec/features/idv/cancel_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe 'cancel IdV', allowed_extra_analytics: [:*] do +RSpec.describe 'cancel IdV' do include IdvStepHelper include DocAuthHelper include InteractionHelper diff --git a/spec/features/idv/doc_auth/ssn_step_spec.rb b/spec/features/idv/doc_auth/ssn_step_spec.rb index 36c5388e991..e71d256f10e 100644 --- a/spec/features/idv/doc_auth/ssn_step_spec.rb +++ b/spec/features/idv/doc_auth/ssn_step_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'ssn step mock proofer', :js, allowed_extra_analytics: [:*] do +RSpec.feature 'ssn step mock proofer', :js do include IdvStepHelper include DocAuthHelper diff --git a/spec/features/idv/gpo_disabled_spec.rb b/spec/features/idv/gpo_disabled_spec.rb index 6830557ba10..859ded499fc 100644 --- a/spec/features/idv/gpo_disabled_spec.rb +++ b/spec/features/idv/gpo_disabled_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'disabling GPO address verification', allowed_extra_analytics: [:*] do +RSpec.feature 'disabling GPO address verification' do include IdvStepHelper context 'with GPO address verification disabled' do diff --git a/spec/features/idv/phone_input_spec.rb b/spec/features/idv/phone_input_spec.rb index aa5e7ab07b1..1dfcf9fc3c1 100644 --- a/spec/features/idv/phone_input_spec.rb +++ b/spec/features/idv/phone_input_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'IdV phone number input', :js, allowed_extra_analytics: [:*] do +RSpec.feature 'IdV phone number input', :js do include IdvStepHelper before do diff --git a/spec/features/idv/proofing_components_spec.rb b/spec/features/idv/proofing_components_spec.rb index 9849497c69d..a12f58ad57f 100644 --- a/spec/features/idv/proofing_components_spec.rb +++ b/spec/features/idv/proofing_components_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe 'proofing components', allowed_extra_analytics: [:*] do +RSpec.describe 'proofing components' do include DocAuthHelper include IdvHelper include SamlAuthHelper diff --git a/spec/features/idv/sp_requested_attributes_spec.rb b/spec/features/idv/sp_requested_attributes_spec.rb index c8b1ef926e6..4140120f3fb 100644 --- a/spec/features/idv/sp_requested_attributes_spec.rb +++ b/spec/features/idv/sp_requested_attributes_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'sp requested IdV attributes', :email, allowed_extra_analytics: [:*] do +RSpec.feature 'sp requested IdV attributes', :email do context 'oidc' do it_behaves_like 'sp requesting attributes', :oidc end diff --git a/spec/features/idv/step_up_spec.rb b/spec/features/idv/step_up_spec.rb index 98348efb05d..e00732f1a8b 100644 --- a/spec/features/idv/step_up_spec.rb +++ b/spec/features/idv/step_up_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe 'IdV step up flow', allowed_extra_analytics: [:*] do +RSpec.describe 'IdV step up flow' do include IdvStepHelper include InPersonHelper diff --git a/spec/features/idv/steps/phone_otp_verification_step_spec.rb b/spec/features/idv/steps/phone_otp_verification_step_spec.rb index 06420ce6e87..5b397d0fcfd 100644 --- a/spec/features/idv/steps/phone_otp_verification_step_spec.rb +++ b/spec/features/idv/steps/phone_otp_verification_step_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'phone otp verification step spec', :js, allowed_extra_analytics: [:*] do +RSpec.feature 'phone otp verification step spec', :js do include IdvStepHelper it 'requires the user to enter the correct otp before continuing' do diff --git a/spec/features/idv/threat_metrix_pending_spec.rb b/spec/features/idv/threat_metrix_pending_spec.rb index e5a1b5b8bcf..43686859d25 100644 --- a/spec/features/idv/threat_metrix_pending_spec.rb +++ b/spec/features/idv/threat_metrix_pending_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'Users pending ThreatMetrix review', :js, allowed_extra_analytics: [:*] do +RSpec.feature 'Users pending ThreatMetrix review', :js do include IdvStepHelper include OidcAuthHelper include DocAuthHelper diff --git a/spec/features/idv/uak_password_spec.rb b/spec/features/idv/uak_password_spec.rb index ec66f31775e..61bdbd335ee 100644 --- a/spec/features/idv/uak_password_spec.rb +++ b/spec/features/idv/uak_password_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'A user with a UAK passwords attempts IdV', allowed_extra_analytics: [:*] do +RSpec.feature 'A user with a UAK passwords attempts IdV' do include IdvStepHelper it 'allows the user to continue to the SP', js: true do diff --git a/spec/features/sp_cost_tracking_spec.rb b/spec/features/sp_cost_tracking_spec.rb index 8bf74757b6a..9526068ac37 100644 --- a/spec/features/sp_cost_tracking_spec.rb +++ b/spec/features/sp_cost_tracking_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'SP Costing', :email, allowed_extra_analytics: [:*] do +RSpec.feature 'SP Costing', :email do include SpAuthHelper include SamlAuthHelper include IdvHelper diff --git a/spec/features/users/password_recovery_via_recovery_code_spec.rb b/spec/features/users/password_recovery_via_recovery_code_spec.rb index 6c755692ba0..9af1df8b475 100644 --- a/spec/features/users/password_recovery_via_recovery_code_spec.rb +++ b/spec/features/users/password_recovery_via_recovery_code_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'Password recovery via personal key', allowed_extra_analytics: [:*] do +RSpec.feature 'Password recovery via personal key' do include PersonalKeyHelper include IdvStepHelper include SamlAuthHelper From def45c94e6c7c563225c9ed06f3a81d817071616 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 16 Aug 2024 11:37:39 -0400 Subject: [PATCH 3/4] Update FakeAnalytics spec to pass required properties --- spec/support/fake_analytics_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/support/fake_analytics_spec.rb b/spec/support/fake_analytics_spec.rb index 381aa6fa95f..fb3533c0cc8 100644 --- a/spec/support/fake_analytics_spec.rb +++ b/spec/support/fake_analytics_spec.rb @@ -621,6 +621,7 @@ client_image_metrics: nil, flow_path: nil, liveness_checking_required: nil, + issue_year: nil, 'DocumentName' => 'some_name', ) From 90a3eaac7a466b72025e6b450db2719bbf3ccc27 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 16 Aug 2024 13:05:24 -0400 Subject: [PATCH 4/4] Add changelog changelog: Internal, Documentation, Document analytics methods properties