From 33b45a3fe9033642f9d2b6957852f0893b959402 Mon Sep 17 00:00:00 2001 From: Jonathan Hooper Date: Thu, 7 Dec 2017 13:17:45 -0600 Subject: [PATCH] Remove finance step from idv flow **Why**: We are removing the financial verification step form the idv flow in favor of using state ID for verification. This commit redirects to the phone step after the profile step is complete. In another PR (ref #1845) the state id data is collected in the profile step. --- .eslintrc | 1 - .../javascripts/app/form-field-format.js | 4 - .../javascripts/app/idv-finance-helper.js | 45 --- app/assets/javascripts/application.js | 1 - app/assets/stylesheets/components/_form.scss | 114 ------- app/controllers/verify/finance_controller.rb | 96 ------ .../verify/finance_other_controller.rb | 34 -- app/controllers/verify/review_controller.rb | 5 - app/controllers/verify/sessions_controller.rb | 4 +- app/forms/idv/finance_form.rb | 96 ------ app/jobs/idv/finance_job.rb | 15 - app/services/analytics.rb | 4 - app/services/idv/agent.rb | 2 +- app/services/idv/financials_step.rb | 24 -- app/services/idv/session.rb | 3 +- app/services/idv/submit_idv_job.rb | 5 - app/services/idv/upcase_vendor_env_vars.rb | 1 - app/validators/form_finance_validator.rb | 69 ----- app/view_models/verify/financials_new.rb | 7 - app/views/shared/_pii_review.html.slim | 3 - app/views/verify/finance/new.html.slim | 34 -- app/views/verify/finance_other/new.html.slim | 39 --- config/application.yml.example | 3 - config/initializers/figaro.rb | 1 - .../initializers/filter_parameter_logging.rb | 1 - config/locales/idv/en.yml | 35 --- config/locales/idv/es.yml | 37 --- config/locales/idv/fr.yml | 37 --- config/routes.rb | 4 - lib/config_validator.rb | 1 - .../verify/finance_controller_spec.rb | 290 ------------------ .../verify/phone_controller_spec.rb | 2 +- .../verify/review_controller_spec.rb | 13 - .../verify/sessions_controller_spec.rb | 4 +- spec/features/accessibility/idv_pages_spec.rb | 20 -- spec/features/idv/flow_spec.rb | 121 +------- spec/features/idv/interrupted_session_spec.rb | 2 +- spec/features/idv/max_attempts_spec.rb | 22 -- spec/features/idv/phone_spec.rb | 10 - spec/features/idv/previous_address_spec.rb | 4 - spec/features/saml/loa3_sso_spec.rb | 4 +- spec/forms/idv/finance_form_spec.rb | 124 -------- spec/jobs/idv/finance_job_spec.rb | 89 ------ spec/lib/config_validator_spec.rb | 4 +- spec/rails_helper.rb | 2 +- spec/routing/id_verification_routing_spec.rb | 3 - spec/services/idv/financials_step_spec.rb | 55 ---- spec/services/idv/submit_idv_job_spec.rb | 24 -- .../idv/upcase_vendor_env_vars_spec.rb | 3 +- spec/support/features/idv_helper.rb | 10 - spec/support/idv_examples/max_attempts.rb | 24 -- .../idv_examples/otp_delivery_method.rb | 2 - .../usps_verification_selection.rb | 4 - .../views/verify/review/new.html.slim_spec.rb | 5 - 54 files changed, 13 insertions(+), 1553 deletions(-) delete mode 100644 app/assets/javascripts/app/idv-finance-helper.js delete mode 100644 app/controllers/verify/finance_controller.rb delete mode 100644 app/controllers/verify/finance_other_controller.rb delete mode 100644 app/forms/idv/finance_form.rb delete mode 100644 app/jobs/idv/finance_job.rb delete mode 100644 app/services/idv/financials_step.rb delete mode 100644 app/validators/form_finance_validator.rb delete mode 100644 app/view_models/verify/financials_new.rb delete mode 100644 app/views/verify/finance/new.html.slim delete mode 100644 app/views/verify/finance_other/new.html.slim delete mode 100644 spec/controllers/verify/finance_controller_spec.rb delete mode 100644 spec/forms/idv/finance_form_spec.rb delete mode 100644 spec/jobs/idv/finance_job_spec.rb delete mode 100644 spec/services/idv/financials_step_spec.rb diff --git a/.eslintrc b/.eslintrc index d44fdbcb02b..61a5d2966ea 100644 --- a/.eslintrc +++ b/.eslintrc @@ -36,7 +36,6 @@ 'app/pw-toggle', 'app/form-validation', 'app/form-field-format', - 'app/idv-finance-helper', 'app/radio-btn', 'app/print-personal-key', 'app/utils/ms-formatter', diff --git a/app/assets/javascripts/app/form-field-format.js b/app/assets/javascripts/app/form-field-format.js index b03ee377608..8f13ce3e031 100644 --- a/app/assets/javascripts/app/form-field-format.js +++ b/app/assets/javascripts/app/form-field-format.js @@ -9,12 +9,8 @@ import ZipCodeFormatter from './modules/zip-code-formatter'; function formatForm() { const formats = [ - ['.auto_loan', new NumericFormatter()], - ['.ccn', new NumericFormatter()], ['.dob', new DateFormatter()], - ['.home_equity_line', new NumericFormatter()], ['.mfa', new NumericFormatter()], - ['.mortgage', new NumericFormatter()], ['.phone', new InternationalPhoneFormatter()], ['.us-phone', new USPhoneFormatter()], ['.personal-key', new PersonalKeyFormatter()], diff --git a/app/assets/javascripts/app/idv-finance-helper.js b/app/assets/javascripts/app/idv-finance-helper.js deleted file mode 100644 index 62b091d069a..00000000000 --- a/app/assets/javascripts/app/idv-finance-helper.js +++ /dev/null @@ -1,45 +0,0 @@ -import 'classlist.js'; - -document.addEventListener('DOMContentLoaded', () => { - function hideAll(elems) { - Array.prototype.forEach.call(elems, (el) => { - el.classList.add('hide'); - }); - } - - function removeError() { - const errorMessage = document.querySelector('.error-message'); - - if (errorMessage) { - errorMessage.parentNode.classList.remove('has-error'); - errorMessage.parentNode.removeChild(errorMessage); - } - } - - function showInput(name) { - const inputWrappers = document.querySelectorAll('.js-finance-wrapper'); - hideAll(inputWrappers); - - const inputWrapperToShow = document.querySelector(`[data-type="${name}"]`); - if (inputWrapperToShow) { - inputWrapperToShow.classList.remove('hide'); - } - } - - const financeSelect = document.querySelector('.js-finance-choice-select'); - const submitButton = document.querySelector('.js-finance-submit'); - - if (financeSelect) { - const inputWrappers = document.querySelectorAll('.js-finance-wrapper'); - hideAll(inputWrappers); - - showInput(financeSelect.value || 'blank'); - submitButton.disabled = !financeSelect.value; - - financeSelect.addEventListener('change', () => { - removeError(); - showInput(financeSelect.value || 'blank'); - submitButton.disabled = !financeSelect.value; - }); - } -}); diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 64d07a2fd48..ea4090b8662 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -3,7 +3,6 @@ import 'app/utils/index'; import 'app/pw-toggle'; import 'app/form-validation'; import 'app/form-field-format'; -import 'app/idv-finance-helper'; import 'app/radio-btn'; import 'app/phone-internationalization'; import 'app/print-personal-key'; diff --git a/app/assets/stylesheets/components/_form.scss b/app/assets/stylesheets/components/_form.scss index 71df7c2435c..422f3245b9a 100644 --- a/app/assets/stylesheets/components/_form.scss +++ b/app/assets/stylesheets/components/_form.scss @@ -156,117 +156,3 @@ input::-webkit-inner-spin-button { background-color: $gray-light; border-color: $gray; } - -.select-alt { - color: $white; - display: inline-block; - position: relative; - width: 100%; - - select { - -moz-appearance: none; - -webkit-appearance: none; - appearance: none; - background-color: $navy; - border-right: 1px solid $blue; - color: $white; - cursor: pointer; - display: inline-block; - font-weight: normal; - line-height: 1.5; - padding-right: 2.25rem; - width: 100%; - } - - // Undo the Firefox inner focus ring - select:focus:-moz-focusring { - color: transparent; - text-shadow: 0 0 0 $white; - } - - select:active { - background-color: $navy; - color: $white; - } - - // Hide the arrow in IE10 and up - select::-ms-expand { - display: none; - } - - // Separator - &::before { - border-right: 1px solid $blue; - content: ''; - height: -moz-calc(3rem - 2px); - height: -webkit-calc(3rem - 2px); - height: calc(3rem - 2px); - position: absolute; - right: 3rem; - top: 1px; - width: 0; - } - - // Dropdown arrow - &::after { - border-bottom: .35rem solid transparent; - border-left: .35rem solid transparent; - border-right: .35rem solid transparent; - border-top: .35rem solid; - content: ''; - display: inline-block; - height: 0; - margin-top: -.15rem; - pointer-events: none; - position: absolute; - right: 1.25rem; - top: 50%; - width: 0; - } -} - -// Media query to target Firefox only -@-moz-document url-prefix() { - // Firefox hack to hide the arrow - .select-alt select { - padding-right: 1rem; - text-indent: .01px; - text-overflow: ''; - } - - //