diff --git a/app/controllers/concerns/idv_step_concern.rb b/app/controllers/concerns/idv_step_concern.rb
index fd879cddcbe..043dff1ca91 100644
--- a/app/controllers/concerns/idv_step_concern.rb
+++ b/app/controllers/concerns/idv_step_concern.rb
@@ -48,8 +48,8 @@ def confirm_document_capture_complete
redirect_to idv_document_capture_url
elsif flow_path == 'hybrid'
redirect_to idv_link_sent_url
- else # no flow_path, go to UploadStep via FSM
- redirect_to idv_doc_auth_url
+ else # no flow_path
+ redirect_to idv_hybrid_handoff_path
end
end
diff --git a/app/controllers/idv/doc_auth_controller.rb b/app/controllers/idv/doc_auth_controller.rb
index 84078e5a105..4e41f637749 100644
--- a/app/controllers/idv/doc_auth_controller.rb
+++ b/app/controllers/idv/doc_auth_controller.rb
@@ -21,7 +21,7 @@ class DocAuthController < ApplicationController
FLOW_STATE_MACHINE_SETTINGS = {
step_url: :idv_doc_auth_step_url,
- final_url: :idv_link_sent_url,
+ final_url: :idv_hybrid_handoff_url,
flow: Idv::Flows::DocAuthFlow,
analytics_id: 'Doc Auth',
}.freeze
diff --git a/app/controllers/idv/document_capture_controller.rb b/app/controllers/idv/document_capture_controller.rb
index a3a8056c1af..a5b14ba47ec 100644
--- a/app/controllers/idv/document_capture_controller.rb
+++ b/app/controllers/idv/document_capture_controller.rb
@@ -56,11 +56,7 @@ def extra_view_variables
def confirm_upload_step_complete
return if flow_session[:flow_path].present?
- if IdentityConfig.store.doc_auth_hybrid_handoff_controller_enabled
- redirect_to idv_hybrid_handoff_url
- else
- redirect_to idv_doc_auth_url
- end
+ redirect_to idv_hybrid_handoff_url
end
def confirm_document_capture_needed
diff --git a/app/controllers/idv/hybrid_handoff_controller.rb b/app/controllers/idv/hybrid_handoff_controller.rb
index c4a60900f4c..b04d02375a9 100644
--- a/app/controllers/idv/hybrid_handoff_controller.rb
+++ b/app/controllers/idv/hybrid_handoff_controller.rb
@@ -45,7 +45,6 @@ def handle_phone_submission
throttle.increment!
return throttled_failure if throttle.throttled?
idv_session.phone_for_mobile_flow = params[:doc_auth][:phone]
- flow_session[:phone_for_mobile_flow] = idv_session.phone_for_mobile_flow
flow_session[:flow_path] = 'hybrid'
telephony_result = send_link
telephony_form_response = build_telephony_form_response(telephony_result)
@@ -63,9 +62,6 @@ def handle_phone_submission
if !failure_reason
redirect_to idv_link_sent_url
-
- # for the 50/50 state
- flow_session['Idv::Steps::UploadStep'] = true
else
redirect_to idv_hybrid_handoff_url
flow_session[:flow_path] = nil
@@ -124,9 +120,6 @@ def bypass_send_link_steps
flow_session[:flow_path] = 'standard'
redirect_to idv_document_capture_url
- # for the 50/50 state
- flow_session['Idv::Steps::UploadStep'] = true
-
analytics.idv_doc_auth_upload_submitted(
**analytics_arguments.merge(
form_response(destination: :document_capture).to_h,
diff --git a/app/controllers/idv/link_sent_controller.rb b/app/controllers/idv/link_sent_controller.rb
index d8e2832f38d..a144f7aa38b 100644
--- a/app/controllers/idv/link_sent_controller.rb
+++ b/app/controllers/idv/link_sent_controller.rb
@@ -36,7 +36,7 @@ def update
end
def extra_view_variables
- { phone: flow_session[:phone_for_mobile_flow],
+ { phone: idv_session.phone_for_mobile_flow,
flow_session: flow_session }
end
@@ -47,10 +47,8 @@ def confirm_upload_step_complete
if flow_session[:flow_path] == 'standard'
redirect_to idv_document_capture_url
- elsif IdentityConfig.store.doc_auth_hybrid_handoff_controller_enabled
- redirect_to idv_hybrid_handoff_url
else
- redirect_to idv_doc_auth_url
+ redirect_to idv_hybrid_handoff_url
end
end
@@ -75,18 +73,12 @@ def analytics_arguments
def handle_document_verification_success(get_results_response)
save_proofing_components(current_user)
extract_pii_from_doc(current_user, get_results_response, store_in_session: true)
- mark_upload_step_complete
flow_session[:flow_path] = 'hybrid'
end
def render_document_capture_cancelled
- if IdentityConfig.store.doc_auth_hybrid_handoff_controller_enabled
- redirect_to idv_hybrid_handoff_url
- flow_session[:flow_path] = nil
- else
- mark_upload_step_incomplete
- redirect_to idv_doc_auth_url # was idv_url, why?
- end
+ redirect_to idv_hybrid_handoff_url
+ flow_session[:flow_path] = nil
failure(I18n.t('errors.doc_auth.document_capture_cancelled'))
end
@@ -105,14 +97,6 @@ def document_capture_session_result
end
end
- def mark_upload_step_complete
- flow_session['Idv::Steps::UploadStep'] = true
- end
-
- def mark_upload_step_incomplete
- flow_session['Idv::Steps::UploadStep'] = nil
- end
-
def extend_timeout_using_meta_refresh
max_10min_refreshes = IdentityConfig.store.doc_auth_extend_timeout_by_minutes / 10
return if max_10min_refreshes <= 0
diff --git a/app/services/idv/actions/cancel_link_sent_action.rb b/app/services/idv/actions/cancel_link_sent_action.rb
index 60393229121..31977fb6b11 100644
--- a/app/services/idv/actions/cancel_link_sent_action.rb
+++ b/app/services/idv/actions/cancel_link_sent_action.rb
@@ -6,12 +6,8 @@ def self.analytics_submitted_event
end
def call
- if IdentityConfig.store.doc_auth_hybrid_handoff_controller_enabled
- redirect_to idv_hybrid_handoff_url
- flow_session[:flow_path] = nil
- else
- mark_step_incomplete(:upload)
- end
+ redirect_to idv_hybrid_handoff_url
+ flow_session[:flow_path] = nil
end
end
end
diff --git a/app/services/idv/actions/redo_document_capture_action.rb b/app/services/idv/actions/redo_document_capture_action.rb
index 40ffbe4aabe..4c1678f9dbf 100644
--- a/app/services/idv/actions/redo_document_capture_action.rb
+++ b/app/services/idv/actions/redo_document_capture_action.rb
@@ -9,11 +9,9 @@ def call
flow_session['redo_document_capture'] = true
if flow_session[:skip_upload_step]
redirect_to idv_document_capture_url
- elsif IdentityConfig.store.doc_auth_hybrid_handoff_controller_enabled
+ else
redirect_to idv_hybrid_handoff_url
flow_session[:flow_path] = nil
- else
- mark_step_incomplete(:upload)
end
end
end
diff --git a/app/services/idv/flows/doc_auth_flow.rb b/app/services/idv/flows/doc_auth_flow.rb
index 466cda4c614..bc63f0e95ac 100644
--- a/app/services/idv/flows/doc_auth_flow.rb
+++ b/app/services/idv/flows/doc_auth_flow.rb
@@ -4,7 +4,6 @@ class DocAuthFlow < Flow::BaseFlow
STEPS = {
welcome: Idv::Steps::WelcomeStep,
agreement: Idv::Steps::AgreementStep,
- upload: Idv::Steps::UploadStep,
}.freeze
STEP_INDICATOR_STEPS = [
diff --git a/app/services/idv/steps/agreement_step.rb b/app/services/idv/steps/agreement_step.rb
index 21942060dd9..0c223319459 100644
--- a/app/services/idv/steps/agreement_step.rb
+++ b/app/services/idv/steps/agreement_step.rb
@@ -12,8 +12,6 @@ def self.analytics_submitted_event
end
def call
- return if !IdentityConfig.store.doc_auth_hybrid_handoff_controller_enabled
-
if flow_session[:skip_upload_step]
redirect_to idv_document_capture_url
flow_session[:flow_path] = 'standard'
diff --git a/app/services/idv/steps/upload_step.rb b/app/services/idv/steps/upload_step.rb
deleted file mode 100644
index 21dc0ff7a8f..00000000000
--- a/app/services/idv/steps/upload_step.rb
+++ /dev/null
@@ -1,191 +0,0 @@
-module Idv
- module Steps
- class UploadStep < DocAuthBaseStep
- include ActionView::Helpers::DateHelper
- STEP_INDICATOR_STEP = :verify_id
-
- def self.analytics_visited_event
- :idv_doc_auth_upload_visited
- end
-
- def self.analytics_submitted_event
- :idv_doc_auth_upload_submitted
- end
-
- def call
- @flow.irs_attempts_api_tracker.idv_document_upload_method_selected(
- upload_method: params[:type],
- )
-
- # See the simple_form_for in
- # app/views/idv/doc_auth/upload.html.erb
- if hybrid_flow_chosen?
- handle_phone_submission
- else
- bypass_send_link_steps
- end
- end
-
- def hybrid_flow_chosen?
- params[:type] != 'desktop' && !mobile_device?
- end
-
- def extra_view_variables
- { idv_phone_form: build_form }
- end
-
- def link_for_send_link(session_uuid)
- idv_hybrid_mobile_entry_url(
- 'document-capture-session': session_uuid,
- request_id: sp_session[:request_id],
- )
- end
-
- private
-
- def build_form
- Idv::PhoneForm.new(
- previous_params: {},
- user: current_user,
- delivery_methods: [:sms],
- )
- end
-
- def form_submit
- return super unless params[:type] == 'mobile'
-
- params = permit(:phone)
- params[:otp_delivery_preference] = 'sms'
- build_form.submit(params)
- end
-
- def handle_phone_submission
- throttle.increment!
- return throttled_failure if throttle.throttled?
- idv_session[:phone_for_mobile_flow] = permit(:phone)[:phone]
- flow_session[:phone_for_mobile_flow] = idv_session[:phone_for_mobile_flow]
- telephony_result = send_link
- failure_reason = nil
- if !telephony_result.success?
- failure_reason = { telephony: [telephony_result.error.class.name.demodulize] }
- end
- @flow.irs_attempts_api_tracker.idv_phone_upload_link_sent(
- success: telephony_result.success?,
- phone_number: formatted_destination_phone,
- failure_reason: failure_reason,
- )
-
- if !failure_reason
- flow_session[:flow_path] = 'hybrid'
- redirect_to idv_link_sent_url
- end
-
- build_telephony_form_response(telephony_result)
- end
-
- def identity
- current_user&.identities&.order('created_at DESC')&.first
- end
-
- def link
- identity&.return_to_sp_url || root_url
- end
-
- def application
- identity&.friendly_name || APP_NAME
- end
-
- def bypass_send_link_steps
- flow_session[:flow_path] = 'standard'
- redirect_to idv_document_capture_url
-
- form_response(destination: :document_capture)
- end
-
- def throttle
- @throttle ||= Throttle.new(
- user: current_user,
- throttle_type: :idv_send_link,
- )
- end
-
- def throttled_failure
- @flow.analytics.throttler_rate_limit_triggered(
- throttle_type: :idv_send_link,
- )
- message = I18n.t(
- 'errors.doc_auth.send_link_throttle',
- timeout: distance_of_time_in_words(
- Time.zone.now,
- [throttle.expires_at, Time.zone.now].compact.max,
- except: :seconds,
- ),
- )
-
- @flow.irs_attempts_api_tracker.idv_phone_send_link_rate_limited(
- phone_number: formatted_destination_phone,
- )
-
- failure(message)
- end
-
- def formatted_destination_phone
- raw_phone = permit(:phone)[:phone]
- PhoneFormatter.format(raw_phone, country_code: 'US')
- end
-
- def update_document_capture_session_requested_at(session_uuid)
- document_capture_session = DocumentCaptureSession.find_by(uuid: session_uuid)
- return unless document_capture_session
- document_capture_session.update!(
- requested_at: Time.zone.now,
- cancelled_at: nil,
- issuer: sp_session[:issuer],
- )
- end
-
- def sp_or_app_name
- current_sp&.friendly_name.presence || APP_NAME
- end
-
- def send_link
- session_uuid = flow_session[:document_capture_session_uuid]
- update_document_capture_session_requested_at(session_uuid)
- Telephony.send_doc_auth_link(
- to: formatted_destination_phone,
- link: link_for_send_link(session_uuid),
- country_code: Phonelib.parse(formatted_destination_phone).country,
- sp_or_app_name: sp_or_app_name,
- )
- end
-
- def build_telephony_form_response(telephony_result)
- FormResponse.new(
- success: telephony_result.success?,
- errors: { message: telephony_result.error&.friendly_message },
- extra: {
- telephony_response: telephony_result.to_h,
- destination: :link_sent,
- },
- )
- end
-
- def mobile_device?
- # See app/javascript/packs/document-capture-welcome.js
- # And app/services/idv/steps/agreement_step.rb
- !!flow_session[:skip_upload_step]
- end
-
- def form_response(destination:)
- FormResponse.new(
- success: true,
- errors: {},
- extra: {
- destination: destination,
- skip_upload_step: mobile_device?,
- },
- )
- end
- end
- end
-end
diff --git a/app/views/idv/doc_auth/document_capture.html.erb b/app/views/idv/doc_auth/document_capture.html.erb
deleted file mode 100644
index 3fa7953f15a..00000000000
--- a/app/views/idv/doc_auth/document_capture.html.erb
+++ /dev/null
@@ -1,12 +0,0 @@
-<%= render(
- 'idv/shared/document_capture',
- document_capture_session_uuid: document_capture_session_uuid,
- flow_path: 'standard',
- sp_name: decorated_session.sp_name,
- failure_to_proof_url: idv_doc_auth_return_to_sp_url,
- acuant_sdk_upgrade_a_b_testing_enabled: acuant_sdk_upgrade_a_b_testing_enabled,
- use_alternate_sdk: use_alternate_sdk,
- acuant_version: acuant_version,
- in_person_cta_variant_testing_enabled: in_person_cta_variant_testing_enabled,
- in_person_cta_variant_active: in_person_cta_variant_active,
- ) %>
diff --git a/app/views/idv/doc_auth/link_sent.html.erb b/app/views/idv/doc_auth/link_sent.html.erb
deleted file mode 100644
index 64a557bacae..00000000000
--- a/app/views/idv/doc_auth/link_sent.html.erb
+++ /dev/null
@@ -1,51 +0,0 @@
-<% title t('titles.doc_auth.link_sent') %>
-
-
-<% if @meta_refresh && !FeatureManagement.doc_capture_polling_enabled? %>
- <%= content_for(:meta_refresh) { @meta_refresh.to_s } %>
-<% end %>
-<% if flow_session[:error_message] %>
- <%= render AlertComponent.new(
- type: :error,
- class: 'margin-bottom-4',
- message: flow_session[:error_message],
- ) %>
-<% end %>
-
-<%= render AlertComponent.new(type: :warning, class: 'margin-bottom-4') do %>
- <%= t('doc_auth.info.keep_window_open') %>
- <% if FeatureManagement.doc_capture_polling_enabled? %>
- <%= t('doc_auth.info.link_sent_complete_polling') %>
- <% else %>
- <%= t('doc_auth.info.link_sent_complete_no_polling') %>
- <% end %>
-<% end %>
-<%= render PageHeadingComponent.new.with_content(t('doc_auth.headings.text_message')) %>
-
-
- <%= image_tag asset_url('idv/phone-icon.svg'), width: 88, height: 88, alt: t('image_description.camera_mobile_phone') %>
-
-
-
- <%= t('doc_auth.info.you_entered') %>
- <%= local_assigns[:phone] %>
-
-
<%= t('doc_auth.info.link_sent') %>
-
-
-
-
- <%= button_to(
- url_for,
- method: :put,
- class: 'usa-button usa-button--big usa-button--wide',
- form_class: 'link-sent-continue-button-form',
- ) { t('forms.buttons.continue') } %>
-
-
-<% if FeatureManagement.doc_capture_polling_enabled? %>
- <%= content_tag 'script', '', data: { status_endpoint: idv_capture_doc_status_url } %>
- <%= javascript_packs_tag_once 'doc-capture-polling' %>
-<% end %>
-
-<%= render 'idv/shared/back', action: 'cancel_link_sent', class: 'link-sent-back-link' %>
diff --git a/app/views/idv/doc_auth/upload.html.erb b/app/views/idv/doc_auth/upload.html.erb
deleted file mode 100644
index f65d741af23..00000000000
--- a/app/views/idv/doc_auth/upload.html.erb
+++ /dev/null
@@ -1,74 +0,0 @@
-<% title t('titles.doc_auth.upload') %>
-
-<%= render 'idv/doc_auth/error_messages', flow_session: flow_session %>
-
-<%= render PageHeadingComponent.new do %>
- <%= t('doc_auth.headings.upload') %>
-<% end %>
-
-
- <%= t('doc_auth.info.upload') %>
-
-
-
-
- <%= image_tag(
- asset_url('idv/phone-icon.svg'),
- alt: t('image_description.camera_mobile_phone'),
- width: 88,
- height: 88,
- ) %>
-
-
-
- <%= t('doc_auth.info.tag') %>
-
-
- <%= t('doc_auth.headings.upload_from_phone') %>
-
- <%= t('doc_auth.info.upload_from_phone') %>
- <%= simple_form_for(
- idv_phone_form,
- as: :doc_auth,
- url: url_for(type: :mobile),
- method: 'PUT',
- html: { autocomplete: 'off' },
- ) do |f| %>
- <%= render PhoneInputComponent.new(
- form: f,
- required: true,
- delivery_methods: [:sms],
- class: 'margin-bottom-4',
- ) %>
- <%= f.submit t('forms.buttons.send_link') %>
- <% end %>
-
-
-
-
-
-
- <%= image_tag(
- asset_url('idv/laptop-icon.svg'),
- alt: t('image_description.laptop'),
- width: 88,
- height: 88,
- ) %>
-
-
-
- <%= t('doc_auth.headings.upload_from_computer') %>
-
- <%= t('doc_auth.info.upload_from_computer') %>
- <%= simple_form_for(
- :doc_auth,
- url: url_for(type: :desktop),
- method: 'PUT',
- class: 'margin-bottom-4',
- ) do |f| %>
- <%= f.submit t('forms.buttons.upload_photos'), outline: true %>
- <% end %>
-
-
-
-<%= render 'idv/doc_auth/cancel', step: 'upload' %>
diff --git a/config/application.yml.default b/config/application.yml.default
index e53c475b156..115f01794eb 100644
--- a/config/application.yml.default
+++ b/config/application.yml.default
@@ -90,7 +90,6 @@ doc_auth_s3_request_timeout: 5
doc_auth_error_dpi_threshold: 290
doc_auth_error_glare_threshold: 40
doc_auth_error_sharpness_threshold: 40
-doc_auth_hybrid_handoff_controller_enabled: false
doc_auth_max_attempts: 5
doc_auth_max_capture_attempts_before_tips: 3
doc_auth_max_capture_attempts_before_native_camera: 2
diff --git a/lib/identity_config.rb b/lib/identity_config.rb
index ca7e8011ed9..f0271b2ffd3 100644
--- a/lib/identity_config.rb
+++ b/lib/identity_config.rb
@@ -160,7 +160,6 @@ def self.build_store(config_map)
config.add(:doc_auth_error_glare_threshold, type: :integer)
config.add(:doc_auth_error_sharpness_threshold, type: :integer)
config.add(:doc_auth_extend_timeout_by_minutes, type: :integer)
- config.add(:doc_auth_hybrid_handoff_controller_enabled, type: :boolean)
config.add(:doc_auth_max_attempts, type: :integer)
config.add(:doc_auth_max_capture_attempts_before_native_camera, type: :integer)
config.add(:doc_auth_max_submission_attempts_before_native_camera, type: :integer)
diff --git a/spec/controllers/idv/doc_auth_controller_spec.rb b/spec/controllers/idv/doc_auth_controller_spec.rb
index df667ed9004..0d536c5cac0 100644
--- a/spec/controllers/idv/doc_auth_controller_spec.rb
+++ b/spec/controllers/idv/doc_auth_controller_spec.rb
@@ -138,7 +138,7 @@
it 'finishes the flow' do
get :show, params: { step: 'welcome' }
- expect(response).to redirect_to idv_link_sent_url
+ expect(response).to redirect_to idv_hybrid_handoff_url
end
end
end
@@ -202,7 +202,7 @@
it 'finishes the flow' do
put :update, params: { step: 'ssn' }
- expect(response).to redirect_to idv_link_sent_url
+ expect(response).to redirect_to idv_hybrid_handoff_url
end
end
end
diff --git a/spec/controllers/idv/document_capture_controller_spec.rb b/spec/controllers/idv/document_capture_controller_spec.rb
index 1d7b7d5eebb..e2f67c0faf0 100644
--- a/spec/controllers/idv/document_capture_controller_spec.rb
+++ b/spec/controllers/idv/document_capture_controller_spec.rb
@@ -79,13 +79,13 @@
)
end
- context 'upload step is not complete' do
- it 'redirects to idv_doc_auth_url' do
+ context 'hybrid handoff step is not complete' do
+ it 'redirects to hybrid handoff' do
flow_session.delete(:flow_path)
get :show
- expect(response).to redirect_to(idv_doc_auth_url)
+ expect(response).to redirect_to(idv_hybrid_handoff_url)
end
end
diff --git a/spec/controllers/idv/hybrid_handoff_controller_spec.rb b/spec/controllers/idv/hybrid_handoff_controller_spec.rb
index 19e8b525529..eae8825963f 100644
--- a/spec/controllers/idv/hybrid_handoff_controller_spec.rb
+++ b/spec/controllers/idv/hybrid_handoff_controller_spec.rb
@@ -6,8 +6,6 @@
let(:user) { create(:user) }
before do
- allow(IdentityConfig.store).to receive(:doc_auth_hybrid_handoff_controller_enabled).
- and_return(true)
stub_sign_in(user)
stub_analytics
stub_attempts_tracker
diff --git a/spec/controllers/idv/link_sent_controller_spec.rb b/spec/controllers/idv/link_sent_controller_spec.rb
index 944cd7d6405..78d80fe2cf5 100644
--- a/spec/controllers/idv/link_sent_controller_spec.rb
+++ b/spec/controllers/idv/link_sent_controller_spec.rb
@@ -6,8 +6,7 @@
let(:flow_session) do
{ 'document_capture_session_uuid' => 'fd14e181-6fb1-4cdc-92e0-ef66dad0df4e',
:threatmetrix_session_id => 'c90ae7a5-6629-4e77-b97c-f1987c2df7d0',
- :flow_path => 'hybrid',
- :phone_for_mobile_flow => '201-555-1212' }
+ :flow_path => 'hybrid' }
end
let(:user) { create(:user) }
@@ -69,12 +68,12 @@
context '#confirm_upload_step_complete' do
context 'no flow_path' do
- it 'redirects to idv_doc_auth_url' do
+ it 'redirects to idv_hybrid_handoff_url' do
flow_session[:flow_path] = nil
get :show
- expect(response).to redirect_to(idv_doc_auth_url)
+ expect(response).to redirect_to(idv_hybrid_handoff_url)
end
end
@@ -157,23 +156,11 @@
)
end
- it 'redirects to doc_auth page' do
+ it 'redirects to hybrid_handoff page' do
put :update
- expect(response).to redirect_to(idv_doc_auth_url)
+ expect(response).to redirect_to(idv_hybrid_handoff_url)
expect(flow_session[:error_message]).to eq(error_message)
- expect(flow_session['Idv::Steps::UploadStep']).to be_nil
- end
-
- context 'doc_auth_hybrid_handoff_controller_enabled is true' do
- it 'redirects to hybrid_handoff page' do
- allow(IdentityConfig.store).to receive(:doc_auth_hybrid_handoff_controller_enabled).
- and_return(true)
-
- put :update
-
- expect(response).to redirect_to(idv_hybrid_handoff_url)
- end
end
end
diff --git a/spec/controllers/idv/ssn_controller_spec.rb b/spec/controllers/idv/ssn_controller_spec.rb
index 1ac5cfd11fb..5773c0d3b69 100644
--- a/spec/controllers/idv/ssn_controller_spec.rb
+++ b/spec/controllers/idv/ssn_controller_spec.rb
@@ -79,10 +79,10 @@
context 'without a flow session' do
let(:flow_session) { nil }
- it 'redirects to doc_auth' do
+ it 'redirects to hybrid_handoff' do
get :show
- expect(response).to redirect_to(idv_doc_auth_url)
+ expect(response).to redirect_to(idv_hybrid_handoff_url)
end
end
@@ -244,11 +244,11 @@
expect(response).to redirect_to idv_link_sent_url
end
- it 'redirects to FSM UploadStep if there is no flow_path' do
+ it 'redirects to hybrid_handoff if there is no flow_path' do
flow_session[:flow_path] = nil
put :update
expect(response.status).to eq 302
- expect(response).to redirect_to idv_doc_auth_url
+ expect(response).to redirect_to idv_hybrid_handoff_url
end
end
end
diff --git a/spec/features/idv/actions/cancel_link_sent_action_spec.rb b/spec/features/idv/actions/cancel_link_sent_action_spec.rb
index 2cf54a9f177..dbeae7f3cb6 100644
--- a/spec/features/idv/actions/cancel_link_sent_action_spec.rb
+++ b/spec/features/idv/actions/cancel_link_sent_action_spec.rb
@@ -12,6 +12,6 @@
it 'returns to link sent step' do
click_doc_auth_back_link
- expect(page).to have_current_path(idv_doc_auth_upload_step)
+ expect(page).to have_current_path(idv_hybrid_handoff_path)
end
end
diff --git a/spec/features/idv/actions/redo_document_capture_action_spec.rb b/spec/features/idv/actions/redo_document_capture_action_spec.rb
index 77632d1602e..8b829a5d7ad 100644
--- a/spec/features/idv/actions/redo_document_capture_action_spec.rb
+++ b/spec/features/idv/actions/redo_document_capture_action_spec.rb
@@ -27,7 +27,7 @@
)
click_link warning_link_text
- expect(current_path).to eq(idv_doc_auth_upload_step)
+ expect(current_path).to eq(idv_hybrid_handoff_path)
complete_upload_step
DocAuth::Mock::DocAuthMockClient.reset!
attach_and_submit_images
diff --git a/spec/features/idv/analytics_spec.rb b/spec/features/idv/analytics_spec.rb
index def0bbac6f0..7eaa143066e 100644
--- a/spec/features/idv/analytics_spec.rb
+++ b/spec/features/idv/analytics_spec.rb
@@ -16,8 +16,8 @@
'IdV: doc auth agreement visited' => { flow_path: 'standard', step: 'agreement', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: consent checkbox toggled' => { checked: true },
'IdV: doc auth agreement submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'agreement', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
- 'IdV: doc auth upload visited' => { flow_path: 'standard', step: 'upload', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
- 'IdV: doc auth upload submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'upload', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false },
+ 'IdV: doc auth upload visited' => { step: 'upload', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
+ 'IdV: doc auth upload submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'upload', 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 },
'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 },
@@ -51,8 +51,8 @@
'IdV: doc auth welcome submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'welcome', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth agreement visited' => { flow_path: 'standard', step: 'agreement', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth agreement submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'agreement', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
- 'IdV: doc auth upload visited' => { flow_path: 'standard', step: 'upload', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
- 'IdV: doc auth upload submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'upload', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false },
+ 'IdV: doc auth upload visited' => { step: 'upload', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
+ 'IdV: doc auth upload submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'upload', 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 },
'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 },
@@ -79,8 +79,8 @@
'IdV: doc auth welcome submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'welcome', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth agreement visited' => { flow_path: 'standard', step: 'agreement', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
'IdV: doc auth agreement submitted' => { success: true, errors: {}, flow_path: 'standard', step: 'agreement', step_count: 1, analytics_id: 'Doc Auth', irs_reproofing: false, acuant_sdk_upgrade_ab_test_bucket: :default },
- 'IdV: doc auth upload visited' => { flow_path: 'standard', step: 'upload', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
- 'IdV: doc auth upload submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'upload', step_count: 1, acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false, skip_upload_step: false },
+ 'IdV: doc auth upload visited' => { step: 'upload', acuant_sdk_upgrade_ab_test_bucket: :default, analytics_id: 'Doc Auth', irs_reproofing: false },
+ 'IdV: doc auth upload submitted' => { success: true, errors: {}, destination: :document_capture, flow_path: 'standard', step: 'upload', 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 },
'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 },
diff --git a/spec/features/idv/doc_auth/agreement_step_spec.rb b/spec/features/idv/doc_auth/agreement_step_spec.rb
index c9c86a488b4..f73327bea8d 100644
--- a/spec/features/idv/doc_auth/agreement_step_spec.rb
+++ b/spec/features/idv/doc_auth/agreement_step_spec.rb
@@ -1,12 +1,8 @@
require 'rails_helper'
-feature 'doc auth welcome step' do
+feature 'doc auth agreement step' do
include DocAuthHelper
- def expect_doc_auth_upload_step
- expect(page).to have_current_path(idv_doc_auth_upload_step)
- end
-
def expect_doc_auth_first_step
expect(page).to have_current_path(idv_doc_auth_agreement_step)
end
@@ -28,7 +24,7 @@ def expect_doc_auth_first_step
check t('doc_auth.instructions.consent', app_name: APP_NAME)
click_continue
- expect_doc_auth_upload_step
+ expect(page).to have_current_path(idv_hybrid_handoff_path)
end
end
@@ -49,7 +45,7 @@ def expect_doc_auth_first_step
check t('doc_auth.instructions.consent', app_name: APP_NAME)
click_continue
- expect_doc_auth_upload_step
+ expect(page).to have_current_path(idv_hybrid_handoff_path)
end
end
@@ -68,41 +64,6 @@ def expect_doc_auth_first_step
it 'progresses to document capture' do
expect(page).to have_current_path(idv_document_capture_url)
end
-
- it 'logs analytics for upload step' do
- log = DocAuthLog.last
- expect(log.upload_view_count).to eq 1
- expect(log.upload_view_at).not_to be_nil
-
- expect(fake_analytics).to have_logged_event(
- 'IdV: doc auth upload visited',
- analytics_id: 'Doc Auth',
- flow_path: 'standard',
- step: 'upload', step_count: 1,
- irs_reproofing: false,
- acuant_sdk_upgrade_ab_test_bucket: :default
- )
- expect(fake_analytics).to have_logged_event(
- 'IdV: doc auth upload submitted',
- hash_including(step: 'upload', step_count: 2, success: true),
- )
- end
- end
-
- context 'doc_auth_hybrid_handoff_controller_enabled flag is true' do
- context 'skipping upload step', :js, driver: :headless_chrome_mobile do
- before do
- allow(IdentityConfig.store).to receive(:doc_auth_hybrid_handoff_controller_enabled).
- and_return(true)
- sign_in_and_2fa_user
- complete_doc_auth_steps_before_agreement_step
- complete_agreement_step
- end
-
- it 'progresses to document capture' do
- expect(page).to have_current_path(idv_document_capture_url)
- end
- end
end
context 'during the acuant maintenance window' do
diff --git a/spec/features/idv/doc_auth/document_capture_spec.rb b/spec/features/idv/doc_auth/document_capture_spec.rb
index 87c3d502eea..c8eee9ed589 100644
--- a/spec/features/idv/doc_auth/document_capture_spec.rb
+++ b/spec/features/idv/doc_auth/document_capture_spec.rb
@@ -26,7 +26,7 @@
expect(page).to have_current_path(idv_doc_auth_agreement_step)
complete_agreement_step
visit(idv_document_capture_url)
- expect(page).to have_current_path(idv_doc_auth_upload_step)
+ expect(page).to have_current_path(idv_hybrid_handoff_path)
end
context 'standard desktop flow' do
@@ -52,7 +52,7 @@
# it redirects here if trying to move earlier in the flow
visit(idv_doc_auth_agreement_step)
expect(page).to have_current_path(idv_document_capture_path)
- visit(idv_doc_auth_upload_step)
+ visit(idv_hybrid_handoff_url)
expect(page).to have_current_path(idv_document_capture_path)
end
diff --git a/spec/features/idv/doc_auth/hybrid_handoff_spec.rb b/spec/features/idv/doc_auth/hybrid_handoff_spec.rb
index 92583e99ed4..30c8cdc8f90 100644
--- a/spec/features/idv/doc_auth/hybrid_handoff_spec.rb
+++ b/spec/features/idv/doc_auth/hybrid_handoff_spec.rb
@@ -7,7 +7,6 @@
let(:fake_analytics) { FakeAnalytics.new }
let(:fake_attempts_tracker) { IrsAttemptsApiTrackingHelper::FakeAttemptsTracker.new }
- let(:new_controller_enabled) { true }
let(:document_capture_session) { DocumentCaptureSession.create! }
let(:idv_send_link_max_attempts) { 3 }
let(:idv_send_link_attempt_window_in_minutes) do
@@ -16,8 +15,6 @@
before do
sign_in_and_2fa_user
- allow(IdentityConfig.store).to receive(:doc_auth_hybrid_handoff_controller_enabled).
- and_return(new_controller_enabled)
allow_any_instance_of(Idv::HybridHandoffController).to receive(:mobile_device?).and_return(true)
allow_any_instance_of(ApplicationController).to receive(:analytics).and_return(fake_analytics)
allow_any_instance_of(ApplicationController).to receive(:irs_attempts_api_tracker).
diff --git a/spec/features/idv/doc_auth/upload_step_spec.rb b/spec/features/idv/doc_auth/upload_step_spec.rb
deleted file mode 100644
index 41f316f58fa..00000000000
--- a/spec/features/idv/doc_auth/upload_step_spec.rb
+++ /dev/null
@@ -1,231 +0,0 @@
-require 'rails_helper'
-
-feature 'doc auth upload step' do
- include IdvStepHelper
- include DocAuthHelper
- include ActionView::Helpers::DateHelper
-
- let(:fake_analytics) { FakeAnalytics.new }
- let(:fake_attempts_tracker) { IrsAttemptsApiTrackingHelper::FakeAttemptsTracker.new }
- let(:document_capture_session) { DocumentCaptureSession.create! }
- let(:idv_send_link_max_attempts) { 3 }
- let(:idv_send_link_attempt_window_in_minutes) do
- IdentityConfig.store.idv_send_link_attempt_window_in_minutes
- end
-
- before do
- sign_in_and_2fa_user
- allow_any_instance_of(Idv::Steps::UploadStep).to receive(:mobile_device?).and_return(true)
- complete_doc_auth_steps_before_upload_step
- allow_any_instance_of(ApplicationController).to receive(:analytics).and_return(fake_analytics)
- allow_any_instance_of(ApplicationController).to receive(:irs_attempts_api_tracker).
- and_return(fake_attempts_tracker)
- end
-
- context 'on a desktop device', js: true do
- before do
- allow_any_instance_of(Idv::Steps::UploadStep).to receive(:mobile_device?).and_return(false)
- end
-
- it 'displays with the expected content' do
- expect(page).to have_content(t('doc_auth.headings.upload_from_computer'))
- expect(page).to have_content(t('doc_auth.info.upload_from_computer'))
- expect(page).to have_content(t('doc_auth.headings.upload_from_phone'))
- end
-
- it 'proceeds to document capture when user chooses to upload from computer' do
- expect(fake_attempts_tracker).to receive(
- :idv_document_upload_method_selected,
- ).with({ upload_method: 'desktop' })
-
- expect_step_indicator_current_step(t('step_indicator.flows.idv.verify_id'))
-
- click_upload_from_computer
-
- expect(page).to have_current_path(idv_document_capture_url)
- expect(fake_analytics).to have_logged_event(
- 'IdV: doc auth upload submitted',
- hash_including(step: 'upload', destination: :document_capture),
- )
- end
-
- it "defaults phone to user's 2fa phone number" do
- field = page.find_field(t('two_factor_authentication.phone_label'))
- expect(field.value).to eq('(202) 555-1212')
- end
-
- it 'proceeds to link sent page when user chooses to use phone' do
- expect(fake_attempts_tracker).to receive(
- :idv_document_upload_method_selected,
- ).with({ upload_method: 'mobile' })
-
- click_send_link
-
- expect(page).to have_current_path(idv_link_sent_path)
- expect(fake_analytics).to have_logged_event(
- 'IdV: doc auth upload submitted',
- hash_including(step: 'upload', destination: :link_sent),
- )
- end
-
- it 'proceeds to the next page with valid info' do
- expect(fake_attempts_tracker).to receive(
- :idv_phone_upload_link_sent,
- ).with(
- success: true,
- phone_number: '+1 415-555-0199',
- failure_reason: nil,
- )
-
- expect(Telephony).to receive(:send_doc_auth_link).
- with(hash_including(to: '+1 415-555-0199')).
- and_call_original
-
- expect_step_indicator_current_step(t('step_indicator.flows.idv.verify_id'))
-
- fill_in :doc_auth_phone, with: '415-555-0199'
- click_send_link
-
- expect(page).to have_current_path(idv_link_sent_path)
- end
-
- it 'does not proceed to the next page with invalid info' do
- fill_in :doc_auth_phone, with: ''
- click_send_link
-
- expect(page).to have_current_path(idv_doc_auth_upload_step, ignore_query: true)
- end
-
- it 'sends a link that does not contain any underscores' do
- # because URLs with underscores sometimes get messed up by carriers
- expect(Telephony).to receive(:send_doc_auth_link).and_wrap_original do |impl, config|
- expect(config[:link]).to_not include('_')
-
- impl.call(**config)
- end
-
- fill_in :doc_auth_phone, with: '415-555-0199'
- click_send_link
-
- expect(page).to have_current_path(idv_link_sent_path)
- end
-
- it 'does not proceed if Telephony raises an error' do
- expect(fake_attempts_tracker).to receive(:idv_phone_upload_link_sent).with(
- success: false,
- phone_number: '+1 225-555-1000',
- failure_reason: { telephony: ['TelephonyError'] },
- )
- fill_in :doc_auth_phone, with: '225-555-1000'
- click_send_link
-
- expect(page).to have_current_path(idv_doc_auth_upload_step, ignore_query: true)
- expect(page).to have_content I18n.t('telephony.error.friendly_message.generic')
- end
-
- it 'displays error if user selects a country to which we cannot send SMS', js: true do
- page.find('div[aria-label="Country code"]').click
- within(page.find('.iti__flag-container', visible: :all)) do
- find('span', text: 'Sri Lanka').click
- end
- focused_input = page.find('.phone-input__number:focus')
-
- error_message_id = focused_input[:'aria-describedby']&.split(' ')&.find do |id|
- page.has_css?(".usa-error-message##{id}")
- end
- expect(error_message_id).to_not be_empty
-
- error_message = page.find_by_id(error_message_id)
- expect(error_message).to have_content(
- t(
- 'two_factor_authentication.otp_delivery_preference.sms_unsupported',
- location: 'Sri Lanka',
- ),
- )
- click_send_link
- expect(page.find(':focus')).to match_css('.phone-input__number')
- end
-
- it 'throttles sending the link' do
- user = user_with_2fa
- sign_in_and_2fa_user(user)
- complete_doc_auth_steps_before_upload_step
- timeout = distance_of_time_in_words(
- Throttle.attempt_window_in_minutes(:idv_send_link).minutes,
- )
- allow(IdentityConfig.store).to receive(:idv_send_link_max_attempts).
- and_return(idv_send_link_max_attempts)
-
- expect(fake_attempts_tracker).to receive(
- :idv_phone_send_link_rate_limited,
- ).with({ phone_number: '+1 415-555-0199' })
-
- freeze_time do
- (idv_send_link_max_attempts - 1).times do
- expect(page).to_not have_content(
- I18n.t('errors.doc_auth.send_link_throttle', timeout: timeout),
- )
-
- fill_in :doc_auth_phone, with: '415-555-0199'
- click_send_link
-
- expect(page).to have_current_path(idv_link_sent_path)
-
- click_doc_auth_back_link
- end
-
- fill_in :doc_auth_phone, with: '415-555-0199'
-
- click_send_link
- expect(page).to have_current_path(idv_doc_auth_upload_step, ignore_query: true)
- expect(page).to have_content(
- I18n.t(
- 'errors.doc_auth.send_link_throttle',
- timeout: timeout,
- ),
- )
- end
- expect(fake_analytics).to have_logged_event(
- 'Throttler Rate Limit Triggered',
- throttle_type: :idv_send_link,
- )
-
- # Manual expiration is needed for now since the Throttle uses
- # Redis ttl instead of expiretime
- Throttle.new(throttle_type: :idv_send_link, user: user).reset!
- travel_to(Time.zone.now + idv_send_link_attempt_window_in_minutes.minutes) do
- fill_in :doc_auth_phone, with: '415-555-0199'
- click_send_link
- expect(page).to have_current_path(idv_link_sent_path)
- end
- end
-
- it 'includes expected URL parameters' do
- allow_any_instance_of(Flow::BaseFlow).to receive(:flow_session).and_return(
- document_capture_session_uuid: document_capture_session.uuid,
- )
-
- expect(Telephony).to receive(:send_doc_auth_link).and_wrap_original do |impl, config|
- params = Rack::Utils.parse_nested_query URI(config[:link]).query
- expect(params).to eq('document-capture-session' => document_capture_session.uuid)
-
- impl.call(**config)
- end
-
- fill_in :doc_auth_phone, with: '415-555-0199'
- click_send_link
- end
-
- it 'sets requested_at on the capture session' do
- allow_any_instance_of(Flow::BaseFlow).to receive(:flow_session).and_return(
- document_capture_session_uuid: document_capture_session.uuid,
- )
-
- fill_in :doc_auth_phone, with: '415-555-0199'
- click_send_link
-
- document_capture_session.reload
- expect(document_capture_session).to have_attributes(requested_at: a_kind_of(Time))
- end
- end
-end
diff --git a/spec/features/idv/doc_auth/welcome_step_spec.rb b/spec/features/idv/doc_auth/welcome_step_spec.rb
index 8ea2be143d1..3c3d4910213 100644
--- a/spec/features/idv/doc_auth/welcome_step_spec.rb
+++ b/spec/features/idv/doc_auth/welcome_step_spec.rb
@@ -4,10 +4,6 @@
include IdvHelper
include DocAuthHelper
- def expect_doc_auth_upload_step
- expect(page).to have_current_path(idv_doc_auth_upload_step)
- end
-
let(:fake_analytics) { FakeAnalytics.new }
let(:maintenance_window) { [] }
let(:sp_name) { 'Test SP' }
diff --git a/spec/features/idv/outage_spec.rb b/spec/features/idv/outage_spec.rb
index 38e5b9b5478..5a5e128543b 100644
--- a/spec/features/idv/outage_spec.rb
+++ b/spec/features/idv/outage_spec.rb
@@ -105,7 +105,7 @@ def sign_in_with_idv_required(user:, sms_or_totp: :sms)
complete_agreement_step
# Still offer the option for hybrid flow
- expect(current_path).to eq idv_doc_auth_step_path(step: :upload)
+ expect(current_path).to eq idv_hybrid_handoff_path
complete_upload_step
complete_document_capture_step
@@ -214,7 +214,7 @@ def sign_in_with_idv_required(user:, sms_or_totp: :sms)
click_idv_continue
complete_agreement_step
- expect(current_path).to eq idv_doc_auth_step_path(step: :upload)
+ expect(current_path).to eq idv_hybrid_handoff_path
end
end
diff --git a/spec/services/idv/steps/upload_step_spec.rb b/spec/services/idv/steps/upload_step_spec.rb
deleted file mode 100644
index 34556385cf1..00000000000
--- a/spec/services/idv/steps/upload_step_spec.rb
+++ /dev/null
@@ -1,112 +0,0 @@
-require 'rails_helper'
-
-describe Idv::Steps::UploadStep do
- context 'with combined hybrid handoff enabled' do
- let(:user) { build(:user) }
-
- let(:service_provider) do
- create(
- :service_provider,
- issuer: 'http://sp.example.com',
- app_id: '123',
- )
- end
-
- let(:request) do
- double(
- 'request',
- remote_ip: Faker::Internet.ip_v4_address,
- headers: { 'X-Amzn-Trace-Id' => amzn_trace_id },
- )
- end
-
- let(:params) do
- ActionController::Parameters.new(
- {
- doc_auth: { phone: '(201) 555-1212' },
- },
- )
- end
-
- let(:controller) do
- instance_double(
- 'controller',
- session: { sp: { issuer: service_provider.issuer } },
- params: params,
- current_user: user,
- current_sp: service_provider,
- analytics: FakeAnalytics.new,
- url_options: {},
- request: request,
- )
- end
-
- let(:amzn_trace_id) { SecureRandom.uuid }
-
- let(:pii_from_doc) do
- {
- ssn: '123-45-6789',
- first_name: 'bob',
- }
- end
-
- let(:flow) do
- Idv::Flows::DocAuthFlow.new(controller, {}, 'idv/doc_auth').tap do |flow|
- flow.flow_session = { pii_from_doc: pii_from_doc }
- end
- end
-
- let(:irs_attempts_api_tracker) do
- IrsAttemptsApiTrackingHelper::FakeAttemptsTracker.new
- end
-
- subject(:step) do
- Idv::Steps::UploadStep.new(flow)
- end
-
- before do
- allow(controller).to receive(:irs_attempts_api_tracker).
- and_return(irs_attempts_api_tracker)
- end
-
- describe '#extra_view_variables' do
- it 'includes form' do
- expect(step.extra_view_variables).to include(
- {
- idv_phone_form: be_an_instance_of(Idv::PhoneForm),
- },
- )
- end
- end
-
- describe 'the return value from #call' do
- let(:response) { step.call }
-
- it 'includes the telephony response' do
- expect(response.extra[:telephony_response]).to eq(
- {
- errors: {},
- message_id: 'fake-message-id',
- request_id: 'fake-message-request-id',
- success: true,
- },
- )
- end
- end
-
- describe '#link_for_send_link' do
- subject(:link) { step.link_for_send_link document_capture_session_uuid }
- let(:document_capture_session_uuid) { SecureRandom.uuid }
-
- it 'generates a link to the hybrid mobile doc auth entry controller' do
- expect(link).to eql(
- Rails.application.routes.url_helpers.idv_hybrid_mobile_entry_url(
- params: {
- 'document-capture-session': document_capture_session_uuid,
- },
- ),
- )
- end
- end
- end
-end
diff --git a/spec/support/features/doc_auth_helper.rb b/spec/support/features/doc_auth_helper.rb
index 1d54ffe2caa..5c1c4cad2df 100644
--- a/spec/support/features/doc_auth_helper.rb
+++ b/spec/support/features/doc_auth_helper.rb
@@ -61,10 +61,6 @@ def idv_doc_auth_agreement_step
idv_doc_auth_step_path(step: :agreement)
end
- def idv_doc_auth_upload_step
- idv_doc_auth_step_path(step: :upload)
- end
-
def complete_doc_auth_steps_before_welcome_step(expect_accessible: false)
visit idv_doc_auth_welcome_step unless current_path == idv_doc_auth_welcome_step
click_idv_continue if current_path == idv_mail_only_warning_path