diff --git a/app/services/db/doc_auth_log/drop_off_rates_helper.rb b/app/services/db/doc_auth_log/drop_off_rates_helper.rb index 340656e1b4d..348f40c6d6e 100644 --- a/app/services/db/doc_auth_log/drop_off_rates_helper.rb +++ b/app/services/db/doc_auth_log/drop_off_rates_helper.rb @@ -31,7 +31,7 @@ def select_counts_from_doc_auth_logs count(COALESCE(back_image_view_at,mobile_back_image_view_at,capture_mobile_back_image_view_at,present_cac_view_at)) as back_image, count(COALESCE(ssn_view_at,enter_info_view_at)) as ssn, count(verify_view_at) as verify_info, - count(COALESCE(doc_success_view_at,success_view_at)) as doc_success, + count(success_view_at) as doc_success, count(verify_phone_view_at) as phone, count(encrypt_view_at) as encrypt, count(verified_view_at) as personal_key diff --git a/app/services/funnel/doc_auth/register_step.rb b/app/services/funnel/doc_auth/register_step.rb index ebd14c03507..dfb216ebf6f 100644 --- a/app/services/funnel/doc_auth/register_step.rb +++ b/app/services/funnel/doc_auth/register_step.rb @@ -17,7 +17,6 @@ class RegisterStep verify_phone encrypt verified - doc_success usps_address usps_letter_sent capture_mobile_back_image diff --git a/app/services/idv/flows/doc_auth_flow.rb b/app/services/idv/flows/doc_auth_flow.rb index 163a573d625..90a35a9a417 100644 --- a/app/services/idv/flows/doc_auth_flow.rb +++ b/app/services/idv/flows/doc_auth_flow.rb @@ -16,7 +16,6 @@ class DocAuthFlow < Flow::BaseFlow ssn: Idv::Steps::SsnStep, verify: Idv::Steps::VerifyStep, verify_wait: Idv::Steps::VerifyWaitStep, - doc_success: Idv::Steps::DocSuccessStep, }.freeze OPTIONAL_SHOW_STEPS = { verify_wait: Idv::Steps::VerifyWaitStepShow, diff --git a/app/services/idv/flows/recovery_flow.rb b/app/services/idv/flows/recovery_flow.rb index f5d28038a51..6d8a01ea88a 100644 --- a/app/services/idv/flows/recovery_flow.rb +++ b/app/services/idv/flows/recovery_flow.rb @@ -15,7 +15,6 @@ class RecoveryFlow < Flow::BaseFlow ssn: Idv::Steps::SsnStep, verify: Idv::Steps::RecoverVerifyStep, verify_wait: Idv::Steps::RecoverVerifyWaitStep, - doc_success: Idv::Steps::DocSuccessStep, }.freeze OPTIONAL_SHOW_STEPS = { diff --git a/app/services/idv/steps/doc_success_step.rb b/app/services/idv/steps/doc_success_step.rb deleted file mode 100644 index 11fb41556af..00000000000 --- a/app/services/idv/steps/doc_success_step.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Idv - module Steps - class DocSuccessStep < DocAuthBaseStep - def call - step_successful - end - - private - - def step_successful - save_doc_auth - flow_session[:image_verification_data] = {} - end - - def save_doc_auth - doc_auth.license_confirmed_at = Time.zone.now - doc_auth.save - end - - def doc_auth - @doc_auth ||= ::DocAuthRecord.find_or_create_by(user_id: current_user.id) - end - end - end -end diff --git a/app/services/idv/steps/verify_wait_step_show.rb b/app/services/idv/steps/verify_wait_step_show.rb index e77fa9f44df..2c31f9f9985 100644 --- a/app/services/idv/steps/verify_wait_step_show.rb +++ b/app/services/idv/steps/verify_wait_step_show.rb @@ -30,6 +30,7 @@ def async_state_done(current_async_state) delete_async if response.success? + flash[:success] = I18n.t('doc_auth.forms.doc_success') mark_step_complete(:verify_wait) else mark_step_incomplete(:verify) diff --git a/app/views/idv/doc_auth/doc_success.html.erb b/app/views/idv/doc_auth/doc_success.html.erb deleted file mode 100644 index 7af2b9ead37..00000000000 --- a/app/views/idv/doc_auth/doc_success.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -<% title t('doc_auth.titles.doc_auth') %> - -<%= image_tag(asset_url('state-id-confirm@3x.png'), alt: '', width: 210) %> - -

- <%= t('doc_auth.forms.doc_success') %> -

- -
- -<%= validated_form_for( - '', - url: url_for, - method: 'PUT', - html: { autocomplete: 'off', role: 'form', class: 'mt2' } -) do |f| %> - <% f.simple_fields_for :doc_auth do %> - - <% end %> -<% end %> -
- <%= link_to t('links.cancel'), idv_cancel_path, class: 'h5' %> -
diff --git a/config/locales/doc_auth/en.yml b/config/locales/doc_auth/en.yml index bafb5c916e5..2a35859db0b 100644 --- a/config/locales/doc_auth/en.yml +++ b/config/locales/doc_auth/en.yml @@ -64,7 +64,7 @@ en: choose_file_html: Drag file here or choose from folder city: City dob: Date of Birth - doc_success: We've verified your social security number and state-issued ID. + doc_success: We have verified your personal information first_name: First Name last_name: Last Name selected_file: Selected file diff --git a/config/locales/doc_auth/es.yml b/config/locales/doc_auth/es.yml index 41b5f7b5f80..aff45a228f3 100644 --- a/config/locales/doc_auth/es.yml +++ b/config/locales/doc_auth/es.yml @@ -70,8 +70,7 @@ es: choose_file_html: Arrastre el archivo aquí o elija de la carpeta city: Ciudad dob: Fecha de nacimiento - doc_success: Verificamos su número de seguro social y su identificación emitida - por el estado. + doc_success: Hemos verificado su información personal first_name: Nombre de pila last_name: Apellido selected_file: Archivo seleccionado diff --git a/config/locales/doc_auth/fr.yml b/config/locales/doc_auth/fr.yml index 86d5b0f418a..5facd3fcd23 100644 --- a/config/locales/doc_auth/fr.yml +++ b/config/locales/doc_auth/fr.yml @@ -76,8 +76,7 @@ fr: un dossier city: Ville dob: Date de naissance - doc_success: Nous avons vérifié votre numéro de sécurité sociale et votre identifiant - délivré par l'État. + doc_success: Nous avons vérifié vos informations personnelles first_name: Prénom last_name: Nom de famille selected_file: Fichier sélectionné diff --git a/db/migrate/20201102150543_drop_doc_success_view_from_doc_auth_logs.rb b/db/migrate/20201102150543_drop_doc_success_view_from_doc_auth_logs.rb new file mode 100644 index 00000000000..4c92312acaf --- /dev/null +++ b/db/migrate/20201102150543_drop_doc_success_view_from_doc_auth_logs.rb @@ -0,0 +1,13 @@ +class DropDocSuccessViewFromDocAuthLogs < ActiveRecord::Migration[5.2] + def up + safety_assured do + remove_column :doc_auth_logs, :doc_success_view_at + remove_column :doc_auth_logs, :doc_success_view_count + end + end + + def down + add_column :doc_auth_logs, :doc_success_view_at, :datetime + add_column :doc_auth_logs, :doc_success_view_count, :integer, default: 0 + end +end diff --git a/db/schema.rb b/db/schema.rb index 0e2affc8ff5..0c755c8bab0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_10_29_192324) do +ActiveRecord::Schema.define(version: 2020_11_02_150543) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -138,8 +138,6 @@ t.integer "verify_view_count", default: 0 t.integer "verify_submit_count", default: 0 t.integer "verify_error_count", default: 0 - t.datetime "doc_success_view_at" - t.integer "doc_success_view_count", default: 0 t.datetime "verify_phone_view_at" t.integer "verify_phone_view_count", default: 0 t.datetime "usps_address_view_at" diff --git a/spec/features/idv/doc_auth/cancel_spec.rb b/spec/features/idv/doc_auth/cancel_spec.rb index 69abc0dc228..10a0c38c27f 100644 --- a/spec/features/idv/doc_auth/cancel_spec.rb +++ b/spec/features/idv/doc_auth/cancel_spec.rb @@ -6,11 +6,11 @@ before do sign_in_and_2fa_user - complete_doc_auth_steps_before_doc_success_step + complete_doc_auth_steps_before_verify_step end it 'correctly restarts doc auth flow upon cancel and revisit' do - expect(page).to have_current_path(idv_doc_auth_success_step) + expect(page).to have_current_path(idv_doc_auth_verify_step) click_link t('links.cancel') @@ -24,7 +24,7 @@ visit account_path expect(current_path).to eq(account_path) - visit(idv_doc_auth_success_step) + visit(idv_doc_auth_verify_step) expect(current_path).to eq(idv_doc_auth_welcome_step) end end diff --git a/spec/features/idv/doc_auth/doc_success_step_spec.rb b/spec/features/idv/doc_auth/doc_success_step_spec.rb deleted file mode 100644 index 4746a2eaa9a..00000000000 --- a/spec/features/idv/doc_auth/doc_success_step_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'rails_helper' - -feature 'doc auth success step' do - include IdvStepHelper - include DocAuthHelper - - before do - sign_in_and_2fa_user - complete_doc_auth_steps_before_doc_success_step - end - - it 'is on the correct page' do - expect(page).to have_current_path(idv_doc_auth_success_step) - expect(page).to have_content(t('doc_auth.forms.doc_success')) - end - - it 'proceeds to the next page with valid info' do - click_idv_continue - - expect(page).to have_current_path(idv_phone_path) - end -end diff --git a/spec/features/idv/doc_auth/finished_spec.rb b/spec/features/idv/doc_auth/finished_spec.rb index b80c1e17297..4e2a311d4e9 100644 --- a/spec/features/idv/doc_auth/finished_spec.rb +++ b/spec/features/idv/doc_auth/finished_spec.rb @@ -15,7 +15,7 @@ it 'is on the correct page when using the back button after final step' do expect(page).to have_current_path(idv_phone_path) - visit '/verify/doc_auth/doc_success' + visit '/verify/doc_auth/verify' expect(page).to have_current_path(idv_phone_path) end end diff --git a/spec/features/idv/doc_auth/verify_step_spec.rb b/spec/features/idv/doc_auth/verify_step_spec.rb index 0705dba9c6d..2a9e0e35043 100644 --- a/spec/features/idv/doc_auth/verify_step_spec.rb +++ b/spec/features/idv/doc_auth/verify_step_spec.rb @@ -19,7 +19,8 @@ it 'proceeds to the next page upon confirmation' do click_idv_continue - expect(page).to have_current_path(idv_doc_auth_success_step) + expect(page).to have_current_path(idv_phone_path) + expect(page).to have_content(t('doc_auth.forms.doc_success')) user = User.first expect(user.proofing_component.resolution_check).to eq('lexis_nexis') expect(user.proofing_component.source_check).to eq('aamva') @@ -111,7 +112,7 @@ complete_doc_auth_steps_before_verify_step click_idv_continue - expect(page).to have_current_path(idv_doc_auth_success_step) + expect(page).to have_current_path(idv_phone_path) end end diff --git a/spec/features/idv/recovery/recover_fail_step_spec.rb b/spec/features/idv/recovery/recover_fail_step_spec.rb index 815a228da45..c66d11faeb4 100644 --- a/spec/features/idv/recovery/recover_fail_step_spec.rb +++ b/spec/features/idv/recovery/recover_fail_step_spec.rb @@ -16,7 +16,8 @@ sign_in_before_2fa(user) allow_any_instance_of(Idv::Steps::RecoverVerifyWaitStepShow).to receive(:saved_pii). and_return(bad_pii.to_json) - complete_recovery_steps_before_doc_success_step + complete_recovery_steps_before_verify_step + click_idv_continue end it 'fails to re-verify if the pii does not match and then it proceeds to start re-verify over' do diff --git a/spec/features/reports/doc_auth_funnel_report_spec.rb b/spec/features/reports/doc_auth_funnel_report_spec.rb index 100e9977353..c069aa224e7 100644 --- a/spec/features/reports/doc_auth_funnel_report_spec.rb +++ b/spec/features/reports/doc_auth_funnel_report_spec.rb @@ -20,7 +20,7 @@ 'total_verify_attempted_users_count' => 2, } end - let(:doc_success_funnel) do + let(:verify_funnel) do { 'back_image_error_count_average' => 0.0, 'back_image_submit_count_average' => 1.0, @@ -34,8 +34,6 @@ 'capture_mobile_back_image_submit_count_average' => 0.0, 'choose_method_view_count_average' => 0.0, 'choose_method_view_percent' => 0.0, - 'doc_success_view_count_average' => 1.0, - 'doc_success_view_percent' => 100.0, 'email_sent_view_count_average' => 0.0, 'email_sent_view_percent' => 0.0, 'encrypt_view_count_average' => 0.0, @@ -79,8 +77,8 @@ 'verified_view_count_average' => 0.0, 'verified_view_percent' => 0.0, 'verify_error_count_average' => 0.0, - 'verify_phone_view_count_average' => 0.0, - 'verify_phone_view_percent' => 0.0, + 'verify_phone_view_count_average' => 1.0, + 'verify_phone_view_percent' => 100.0, 'verify_submit_count_average' => 1.0, 'verify_view_count_average' => 1.0, 'verify_view_percent' => 100.0, @@ -95,21 +93,21 @@ it 'works for one flow' do sign_in_and_2fa_user(user) - complete_doc_auth_steps_before_doc_success_step + complete_all_doc_auth_steps - expect(subject.new.call).to eq(doc_success_funnel.merge(summary1)) + expect(subject.new.call).to eq(verify_funnel.merge(summary1)) Funnel::DocAuth::ResetSteps.call(user.id) - expect(subject.new.call).to_not eq(doc_success_funnel.merge(summary1)) + expect(subject.new.call).to_not eq(verify_funnel.merge(summary1)) end it 'works for two flows' do sign_in_and_2fa_user(user) - complete_doc_auth_steps_before_doc_success_step + complete_all_doc_auth_steps sign_in_and_2fa_user(user2) - complete_doc_auth_steps_before_doc_success_step + complete_all_doc_auth_steps - expect(subject.new.call).to eq(doc_success_funnel.merge(summary2)) + expect(subject.new.call).to eq(verify_funnel.merge(summary2)) end it 'does not create a doc_auth_log entry without a welcome first' do diff --git a/spec/features/reports/proofing_costs_report_spec.rb b/spec/features/reports/proofing_costs_report_spec.rb index 7aac8eaedcd..a00afc9adce 100644 --- a/spec/features/reports/proofing_costs_report_spec.rb +++ b/spec/features/reports/proofing_costs_report_spec.rb @@ -17,7 +17,7 @@ 'total_proofing_costs_users_count' => 2, } end - let(:doc_success_funnel) do + let(:verify_funnel) do { 'acuant_front_image_count_average' => 1.0, 'acuant_back_image_count_average' => 1.0, @@ -37,17 +37,17 @@ it 'works for one flow' do sign_in_and_2fa_user(user) - complete_doc_auth_steps_before_doc_success_step + complete_all_doc_auth_steps - expect(report).to eq(doc_success_funnel.merge(summary1)) + expect(report).to eq(verify_funnel.merge(summary1)) end it 'works for two flows' do sign_in_and_2fa_user(user) - complete_doc_auth_steps_before_doc_success_step + complete_all_doc_auth_steps sign_in_and_2fa_user(user2) - complete_doc_auth_steps_before_doc_success_step + complete_all_doc_auth_steps - expect(report).to eq(doc_success_funnel.merge(summary2)) + expect(report).to eq(verify_funnel.merge(summary2)) end end diff --git a/spec/support/features/doc_auth_helper.rb b/spec/support/features/doc_auth_helper.rb index 7d1f3270b34..e68d20b3f03 100644 --- a/spec/support/features/doc_auth_helper.rb +++ b/spec/support/features/doc_auth_helper.rb @@ -62,10 +62,6 @@ def idv_doc_auth_mobile_back_image_step idv_doc_auth_step_path(step: :mobile_back_image) end - def idv_doc_auth_success_step - idv_doc_auth_step_path(step: :doc_success) - end - def idv_doc_auth_verify_step idv_doc_auth_step_path(step: :verify) end @@ -164,14 +160,8 @@ def complete_doc_auth_steps_before_address_step(expect_accessible: false) click_link t('doc_auth.buttons.change_address') end - def complete_doc_auth_steps_before_doc_success_step(expect_accessible: false) - complete_doc_auth_steps_before_verify_step(expect_accessible: expect_accessible) - expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible - click_idv_continue - end - def complete_doc_auth_steps_before_self_image_step - complete_doc_auth_steps_before_doc_success_step + complete_doc_auth_steps_before_verify_step click_idv_continue end @@ -187,7 +177,7 @@ def complete_doc_auth_steps_before_link_sent_step end def complete_all_doc_auth_steps(expect_accessible: false) - complete_doc_auth_steps_before_doc_success_step(expect_accessible: expect_accessible) + complete_doc_auth_steps_before_verify_step(expect_accessible: expect_accessible) expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible click_idv_continue end diff --git a/spec/support/features/recovery_helper.rb b/spec/support/features/recovery_helper.rb index 834fe5f156d..0f0bef7599c 100644 --- a/spec/support/features/recovery_helper.rb +++ b/spec/support/features/recovery_helper.rb @@ -39,11 +39,6 @@ def complete_recovery_steps_before_verify_step(user = user_with_2fa) click_idv_continue end - def complete_recovery_steps_before_doc_success_step(user = user_with_2fa) - complete_recovery_steps_before_verify_step(user) - click_idv_continue - end - def idv_recovery_recover_step(token) idv_recovery_step_path(step: :recover, token: token) end @@ -75,8 +70,4 @@ def idv_recovery_verify_step def idv_recovery_verify_wait_step idv_recovery_step_path(step: :verify_wait) end - - def idv_recovery_success_step - idv_recovery_step_path(step: :doc_success) - end end diff --git a/spec/support/monitor/monitor_idv_steps.rb b/spec/support/monitor/monitor_idv_steps.rb index d3063d5a08d..5d229e853d7 100644 --- a/spec/support/monitor/monitor_idv_steps.rb +++ b/spec/support/monitor/monitor_idv_steps.rb @@ -41,9 +41,6 @@ def verify_identity_with_doc_auth click_on 'Continue' expect(page).to have_current_path('/verify/doc_auth/verify') - click_on 'Continue' - expect(page).to have_current_path('/verify/doc_auth/doc_success') - click_on 'Continue' expect(page).to have_current_path('/verify/phone')