Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LG-13006: remove all instances of skip_doc_auth and skipDocAuth - step 4.5 of 6 #11455

Merged
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
2 changes: 0 additions & 2 deletions app/controllers/idv/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def extra_view_variables
flow_path: 'standard',
sp_name: decorated_sp_session.sp_name,
failure_to_proof_url: return_to_sp_failure_to_proof_url(step: 'document_capture'),
skip_doc_auth: idv_session.skip_doc_auth,
skip_doc_auth_from_how_to_verify: idv_session.skip_doc_auth_from_how_to_verify,
skip_doc_auth_from_handoff: idv_session.skip_doc_auth_from_handoff,
opted_in_to_in_person_proofing: idv_session.opted_in_to_in_person_proofing,
Expand All @@ -71,7 +70,6 @@ def self.step_info
# mobile
idv_session.skip_doc_auth_from_handoff ||
idv_session.skip_hybrid_handoff ||
idv_session.skip_doc_auth ||
idv_session.skip_doc_auth_from_how_to_verify ||
!idv_session.selfie_check_required || # desktop but selfie not required
idv_session.desktop_selfie_test_mode_enabled?
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/idv/how_to_verify_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ def update
if result.success?
if how_to_verify_form_params['selection'] == Idv::HowToVerifyForm::REMOTE
idv_session.opted_in_to_in_person_proofing = false
idv_session.skip_doc_auth = false
idv_session.skip_doc_auth_from_how_to_verify = false
redirect_to idv_hybrid_handoff_url
else
idv_session.opted_in_to_in_person_proofing = true
idv_session.flow_path = 'standard'
idv_session.skip_doc_auth = true
idv_session.skip_doc_auth_from_how_to_verify = true
redirect_to idv_document_capture_url
end
Expand All @@ -65,7 +63,6 @@ def self.step_info
idv_session.service_provider&.in_person_proofing_enabled
end,
undo_step: ->(idv_session:, user:) {
idv_session.skip_doc_auth = nil
idv_session.skip_doc_auth_from_how_to_verify = nil
idv_session.opted_in_to_in_person_proofing = nil
},
Expand Down
6 changes: 2 additions & 4 deletions app/controllers/idv/hybrid_handoff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@ def self.selected_remote(idv_session:)
if IdentityConfig.store.in_person_proofing_opt_in_enabled &&
IdentityConfig.store.in_person_proofing_enabled &&
idv_session.service_provider&.in_person_proofing_enabled
idv_session.skip_doc_auth_from_how_to_verify == false ||
idv_session.skip_doc_auth == false
idv_session.skip_doc_auth_from_how_to_verify == false
else
idv_session.skip_doc_auth_from_how_to_verify.nil? ||
idv_session.skip_doc_auth_from_how_to_verify == false || idv_session.skip_doc_auth.nil? ||
idv_session.skip_doc_auth == false
idv_session.skip_doc_auth_from_how_to_verify == false
end
end

