diff --git a/app/components/troubleshooting_options_component.html.erb b/app/components/troubleshooting_options_component.html.erb
index 6a6d6d92934..1e2a2071631 100644
--- a/app/components/troubleshooting_options_component.html.erb
+++ b/app/components/troubleshooting_options_component.html.erb
@@ -1,10 +1,4 @@
<%= tag.section(**tag_options, class: css_class) do %>
- <% if new_features? %>
-
- <%= t('components.troubleshooting_options.new_feature') %>
-
- <% end %>
-
<%= header %>
<% options.each do |option| %>
diff --git a/app/components/troubleshooting_options_component.rb b/app/components/troubleshooting_options_component.rb
index ffe2b030799..efa7d693b1d 100644
--- a/app/components/troubleshooting_options_component.rb
+++ b/app/components/troubleshooting_options_component.rb
@@ -4,8 +4,7 @@ class TroubleshootingOptionsComponent < BaseComponent
attr_reader :tag_options
- def initialize(new_features: false, **tag_options)
- @new_features = new_features
+ def initialize(**tag_options)
@tag_options = tag_options.dup
end
@@ -13,10 +12,6 @@ def render?
options?
end
- def new_features?
- @new_features
- end
-
def css_class
[
'troubleshooting-options',
diff --git a/app/controllers/idv/session_errors_controller.rb b/app/controllers/idv/session_errors_controller.rb
index 4b4d9987347..b3c429bb02a 100644
--- a/app/controllers/idv/session_errors_controller.rb
+++ b/app/controllers/idv/session_errors_controller.rb
@@ -56,11 +56,15 @@ def confirm_idv_session_step_needed
end
def set_try_again_path
- if params[:from]&.starts_with? idv_in_person_path
+ if in_person_flow?
@try_again_path = idv_in_person_path
else
@try_again_path = idv_doc_auth_path
end
end
+
+ def in_person_flow?
+ params[:flow] == 'in_person'
+ end
end
end
diff --git a/app/controllers/verify_controller.rb b/app/controllers/verify_controller.rb
index 6241f892ae3..7a5da36cd26 100644
--- a/app/controllers/verify_controller.rb
+++ b/app/controllers/verify_controller.rb
@@ -24,7 +24,6 @@ def app_data
{
base_path: idv_app_path,
cancel_url: idv_cancel_path,
- in_person_url: in_person_url,
initial_values: initial_values,
reset_password_url: forgot_password_url,
enabled_step_names: IdentityConfig.store.idv_api_enabled_steps,
@@ -47,10 +46,6 @@ def enabled_steps
IdentityConfig.store.idv_api_enabled_steps
end
- def in_person_url
- idv_in_person_url if Idv::InPersonConfig.enabled_for_issuer?(current_sp&.issuer)
- end
-
def step_enabled?(step)
enabled_steps.include?(step)
end
diff --git a/app/javascript/packages/verify-flow/cancel.spec.tsx b/app/javascript/packages/verify-flow/cancel.spec.tsx
index 5b165f17c25..e8df4bc30fe 100644
--- a/app/javascript/packages/verify-flow/cancel.spec.tsx
+++ b/app/javascript/packages/verify-flow/cancel.spec.tsx
@@ -17,7 +17,6 @@ describe('Cancel', () => {
cancelURL: 'http://example.test/cancel',
currentStep: 'one',
basePath: '',
- inPersonURL: null,
onComplete() {},
}}
>
diff --git a/app/javascript/packages/verify-flow/context/flow-context.tsx b/app/javascript/packages/verify-flow/context/flow-context.tsx
index 1099e5138ce..b4b6509543d 100644
--- a/app/javascript/packages/verify-flow/context/flow-context.tsx
+++ b/app/javascript/packages/verify-flow/context/flow-context.tsx
@@ -9,7 +9,7 @@ export interface FlowContextValue {
/**
* URL to in-person proofing alternative flow, if enabled.
*/
- inPersonURL: string | null;
+ inPersonURL?: string;
/**
* Current step name.
@@ -29,7 +29,6 @@ export interface FlowContextValue {
const FlowContext = createContext({
cancelURL: '',
- inPersonURL: null,
currentStep: '',
basePath: '',
onComplete() {},
diff --git a/app/javascript/packages/verify-flow/verify-flow-troubleshooting-options.spec.tsx b/app/javascript/packages/verify-flow/verify-flow-troubleshooting-options.spec.tsx
index 06b94716159..f4988fa5108 100644
--- a/app/javascript/packages/verify-flow/verify-flow-troubleshooting-options.spec.tsx
+++ b/app/javascript/packages/verify-flow/verify-flow-troubleshooting-options.spec.tsx
@@ -1,6 +1,4 @@
import { render } from '@testing-library/react';
-import type { ComponentType } from 'react';
-import FlowContext, { FlowContextValue } from './context/flow-context';
import VerifyFlowTroubleshootingOptions from './verify-flow-troubleshooting-options';
describe('VerifyFlowTroubleshootingOptions', () => {
@@ -18,37 +16,4 @@ describe('VerifyFlowTroubleshootingOptions', () => {
'idv.troubleshooting.options.contact_support links.new_window',
);
});
-
- context('with in-person proofing option', () => {
- const inPersonURL = 'http://example.com';
- const wrapper: ComponentType = ({ children }) => (
-
- {children}
-
- );
-
- it('renders additional troubleshooting options', () => {
- it('renders troubleshooting options', () => {
- const { getAllByRole } = render(, { wrapper });
-
- const headings = getAllByRole('heading');
- const options = getAllByRole('link');
-
- expect(headings).to.have.lengthOf(2);
- expect(headings[0].textContent).to.equal(
- 'components.troubleshooting_options.default_heading',
- );
- expect(headings[0].textContent).to.equal('idv.troubleshooting.headings.are_you_near');
- expect(options).to.have.lengthOf(2);
- expect(options[0].getAttribute('href')).to.equal('https://login.gov/contact/');
- expect(options[0].getAttribute('target')).to.equal('_blank');
- expect(options[0].textContent).to.equal(
- 'idv.troubleshooting.options.contact_support links.new_window',
- );
- expect(options[1].getAttribute('href')).to.equal(inPersonURL);
- expect(options[1].getAttribute('target')).to.equal('');
- expect(options[1].textContent).to.equal('idv.troubleshooting.options.verify_in_person');
- });
- });
- });
});
diff --git a/app/javascript/packages/verify-flow/verify-flow-troubleshooting-options.tsx b/app/javascript/packages/verify-flow/verify-flow-troubleshooting-options.tsx
index a3cb92d0f06..73084a51e32 100644
--- a/app/javascript/packages/verify-flow/verify-flow-troubleshooting-options.tsx
+++ b/app/javascript/packages/verify-flow/verify-flow-troubleshooting-options.tsx
@@ -1,39 +1,21 @@
-import { useContext } from 'react';
import { TroubleshootingOptions } from '@18f/identity-components';
import { getConfigValue } from '@18f/identity-config';
import { t } from '@18f/identity-i18n';
-import FlowContext from './context/flow-context';
function VerifyFlowTroubleshootingOptions() {
- const { inPersonURL } = useContext(FlowContext);
-
return (
- <>
-
- {inPersonURL && (
-
- )}
- >
+
);
}
diff --git a/app/javascript/packages/verify-flow/verify-flow.tsx b/app/javascript/packages/verify-flow/verify-flow.tsx
index c089309bd47..baa8e87b527 100644
--- a/app/javascript/packages/verify-flow/verify-flow.tsx
+++ b/app/javascript/packages/verify-flow/verify-flow.tsx
@@ -67,11 +67,6 @@ export interface VerifyFlowProps {
*/
cancelURL?: string;
- /**
- * URL to in-person proofing alternative flow, if enabled.
- */
- inPersonURL?: string | null;
-
/**
* Initial value for address verification method.
*/
@@ -109,7 +104,6 @@ function VerifyFlow({
enabledStepNames,
basePath,
cancelURL = '',
- inPersonURL = null,
initialAddressVerificationMethod,
onComplete,
}: VerifyFlowProps) {
@@ -123,7 +117,6 @@ function VerifyFlow({
const [initialStep, setCompletedStep] = useInitialStepValidation(basePath, steps);
const context = useObjectMemo({
cancelURL,
- inPersonURL,
currentStep,
basePath,
onComplete,
diff --git a/app/javascript/packs/document-capture.jsx b/app/javascript/packs/document-capture.jsx
index 2a8f1a8e6d0..52ad9771325 100644
--- a/app/javascript/packs/document-capture.jsx
+++ b/app/javascript/packs/document-capture.jsx
@@ -134,7 +134,7 @@ function addPageAction(event, payload) {
appName,
flowPath,
cancelUrl: cancelURL,
- idvInPersonUrl: inPersonURL = null,
+ idvInPersonUrl: inPersonURL,
} = /** @type {AppRootData} */ (appRoot.dataset);
const App = composeComponents(
diff --git a/app/javascript/packs/verify-flow.tsx b/app/javascript/packs/verify-flow.tsx
index 96134414303..3dcf38d322f 100644
--- a/app/javascript/packs/verify-flow.tsx
+++ b/app/javascript/packs/verify-flow.tsx
@@ -5,11 +5,10 @@ import {
decodeUserBundle,
AddressVerificationMethod,
ErrorStatusPage,
- FlowContext,
} from '@18f/identity-verify-flow';
import { trackError } from '@18f/identity-analytics';
import SecretSessionStorage, { s2ab } from '@18f/identity-secret-session-storage';
-import type { SecretValues, VerifyFlowValues, FlowContextValue } from '@18f/identity-verify-flow';
+import type { SecretValues, VerifyFlowValues } from '@18f/identity-verify-flow';
interface AppRootValues {
/**
@@ -32,11 +31,6 @@ interface AppRootValues {
*/
cancelUrl: string;
- /**
- * URL to in-person proofing alternative flow, if enabled.
- */
- inPersonUrl: string | null;
-
/**
* Base64-encoded encryption key for secret session store.
*/
@@ -61,7 +55,6 @@ export async function initialize() {
enabledStepNames: enabledStepNamesJSON,
basePath,
cancelUrl: cancelURL,
- inPersonUrl: inPersonURL,
storeKey: storeKeyBase64,
} = appRoot.dataset;
const initialValues: Partial = JSON.parse(initialValuesJSON);
@@ -88,12 +81,7 @@ export async function initialize() {
}
} catch (error) {
trackError(error);
- render(
-
-
- ,
- appRoot,
- );
+ render(, appRoot);
return tearDown;
}
@@ -112,7 +100,6 @@ export async function initialize() {
initialValues={initialValues}
enabledStepNames={enabledStepNames}
cancelURL={cancelURL}
- inPersonURL={inPersonURL}
basePath={basePath}
onComplete={onComplete}
initialAddressVerificationMethod={initialAddressVerificationMethod}
diff --git a/app/services/idv/actions/verify_document_status_action.rb b/app/services/idv/actions/verify_document_status_action.rb
index 59e25b69022..83f45c80ebc 100644
--- a/app/services/idv/actions/verify_document_status_action.rb
+++ b/app/services/idv/actions/verify_document_status_action.rb
@@ -1,6 +1,6 @@
module Idv
module Actions
- class VerifyDocumentStatusAction < Idv::Steps::VerifyBaseStep
+ class VerifyDocumentStatusAction < Idv::Steps::DocAuthBaseStep
def call
process_async_state(async_state)
end
diff --git a/app/services/idv/steps/doc_auth_base_step.rb b/app/services/idv/steps/doc_auth_base_step.rb
index 734c7bd0dce..41fd6cfca03 100644
--- a/app/services/idv/steps/doc_auth_base_step.rb
+++ b/app/services/idv/steps/doc_auth_base_step.rb
@@ -7,41 +7,6 @@ def initialize(flow)
private
- def throttle
- @throttle ||= Throttle.new(
- user: current_user,
- throttle_type: :idv_resolution,
- )
- end
-
- def idv_failure(result)
- throttle.increment! if result.extra.dig(:proofing_results, :exception).blank?
- if throttle.throttled?
- @flow.analytics.throttler_rate_limit_triggered(
- throttle_type: :idv_resolution,
- step_name: self.class.name,
- )
- redirect_to idv_session_errors_failure_url
- elsif result.extra.dig(:proofing_results, :exception).present?
- @flow.analytics.idv_doc_auth_exception_visited(
- step_name: self.class.name,
- remaining_attempts: throttle.remaining_count,
- )
- redirect_to idv_session_errors_exception_url(
- from: request.path,
- )
- else
- @flow.analytics.idv_doc_auth_warning_visited(
- step_name: self.class.name,
- remaining_attempts: throttle.remaining_count,
- )
- redirect_to idv_session_errors_warning_url(
- from: request.path,
- )
- end
- result
- end
-
def save_proofing_components
return unless current_user
diff --git a/app/services/idv/steps/ipp/verify_wait_step_show.rb b/app/services/idv/steps/ipp/verify_wait_step_show.rb
index d9bf2096e8e..219ad946e16 100644
--- a/app/services/idv/steps/ipp/verify_wait_step_show.rb
+++ b/app/services/idv/steps/ipp/verify_wait_step_show.rb
@@ -9,6 +9,16 @@ def call
process_async_state(async_state)
end
+
+ private
+
+ def exception_url
+ idv_session_errors_exception_url(flow: :in_person)
+ end
+
+ def warning_url
+ idv_session_errors_warning_url(flow: :in_person)
+ end
end
end
end
diff --git a/app/services/idv/steps/verify_base_step.rb b/app/services/idv/steps/verify_base_step.rb
index 632a320250e..76ed5eec9a8 100644
--- a/app/services/idv/steps/verify_base_step.rb
+++ b/app/services/idv/steps/verify_base_step.rb
@@ -64,6 +64,45 @@ def delete_pii
flow_session.delete(:pii_from_user)
end
+ def throttle
+ @throttle ||= Throttle.new(
+ user: current_user,
+ throttle_type: :idv_resolution,
+ )
+ end
+
+ def idv_failure(result)
+ throttle.increment! if result.extra.dig(:proofing_results, :exception).blank?
+ if throttle.throttled?
+ @flow.analytics.throttler_rate_limit_triggered(
+ throttle_type: :idv_resolution,
+ step_name: self.class.name,
+ )
+ redirect_to idv_session_errors_failure_url
+ elsif result.extra.dig(:proofing_results, :exception).present?
+ @flow.analytics.idv_doc_auth_exception_visited(
+ step_name: self.class.name,
+ remaining_attempts: throttle.remaining_count,
+ )
+ redirect_to exception_url
+ else
+ @flow.analytics.idv_doc_auth_warning_visited(
+ step_name: self.class.name,
+ remaining_attempts: throttle.remaining_count,
+ )
+ redirect_to warning_url
+ end
+ result
+ end
+
+ def exception_url
+ idv_session_errors_exception_url
+ end
+
+ def warning_url
+ idv_session_errors_warning_url
+ end
+
def idv_success(idv_result)
idv_result[:success]
end
diff --git a/app/services/proofing/mock/resolution_mock_client.rb b/app/services/proofing/mock/resolution_mock_client.rb
index 3abf893d3db..1dbef3fe3a5 100644
--- a/app/services/proofing/mock/resolution_mock_client.rb
+++ b/app/services/proofing/mock/resolution_mock_client.rb
@@ -18,7 +18,7 @@ class ResolutionMockClient < Proofing::Base
stage :resolution
UNVERIFIABLE_ZIP_CODE = '00000'
- NO_CONTACT_SSN = '000-00-0000'
+ NO_CONTACT_SSN = /000-?00-?0000/
TRANSACTION_ID = 'resolution-mock-transaction-id-123'
REFERENCE = 'aaa-bbb-ccc'
@@ -27,7 +27,7 @@ class ResolutionMockClient < Proofing::Base
ssn = applicant[:ssn]
raise 'Failed to contact proofing vendor' if /Fail/i.match?(first_name)
- raise 'Failed to contact proofing vendor' if ssn == NO_CONTACT_SSN
+ raise 'Failed to contact proofing vendor' if ssn.match?(NO_CONTACT_SSN)
if first_name.match?(/Bad/i)
result.add_error(:first_name, 'Unverified first name.')
diff --git a/app/views/idv/session_errors/_in_person_proofing_options.html.erb b/app/views/idv/session_errors/_in_person_proofing_options.html.erb
deleted file mode 100644
index 45d556d9d55..00000000000
--- a/app/views/idv/session_errors/_in_person_proofing_options.html.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-<% if Idv::InPersonConfig.enabled_for_issuer?(decorated_session.sp_issuer) %>
- <%= render TroubleshootingOptionsComponent.new(new_features: true) do |c| %>
- <% c.header { t('idv.troubleshooting.headings.are_you_near') } %>
- <% c.option(url: idv_in_person_url, new_tab: false).with_content(t('idv.troubleshooting.options.verify_in_person')) %>
- <% end %>
-<% end %>
diff --git a/app/views/idv/session_errors/exception.html.erb b/app/views/idv/session_errors/exception.html.erb
index 69dece31929..bb383d220eb 100644
--- a/app/views/idv/session_errors/exception.html.erb
+++ b/app/views/idv/session_errors/exception.html.erb
@@ -29,5 +29,3 @@
) %>
<% end %>
-
-<%= render partial: 'idv/session_errors/in_person_proofing_options' %>
diff --git a/app/views/idv/session_errors/throttled.html.erb b/app/views/idv/session_errors/throttled.html.erb
index 42efd082992..1d72fd7bfd9 100644
--- a/app/views/idv/session_errors/throttled.html.erb
+++ b/app/views/idv/session_errors/throttled.html.erb
@@ -31,4 +31,3 @@
<% end %>
-<%= render partial: 'idv/session_errors/in_person_proofing_options' %>
diff --git a/spec/components/troubleshooting_options_component_spec.rb b/spec/components/troubleshooting_options_component_spec.rb
index 47b6658ad63..593c3dbcaa8 100644
--- a/spec/components/troubleshooting_options_component_spec.rb
+++ b/spec/components/troubleshooting_options_component_spec.rb
@@ -30,19 +30,6 @@
end
end
- context 'with :new_features' do
- it 'renders a new features tag' do
- rendered = render_inline(
- TroubleshootingOptionsComponent.new(new_features: true),
- ) { |c| c.option(url: '/').with_content('Link Text') }
-
- expect(rendered).to have_css(
- '.troubleshooting-options .usa-tag.text-uppercase',
- text: t('components.troubleshooting_options.new_feature'),
- )
- end
- end
-
context 'with header' do
it 'renders header' do
rendered = render_inline(TroubleshootingOptionsComponent.new) do |c|
diff --git a/spec/controllers/idv/session_errors_controller_spec.rb b/spec/controllers/idv/session_errors_controller_spec.rb
index 9927ff69e3c..7f2e51405b4 100644
--- a/spec/controllers/idv/session_errors_controller_spec.rb
+++ b/spec/controllers/idv/session_errors_controller_spec.rb
@@ -2,9 +2,9 @@
shared_examples_for 'an idv session errors controller action' do
context 'the user is authenticated and has not confirmed their profile' do
- it 'renders the error' do
- stub_sign_in(create(:user))
+ let(:user) { build(:user) }
+ it 'renders the error' do
get action
expect(response).to render_template(template)
@@ -13,10 +13,9 @@
context 'the user is authenticated and has confirmed their profile' do
let(:idv_session_profile_confirmation) { true }
+ let(:user) { build(:user) }
it 'redirects to the phone url' do
- stub_sign_in
-
get action
expect(response).to redirect_to(idv_phone_url)
@@ -46,11 +45,13 @@
describe Idv::SessionErrorsController do
let(:idv_session) { double }
let(:idv_session_profile_confirmation) { false }
+ let(:user) { nil }
before do
allow(idv_session).to receive(:profile_confirmation).
and_return(idv_session_profile_confirmation)
allow(controller).to receive(:idv_session).and_return(idv_session)
+ stub_sign_in(user) if user
end
describe 'before_actions' do
@@ -59,34 +60,49 @@
end
end
+ describe '#exception' do
+ let(:action) { :exception }
+ let(:template) { 'idv/session_errors/exception' }
+ let(:params) { {} }
+
+ subject(:response) { get action, params: params }
+
+ it_behaves_like 'an idv session errors controller action'
+ end
+
describe '#warning' do
let(:action) { :warning }
let(:template) { 'idv/session_errors/warning' }
+ let(:params) { {} }
+
+ subject(:response) { get :warning, params: params }
it_behaves_like 'an idv session errors controller action'
context 'with throttle attempts' do
+ let(:user) { create(:user) }
+
before do
- user = create(:user)
- stub_sign_in(user)
Throttle.new(throttle_type: :proof_address, user: user).increment!
end
it 'assigns remaining count' do
- get action
+ response
expect(assigns(:remaining_attempts)).to be_kind_of(Numeric)
end
it 'assigns URL to try again' do
- get action
+ response
expect(assigns(:try_again_path)).to eq(idv_doc_auth_path)
end
- context 'referrer is page from In-Person Proofing flow' do
+ context 'in in-person proofing flow' do
+ let(:params) { { flow: 'in_person' } }
+
it 'assigns URL to try again' do
- get action, params: { from: idv_in_person_ready_to_verify_path }
+ response
expect(assigns(:try_again_path)).to eq(idv_in_person_path)
end
@@ -101,9 +117,9 @@
it_behaves_like 'an idv session errors controller action'
context 'while throttled' do
+ let(:user) { create(:user) }
+
before do
- user = create(:user)
- stub_sign_in(user)
Throttle.new(throttle_type: :proof_address, user: user).increment_to_throttled!
end
@@ -122,6 +138,7 @@
it_behaves_like 'an idv session errors controller action'
context 'while throttled' do
+ let(:user) { build(:user) }
let(:ssn) { '666666666' }
around do |ex|
@@ -129,7 +146,6 @@
end
before do
- stub_sign_in
Throttle.new(
throttle_type: :proof_ssn,
target: Pii::Fingerprinter.fingerprint(ssn),
@@ -152,9 +168,9 @@
it_behaves_like 'an idv session errors controller action'
context 'while throttled' do
+ let(:user) { create(:user) }
+
before do
- user = create(:user)
- stub_sign_in(user)
Throttle.new(throttle_type: :idv_doc_auth, user: user).increment_to_throttled!
end
diff --git a/spec/controllers/verify_controller_spec.rb b/spec/controllers/verify_controller_spec.rb
index 7c8d63f08b6..e900c50662d 100644
--- a/spec/controllers/verify_controller_spec.rb
+++ b/spec/controllers/verify_controller_spec.rb
@@ -3,8 +3,6 @@
describe VerifyController do
describe '#show' do
let(:idv_api_enabled_steps) { [] }
- let(:in_person_proofing_enabled) { false }
- let(:in_person_proofing_enabled_issuers) { [] }
let(:password) { 'sekrit phrase' }
let(:user) { create(:user, :signed_up, password: password) }
let(:applicant) do
@@ -28,10 +26,6 @@
before do
allow(IdentityConfig.store).to receive(:idv_api_enabled_steps).
and_return(idv_api_enabled_steps)
- allow(IdentityConfig.store).to receive(:in_person_proofing_enabled).
- and_return(in_person_proofing_enabled)
- allow(IdentityConfig.store).to receive(:in_person_proofing_enabled_issuers).
- and_return(in_person_proofing_enabled_issuers)
allow(controller).to receive(:current_sp).and_return(sp)
stub_sign_in(user)
stub_idv_session
@@ -64,7 +58,6 @@
expect(assigns[:app_data]).to include(
base_path: idv_app_path,
cancel_url: idv_cancel_path,
- in_person_url: nil,
enabled_step_names: idv_api_enabled_steps,
initial_values: { 'userBundleToken' => kind_of(String) },
store_key: kind_of(String),
@@ -78,36 +71,6 @@
expect(response).to render_template(:show)
end
end
-
- context 'with in-person proofing enabled' do
- let(:in_person_proofing_enabled) { true }
-
- it 'includes in-person URL as app data' do
- response
-
- expect(assigns[:app_data][:in_person_url]).to eq(idv_in_person_url)
- end
-
- context 'with associated service provider' do
- let(:sp) { build(:service_provider) }
-
- it 'does not include in-person URL as app data' do
- response
-
- expect(assigns[:app_data][:in_person_url]).to be_nil
- end
-
- context 'with in-person proofing enabled for service provider' do
- let(:in_person_proofing_enabled_issuers) { [sp.issuer] }
-
- it 'includes in-person URL as app data' do
- response
-
- expect(assigns[:app_data][:in_person_url]).to eq(idv_in_person_url)
- end
- end
- end
- end
end
def stub_idv_session
diff --git a/spec/features/idv/doc_auth/verify_step_spec.rb b/spec/features/idv/doc_auth/verify_step_spec.rb
index faa38652603..d4f7fb6043c 100644
--- a/spec/features/idv/doc_auth/verify_step_spec.rb
+++ b/spec/features/idv/doc_auth/verify_step_spec.rb
@@ -99,9 +99,7 @@
step_name: 'Idv::Steps::VerifyWaitStepShow',
remaining_attempts: 4,
)
- expect(page).to have_current_path(
- idv_session_errors_warning_path(from: idv_doc_auth_step_path(step: :verify_wait)),
- )
+ expect(page).to have_current_path(idv_session_errors_warning_path)
click_on t('idv.failure.button.warning')
@@ -120,9 +118,7 @@
step_name: 'Idv::Steps::VerifyWaitStepShow',
remaining_attempts: 5,
)
- expect(page).to have_current_path(
- idv_session_errors_exception_path(from: idv_doc_auth_step_path(step: :verify_wait)),
- )
+ expect(page).to have_current_path(idv_session_errors_exception_path)
click_on t('idv.failure.button.warning')
@@ -136,9 +132,7 @@
click_idv_continue
(max_attempts - 1).times do
click_idv_continue
- expect(page).to have_current_path(
- idv_session_errors_warning_path(from: idv_doc_auth_step_path(step: :verify_wait)),
- )
+ expect(page).to have_current_path(idv_session_errors_warning_path)
visit idv_doc_auth_verify_step
end
click_idv_continue
diff --git a/spec/javascripts/packs/verify-flow-spec.ts b/spec/javascripts/packs/verify-flow-spec.ts
index 553b2e54cd3..105e9c70ca8 100644
--- a/spec/javascripts/packs/verify-flow-spec.ts
+++ b/spec/javascripts/packs/verify-flow-spec.ts
@@ -11,7 +11,6 @@ describe('verify-flow', () => {
data-enabled-step-names='["password_confirm"]'
data-base-path="/"
data-cancel-url="/"
- data-in-person-url="/"
data-store-key="dK00lFMxejQH3y5BWt+LwOShw+WSRt/6OudNYI/N9X4="
>
`;
diff --git a/spec/services/idv/steps/ipp/verify_wait_step_show_spec.rb b/spec/services/idv/steps/ipp/verify_wait_step_show_spec.rb
index 87feefcb16e..843dd50a0ac 100644
--- a/spec/services/idv/steps/ipp/verify_wait_step_show_spec.rb
+++ b/spec/services/idv/steps/ipp/verify_wait_step_show_spec.rb
@@ -130,11 +130,7 @@
end
it 'marks the verify step incomplete and redirects to the warning page' do
- expect(step).to receive(:redirect_to).with(
- idv_session_errors_warning_url(
- from: request.path,
- ),
- )
+ expect(step).to receive(:redirect_to).with(idv_session_errors_warning_url(flow: :in_person))
expect(flow.flow_session['Idv::Steps::Ipp::VerifyStep']).to be true
step.call
@@ -154,9 +150,7 @@
it 'marks the verify step incomplete and redirects to the exception page' do
expect(step).to receive(:redirect_to).with(
- idv_session_errors_exception_url(
- from: request.path,
- ),
+ idv_session_errors_exception_url(flow: :in_person),
)
expect(flow.flow_session['Idv::Steps::Ipp::VerifyStep']).to be true
step.call
diff --git a/spec/services/proofing/mock/resolution_mock_client_spec.rb b/spec/services/proofing/mock/resolution_mock_client_spec.rb
new file mode 100644
index 00000000000..3f1a5d593e0
--- /dev/null
+++ b/spec/services/proofing/mock/resolution_mock_client_spec.rb
@@ -0,0 +1,32 @@
+require 'rails_helper'
+
+RSpec.describe Proofing::Mock::ResolutionMockClient do
+ let(:applicant) { Idp::Constants::MOCK_IDV_APPLICANT_WITH_SSN.merge(uuid: '1234-abcd') }
+ subject(:instance) { described_class.new }
+
+ describe '#proof' do
+ subject(:result) { instance.proof(applicant) }
+
+ context 'with simulated failed to contact by SSN' do
+ let(:applicant) { super().merge(ssn: '000-00-0000') }
+
+ it 'returns an unsuccessful result with exception' do
+ expect(result.success?).to eq(false)
+ expect(result.errors).to be_blank
+ expect(result.exception).to be_present
+ expect(result.exception.message).to eq('Failed to contact proofing vendor')
+ end
+
+ context 'with dashes omitted from SSN' do
+ let(:applicant) { super().merge(ssn: '000000000') }
+
+ it 'returns an unsuccessful result with exception' do
+ expect(result.success?).to eq(false)
+ expect(result.errors).to be_blank
+ expect(result.exception).to be_present
+ expect(result.exception.message).to eq('Failed to contact proofing vendor')
+ end
+ end
+ end
+ end
+end
diff --git a/spec/views/idv/session_errors/exception.html.erb_spec.rb b/spec/views/idv/session_errors/exception.html.erb_spec.rb
index 0a78c990215..614df157ab5 100644
--- a/spec/views/idv/session_errors/exception.html.erb_spec.rb
+++ b/spec/views/idv/session_errors/exception.html.erb_spec.rb
@@ -3,8 +3,6 @@
describe 'idv/session_errors/exception.html.erb' do
let(:sp_name) { nil }
let(:sp_issuer) { nil }
- let(:in_person_proofing_enabled) { false }
- let(:in_person_proofing_enabled_issuers) { [] }
let(:try_again_path) { '/example/path' }
before do
@@ -14,10 +12,6 @@
sp_issuer: sp_issuer,
)
allow(view).to receive(:decorated_session).and_return(decorated_session)
- allow(IdentityConfig.store).to receive(:in_person_proofing_enabled).
- and_return(in_person_proofing_enabled)
- allow(IdentityConfig.store).to receive(:in_person_proofing_enabled_issuers).
- and_return(in_person_proofing_enabled_issuers)
assign(:try_again_path, try_again_path)
@@ -35,21 +29,6 @@
)
end
- it 'does not render an in person proofing link' do
- expect(rendered).not_to have_link(href: idv_in_person_url)
- end
-
- context 'with in person proofing enabled' do
- let(:in_person_proofing_enabled) { true }
-
- it 'renders an in person proofing link' do
- expect(rendered).to have_link(
- t('idv.troubleshooting.options.verify_in_person'),
- href: idv_in_person_url,
- )
- end
- end
-
context 'with associated service provider' do
let(:sp_name) { 'Example SP' }
let(:sp_issuer) { 'example-issuer' }
@@ -64,24 +43,5 @@
href: MarketingSite.contact_url,
)
end
-
- context 'with in person proofing enabled' do
- let(:in_person_proofing_enabled) { true }
-
- it 'does not render an in person proofing link' do
- expect(rendered).not_to have_link(href: idv_in_person_url)
- end
-
- context 'with in person proofing enabled for service provider' do
- let(:in_person_proofing_enabled_issuers) { [sp_issuer] }
-
- it 'renders an in person proofing link' do
- expect(rendered).to have_link(
- t('idv.troubleshooting.options.verify_in_person'),
- href: idv_in_person_url,
- )
- end
- end
- end
end
end
diff --git a/spec/views/idv/session_errors/throttled.html.erb_spec.rb b/spec/views/idv/session_errors/throttled.html.erb_spec.rb
index 13eaaaffdee..171ab0aa6a2 100644
--- a/spec/views/idv/session_errors/throttled.html.erb_spec.rb
+++ b/spec/views/idv/session_errors/throttled.html.erb_spec.rb
@@ -4,8 +4,6 @@
let(:sp_name) { nil }
let(:sp_issuer) { nil }
let(:liveness_checking_enabled) { false }
- let(:in_person_proofing_enabled) { false }
- let(:in_person_proofing_enabled_issuers) { [] }
before do
decorated_session = instance_double(
@@ -15,10 +13,6 @@
)
allow(view).to receive(:decorated_session).and_return(decorated_session)
allow(view).to receive(:liveness_checking_enabled?).and_return(liveness_checking_enabled)
- allow(IdentityConfig.store).to receive(:in_person_proofing_enabled).
- and_return(in_person_proofing_enabled)
- allow(IdentityConfig.store).to receive(:in_person_proofing_enabled_issuers).
- and_return(in_person_proofing_enabled_issuers)
render
end
@@ -31,17 +25,6 @@
)
expect(rendered).not_to have_link(href: return_to_sp_cancel_path)
end
-
- context 'with in person proofing enabled' do
- let(:in_person_proofing_enabled) { true }
-
- it 'renders an in person proofing link' do
- expect(rendered).to have_link(
- t('idv.troubleshooting.options.verify_in_person'),
- href: idv_in_person_url,
- )
- end
- end
end
context 'with an SP' do
@@ -58,25 +41,6 @@
href: return_to_sp_failure_to_proof_path(step: 'verify_info', location: 'throttled'),
)
end
-
- context 'with in person proofing enabled' do
- let(:in_person_proofing_enabled) { true }
-
- it 'does not render an in person proofing link' do
- expect(rendered).not_to have_link(href: idv_in_person_url)
- end
-
- context 'with in person proofing enabled for SP' do
- let(:in_person_proofing_enabled_issuers) { [sp_issuer] }
-
- it 'renders an in person proofing link' do
- expect(rendered).to have_link(
- t('idv.troubleshooting.options.verify_in_person'),
- href: idv_in_person_url,
- )
- end
- end
- end
end
context 'with liveness feature disabled' do
@@ -94,12 +58,4 @@
expect(rendered).to have_text(t('errors.doc_auth.throttled_heading'))
end
end
-
- context 'with in person proofing disabled' do
- let(:in_person_proofing_enabled) { false }
-
- it 'does not render an in person proofing link' do
- expect(rendered).not_to have_link(href: idv_in_person_url)
- end
- end
end