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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/controllers/idv/choose_id_type_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ def self.step_info
controller: self,
next_steps: [:document_capture],
preconditions: ->(idv_session:, user:) do
idv_session.flow_path == 'standard'
idv_session.flow_path == 'standard' &&
!idv_session.skip_doc_auth_from_handoff && # is not ipp from desktop
!idv_session.skip_doc_auth_from_how_to_verify # is not ipp user
end,
undo_step: ->(idv_session:, user:) do
if idv_session.document_capture_session_uuid
Expand Down
20 changes: 19 additions & 1 deletion spec/features/idv/doc_auth/choose_id_type_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'rails_helper'

RSpec.feature 'choose id type step error checking' do
RSpec.feature 'choose id type step' do
Comment thread
shanechesnutt-ft marked this conversation as resolved.
include DocAuthHelper
include AbTestsHelper
include IdvStepHelper
Expand Down Expand Up @@ -221,4 +221,22 @@
end
end
end

context 'flow policy' do
include DocAuthHelper

before do
allow(IdentityConfig.store).to receive(:in_person_proofing_enabled).and_return(true)
allow(IdentityConfig.store).to receive(:in_person_proofing_opt_in_enabled)
.and_return(true)

sign_in_and_2fa_user
end

scenario 'User fails attempt to navigate to choose_id_type after starting IPP flow' do
complete_up_to_how_to_verify_step_for_opt_in_ipp(remote: false)
visit idv_choose_id_type_url
expect(page).not_to have_current_path(idv_choose_id_type_url)
end
end
end