Expand Down
1 change: 0 additions & 1 deletion app/controllers/idv/socure/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def self.step_info
# mobile
idv_session.skip_doc_auth_from_handoff ||
idv_session.skip_hybrid_handoff ||
idv_session.skip_doc_auth ||
idv_session.skip_doc_auth_from_how_to_verify ||
!idv_session.selfie_check_required ||
idv_session.desktop_selfie_test_mode_enabled?)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ function DocumentCapture({ onStepChange = () => {} }: DocumentCaptureProps) {
const {
inPersonFullAddressEntryEnabled,
inPersonURL,
skipDocAuth,
skipDocAuthFromHandoff,
skipDocAuthFromHowToVerify,
} = useContext(InPersonContext);
Expand Down Expand Up @@ -140,9 +139,9 @@ function DocumentCapture({ onStepChange = () => {} }: DocumentCaptureProps) {
if (submissionError && formValues) {
initialValues = formValues;
}
// If the user got here by opting-in to in-person proofing, when skipDocAuthFromHowToVerify === true || skipDocAuth === true,
// If the user got here by opting-in to in-person proofing, when skipDocAuthFromHowToVerify === true
// then set steps to inPersonSteps
const isInPersonStepEnabled = skipDocAuthFromHowToVerify || skipDocAuthFromHandoff || skipDocAuth;
const isInPersonStepEnabled = skipDocAuthFromHowToVerify || skipDocAuthFromHandoff;
const inPersonSteps: FormStep[] =
inPersonURL === undefined
? []
Expand All @@ -156,7 +155,7 @@ function DocumentCapture({ onStepChange = () => {} }: DocumentCaptureProps) {
} else if (submissionError) {
steps = [reviewFormStep, ...inPersonSteps];
}
// If the user got here by opting-in to in-person proofing, when skipDocAuthFromHowToVerify === true || skipDocAuth === true;
// If the user got here by opting-in to in-person proofing, when skipDocAuthFromHowToVerify === true
// or opting-in ipp from handoff page, and selfie is required, when skipDocAuthFromHandoff === true
// then set stepIndicatorPath to VerifyFlowPath.IN_PERSON
const stepIndicatorPath =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function InPersonPrepareStep({ toPreviousStep }) {
inPersonURL,
inPersonOutageMessageEnabled,
inPersonOutageExpectedUpdateDate,
skipDocAuth,
skipDocAuthFromHowToVerify,
skipDocAuthFromHandoff,
howToVerifyURL,
Expand All @@ -30,7 +29,7 @@ function InPersonPrepareStep({ toPreviousStep }) {
if (skipDocAuthFromHandoff && previousStepURL) {
// directly from handoff page
forceRedirect(previousStepURL);
} else if ((skipDocAuthFromHowToVerify || skipDocAuth) && howToVerifyURL) {
} else if (skipDocAuthFromHowToVerify && howToVerifyURL) {
forceRedirect(howToVerifyURL);
} else {
toPreviousStep();
Expand Down
7 changes: 0 additions & 7 deletions app/javascript/packages/document-capture/context/in-person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ export interface InPersonContextProps {
*/
usStatesTerritories: Array<[string, string]>;

/**
* When skipDocAuth is true and in_person_proofing_opt_in_enabled is true,
* users are directed to the beginning of the IPP flow. This is set to true when
* they choose Opt-in IPP on the new How To Verify page
*/
skipDocAuth?: boolean;

/**
* When skipDocAuthFromHowToVerify is true and in_person_proofing_opt_in_enabled is true,
* users are directed to the beginning of the IPP flow. This is set to true when
Expand Down
3 changes: 0 additions & 3 deletions app/javascript/packs/document-capture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ interface AppRootData {
idvInPersonUrl?: string;
optedInToInPersonProofing: string;
securityAndPrivacyHowItWorksUrl: string;
skipDocAuth: string;
skipDocAuthFromHowToVerify: string;
skipDocAuthFromHandoff: string;
howToVerifyURL: string;
Expand Down Expand Up @@ -106,7 +105,6 @@ const {
inPersonOutageExpectedUpdateDate,
optedInToInPersonProofing,
usStatesTerritories = '',
skipDocAuth,
skipDocAuthFromHowToVerify,
skipDocAuthFromHandoff,
howToVerifyUrl,
Expand Down Expand Up @@ -138,7 +136,6 @@ render(
inPersonFullAddressEntryEnabled: inPersonFullAddressEntryEnabled === 'true',
optedInToInPersonProofing: optedInToInPersonProofing === 'true',
usStatesTerritories: parsedUsStatesTerritories,
skipDocAuth: skipDocAuth === 'true',
skipDocAuthFromHowToVerify: skipDocAuthFromHowToVerify === 'true',
skipDocAuthFromHandoff: skipDocAuthFromHandoff === 'true',
howToVerifyURL: howToVerifyUrl,
Expand Down
1 change: 0 additions & 1 deletion app/views/idv/document_capture/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use_alternate_sdk: use_alternate_sdk,
acuant_version: acuant_version,
opted_in_to_in_person_proofing: opted_in_to_in_person_proofing,
skip_doc_auth: skip_doc_auth,
skip_doc_auth_from_how_to_verify: skip_doc_auth_from_how_to_verify,
skip_doc_auth_from_handoff: skip_doc_auth_from_handoff,
doc_auth_selfie_capture: doc_auth_selfie_capture,
Expand Down
1 change: 0 additions & 1 deletion app/views/idv/hybrid_mobile/document_capture/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use_alternate_sdk: use_alternate_sdk,
acuant_version: acuant_version,
opted_in_to_in_person_proofing: false,
skip_doc_auth: false,
skip_doc_auth_from_how_to_verify: false,
skip_doc_auth_from_handoff: nil,
doc_auth_selfie_capture: doc_auth_selfie_capture,
Expand Down
1 change: 0 additions & 1 deletion app/views/idv/shared/_document_capture.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
us_states_territories: @presenter.usps_states_territories,
doc_auth_selfie_capture: doc_auth_selfie_capture,
doc_auth_selfie_desktop_test_mode: IdentityConfig.store.doc_auth_selfie_desktop_test_mode,
skip_doc_auth: skip_doc_auth,
skip_doc_auth_from_how_to_verify: skip_doc_auth_from_how_to_verify,
skip_doc_auth_from_handoff: skip_doc_auth_from_handoff,
how_to_verify_url: idv_how_to_verify_url,
Expand Down
8 changes: 0 additions & 8 deletions spec/controllers/idv/how_to_verify_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
get :show

expect(Idv::HowToVerifyController.enabled?).to be false
expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be_nil
expect(response).to redirect_to(idv_hybrid_handoff_url)
end
Expand All @@ -52,7 +51,6 @@
get :show

expect(Idv::HowToVerifyController.enabled?).to be false
expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be_nil
expect(response).to redirect_to(idv_hybrid_handoff_url)
end
Expand All @@ -68,7 +66,6 @@
get :show

expect(Idv::HowToVerifyController.enabled?).to be false
expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be_nil
expect(response).to redirect_to(idv_hybrid_handoff_url)
end
Expand All @@ -81,7 +78,6 @@

expect(Idv::HowToVerifyController.enabled?).to be true
expect(subject.idv_session.service_provider.in_person_proofing_enabled).to be true
expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be_nil
expect(response).to render_template :show
end
Expand Down Expand Up @@ -116,7 +112,6 @@
it 'renders the show template' do
get :show

expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be_nil
expect(response).to render_template :show
end
Expand Down Expand Up @@ -166,7 +161,6 @@
put :update, params: params

expect(flash[:error]).not_to be_present
expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.opted_in_to_in_person_proofing).to be_nil
end
end
Expand Down Expand Up @@ -219,7 +213,6 @@
it 'sets skip doc auth on idv session to false and redirects to hybrid handoff' do
put :update, params: params

expect(subject.idv_session.skip_doc_auth).to be false
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be false
expect(response).to redirect_to(idv_hybrid_handoff_url)
end
Expand All @@ -245,7 +238,6 @@
it 'sets skip doc auth on idv session to true and redirects to document capture' do
put :update, params: params

expect(subject.idv_session.skip_doc_auth).to be true
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be true
expect(response).to redirect_to(idv_document_capture_url)
end
Expand Down
3 changes: 0 additions & 3 deletions spec/controllers/idv/hybrid_handoff_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@
before do
allow(IdentityConfig.store).to receive(:doc_auth_selfie_desktop_test_mode).
and_return(false)
subject.idv_session.skip_doc_auth = nil
subject.idv_session.skip_doc_auth_from_how_to_verify = nil
end

Expand All @@ -230,7 +229,6 @@
before do
allow(IdentityConfig.store).to receive(:doc_auth_selfie_desktop_test_mode).
and_return(false)
subject.idv_session.skip_doc_auth = true
subject.idv_session.skip_doc_auth_from_how_to_verify = true
subject.idv_session.skip_hybrid_handoff = true
end
Expand All @@ -245,7 +243,6 @@
context 'opt in ipp is not available on service provider' do
before do
subject.idv_session.service_provider.in_person_proofing_enabled = false
subject.idv_session.skip_doc_auth = nil
subject.idv_session.skip_doc_auth_from_how_to_verify = nil
end

Expand Down
1 change: 0 additions & 1 deletion spec/support/flow_policy_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def stub_step(key:, idv_session:)
when :agreement
idv_session.idv_consent_given_at = Time.zone.now.to_s
when :how_to_verify
idv_session.skip_doc_auth = false
idv_session.skip_doc_auth_from_how_to_verify = false
when :hybrid_handoff
idv_session.flow_path = 'standard'
Expand Down
2 changes: 0 additions & 2 deletions spec/views/idv/shared/_document_capture.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
let(:selfie_capture_enabled) { true }

let(:acuant_version) { '1.3.3.7' }
let(:skip_doc_auth) { false }
let(:skip_doc_auth_from_how_to_verify) { false }
let(:skip_doc_auth_from_handoff) { false }
let(:opted_in_to_in_person_proofing) { false }
Expand Down Expand Up @@ -52,7 +51,6 @@
use_alternate_sdk: use_alternate_sdk,
acuant_version: acuant_version,
doc_auth_selfie_capture: selfie_capture_enabled,
skip_doc_auth: skip_doc_auth,
skip_doc_auth_from_how_to_verify: skip_doc_auth_from_how_to_verify,
skip_doc_auth_from_handoff: skip_doc_auth_from_handoff,
opted_in_to_in_person_proofing: opted_in_to_in_person_proofing,
Expand Down