diff --git a/.reek b/.reek index 7e9d672dca8..b6dd62aa46d 100644 --- a/.reek +++ b/.reek @@ -68,8 +68,8 @@ LongParameterList: RepeatedConditional: exclude: - Users::ResetPasswordsController - - VerifyController - - Verify::Base + - IdvController + - Idv::Base - Rack::Attack TooManyConstants: exclude: @@ -101,7 +101,7 @@ TooManyMethods: - OpenidConnect::AuthorizationController - Idv::Session - User - - Verify::SessionsController + - Idv::SessionsController - ServiceProviderSessionDecorator - SessionDecorator UncommunicativeMethodName: diff --git a/app/controllers/concerns/idv_session.rb b/app/controllers/concerns/idv_session.rb index b677a716778..83450691aaa 100644 --- a/app/controllers/concerns/idv_session.rb +++ b/app/controllers/concerns/idv_session.rb @@ -3,26 +3,26 @@ module IdvSession def confirm_idv_session_started return if current_user.decorate.needs_profile_usps_verification? - redirect_to verify_session_url if idv_session.params.blank? + redirect_to idv_session_url if idv_session.params.blank? end def confirm_idv_attempts_allowed if idv_attempter.exceeded? flash[:error] = t('idv.errors.hardfail') analytics.track_event(Analytics::IDV_MAX_ATTEMPTS_EXCEEDED, request_path: request.path) - redirect_to verify_fail_url + redirect_to idv_fail_url elsif idv_attempter.reset_attempts? idv_attempter.reset end end def confirm_idv_needed - redirect_to verify_activated_url if current_user.active_profile.present? + redirect_to idv_activated_url if current_user.active_profile.present? end def confirm_idv_vendor_session_started return if flash[:allow_confirmations_continue] - redirect_to verify_session_url unless idv_session.proofing_started? + redirect_to idv_session_url unless idv_session.proofing_started? end def idv_session diff --git a/app/controllers/concerns/idv_step_concern.rb b/app/controllers/concerns/idv_step_concern.rb index 3697d5ca7bb..ea31f59a065 100644 --- a/app/controllers/concerns/idv_step_concern.rb +++ b/app/controllers/concerns/idv_step_concern.rb @@ -29,6 +29,6 @@ def confirm_step_allowed def redirect_to_fail_url flash[:max_attempts_exceeded] = true - redirect_to verify_fail_url + redirect_to idv_fail_url end end diff --git a/app/controllers/concerns/two_factor_authenticatable.rb b/app/controllers/concerns/two_factor_authenticatable.rb index 01fc7dd41d0..7d2fdc3b948 100644 --- a/app/controllers/concerns/two_factor_authenticatable.rb +++ b/app/controllers/concerns/two_factor_authenticatable.rb @@ -189,7 +189,7 @@ def reset_otp_session_data def after_otp_verification_confirmation_url if idv_context? - verify_review_url + idv_review_url elsif after_otp_action_required? after_otp_action_url else @@ -289,7 +289,7 @@ def decorated_user def reenter_phone_number_path locale = LinkLocaleResolver.locale if idv_context? - verify_phone_path(locale: locale) + idv_phone_path(locale: locale) elsif current_user.phone.present? manage_phone_path(locale: locale) else diff --git a/app/controllers/verify/address_controller.rb b/app/controllers/idv/address_controller.rb similarity index 84% rename from app/controllers/verify/address_controller.rb rename to app/controllers/idv/address_controller.rb index d6425c93992..b7da277a499 100644 --- a/app/controllers/verify/address_controller.rb +++ b/app/controllers/idv/address_controller.rb @@ -1,4 +1,4 @@ -module Verify +module Idv class AddressController < ApplicationController include IdvStepConcern @@ -27,14 +27,14 @@ def address_delivery_params def address_delivery_destination destination = address_delivery_params[:address_delivery_method] if destination == 'phone' - verify_phone_path + idv_phone_path elsif destination == 'usps' - verify_usps_path + idv_usps_path end end def confirm_step_needed - redirect_to verify_review_url if idv_session.address_mechanism_chosen? + redirect_to idv_review_url if idv_session.address_mechanism_chosen? end end end diff --git a/app/controllers/verify/come_back_later_controller.rb b/app/controllers/idv/come_back_later_controller.rb similarity index 95% rename from app/controllers/verify/come_back_later_controller.rb rename to app/controllers/idv/come_back_later_controller.rb index 4a9a2e026d1..eee0d92e1cb 100644 --- a/app/controllers/verify/come_back_later_controller.rb +++ b/app/controllers/idv/come_back_later_controller.rb @@ -1,4 +1,4 @@ -module Verify +module Idv class ComeBackLaterController < ApplicationController include IdvSession diff --git a/app/controllers/verify/confirmations_controller.rb b/app/controllers/idv/confirmations_controller.rb similarity index 96% rename from app/controllers/verify/confirmations_controller.rb rename to app/controllers/idv/confirmations_controller.rb index 28cf887313e..c1e13ae0357 100644 --- a/app/controllers/verify/confirmations_controller.rb +++ b/app/controllers/idv/confirmations_controller.rb @@ -1,4 +1,4 @@ -module Verify +module Idv class ConfirmationsController < ApplicationController include IdvSession @@ -22,7 +22,7 @@ def next_step if session[:sp] && !pending_profile? sign_up_completed_url elsif pending_profile? && idv_session.address_verification_mechanism == 'usps' - verify_come_back_later_url + idv_come_back_later_url else after_sign_in_path_for(current_user) end diff --git a/app/controllers/verify/otp_delivery_method_controller.rb b/app/controllers/idv/otp_delivery_method_controller.rb similarity index 77% rename from app/controllers/verify/otp_delivery_method_controller.rb rename to app/controllers/idv/otp_delivery_method_controller.rb index 407b85dc74f..edcc275fec4 100644 --- a/app/controllers/verify/otp_delivery_method_controller.rb +++ b/app/controllers/idv/otp_delivery_method_controller.rb @@ -1,4 +1,4 @@ -module Verify +module Idv class OtpDeliveryMethodController < ApplicationController include IdvSession include PhoneConfirmation @@ -26,12 +26,12 @@ def create private def confirm_phone_step_complete - redirect_to verify_review_url if idv_session.vendor_phone_confirmation != true + redirect_to idv_review_url if idv_session.vendor_phone_confirmation != true end def confirm_step_needed - redirect_to verify_review_url if idv_session.address_verification_mechanism != 'phone' || - idv_session.user_phone_confirmation == true + redirect_to idv_review_url if idv_session.address_verification_mechanism != 'phone' || + idv_session.user_phone_confirmation == true end def otp_delivery_selection_params @@ -41,7 +41,7 @@ def otp_delivery_selection_params end def set_otp_delivery_method_presenter - @set_otp_delivery_method_presenter = OtpDeliveryMethodPresenter.new( + @set_otp_delivery_method_presenter = Idv::OtpDeliveryMethodPresenter.new( idv_session.params[:phone] ) end diff --git a/app/controllers/verify/phone_controller.rb b/app/controllers/idv/phone_controller.rb similarity index 91% rename from app/controllers/verify/phone_controller.rb rename to app/controllers/idv/phone_controller.rb index 292f2a30768..21583bcad8f 100644 --- a/app/controllers/verify/phone_controller.rb +++ b/app/controllers/idv/phone_controller.rb @@ -1,4 +1,4 @@ -module Verify +module Idv class PhoneController < ApplicationController include IdvStepConcern include IdvFailureConcern @@ -18,7 +18,7 @@ def create if result.success? Idv::Job.submit(idv_session, [:address]) - redirect_to verify_phone_result_url + redirect_to idv_phone_result_url else @view_model = view_model render :new @@ -42,9 +42,9 @@ def show def redirect_to_next_step if phone_confirmation_required? - redirect_to verify_otp_delivery_method_url + redirect_to idv_otp_delivery_method_url else - redirect_to verify_review_url + redirect_to idv_review_url end end @@ -65,7 +65,7 @@ def step end def view_model_class - Verify::PhoneNew + Idv::PhoneNew end def step_params diff --git a/app/controllers/verify/review_controller.rb b/app/controllers/idv/review_controller.rb similarity index 90% rename from app/controllers/verify/review_controller.rb rename to app/controllers/idv/review_controller.rb index 0d789856b22..340ba2f8209 100644 --- a/app/controllers/verify/review_controller.rb +++ b/app/controllers/idv/review_controller.rb @@ -1,4 +1,4 @@ -module Verify +module Idv class ReviewController < ApplicationController include IdvStepConcern include PhoneConfirmation @@ -8,8 +8,8 @@ class ReviewController < ApplicationController before_action :confirm_current_password, only: [:create] def confirm_idv_steps_complete - return redirect_to(verify_session_url) unless idv_profile_complete? - return redirect_to(verify_address_url) unless idv_address_complete? + return redirect_to(idv_session_url) unless idv_profile_complete? + return redirect_to(idv_address_url) unless idv_address_complete? end def confirm_idv_phone_confirmed @@ -26,7 +26,7 @@ def confirm_current_password return if valid_password? flash[:error] = t('idv.errors.incorrect_password') - redirect_to verify_review_url + redirect_to idv_review_url end def new @@ -44,7 +44,7 @@ def new def create init_profile - redirect_to verify_confirmations_url + redirect_to idv_confirmations_url analytics.track_event(Analytics::IDV_REVIEW_COMPLETE) return unless FeatureManagement.reveal_usps_code? diff --git a/app/controllers/verify/sessions_controller.rb b/app/controllers/idv/sessions_controller.rb similarity index 91% rename from app/controllers/verify/sessions_controller.rb rename to app/controllers/idv/sessions_controller.rb index 985279a1e77..0ad8b18b36a 100644 --- a/app/controllers/verify/sessions_controller.rb +++ b/app/controllers/idv/sessions_controller.rb @@ -1,4 +1,4 @@ -module Verify +module Idv class SessionsController < ApplicationController include IdvSession include IdvFailureConcern @@ -25,7 +25,7 @@ def create if result.success? Idv::Job.submit(idv_session, %i[resolution state_id]) - redirect_to verify_session_result_url + redirect_to idv_session_result_url else process_failure end @@ -51,7 +51,7 @@ def destroy private def confirm_step_needed - redirect_to verify_address_url if idv_session.profile_confirmation == true + redirect_to idv_address_url if idv_session.profile_confirmation == true end def step @@ -73,13 +73,13 @@ def process_success :strong, t('idv.messages.sessions.pii') ) flash[:success] = t('idv.messages.sessions.success', pii_message: pii_msg) - redirect_to verify_address_url + redirect_to idv_address_url end def process_failure if idv_form.duplicate_ssn? flash[:error] = t('idv.errors.duplicate_ssn') - redirect_to verify_session_dupe_url + redirect_to idv_session_dupe_url else render_failure @view_model.unsupported_jurisdiction_error(decorated_session.sp_name) @@ -88,7 +88,7 @@ def process_failure end def view_model_class - Verify::SessionsNew + Idv::SessionsNew end def remaining_step_attempts diff --git a/app/controllers/verify/usps_controller.rb b/app/controllers/idv/usps_controller.rb similarity index 80% rename from app/controllers/verify/usps_controller.rb rename to app/controllers/idv/usps_controller.rb index 653462eecd5..f42b4fbbeea 100644 --- a/app/controllers/verify/usps_controller.rb +++ b/app/controllers/idv/usps_controller.rb @@ -1,4 +1,4 @@ -module Verify +module Idv class UspsController < ApplicationController include IdvStepConcern @@ -14,9 +14,9 @@ def create if current_user.decorate.needs_profile_usps_verification? resend_letter - redirect_to verify_come_back_later_url + redirect_to idv_come_back_later_url else - redirect_to verify_review_url + redirect_to idv_review_url end end @@ -27,8 +27,8 @@ def usps_mail_service private def confirm_mail_not_spammed - redirect_to verify_review_url if idv_session.address_mechanism_chosen? && - usps_mail_service.mail_spammed? + redirect_to idv_review_url if idv_session.address_mechanism_chosen? && + usps_mail_service.mail_spammed? end def resend_letter diff --git a/app/controllers/verify_controller.rb b/app/controllers/idv_controller.rb similarity index 79% rename from app/controllers/verify_controller.rb rename to app/controllers/idv_controller.rb index d164784705b..fe0ae24560c 100644 --- a/app/controllers/verify_controller.rb +++ b/app/controllers/idv_controller.rb @@ -1,4 +1,4 @@ -class VerifyController < ApplicationController +class IdvController < ApplicationController include IdvSession include AccountReactivationConcern @@ -8,16 +8,16 @@ class VerifyController < ApplicationController def index if active_profile? - redirect_to verify_activated_url + redirect_to idv_activated_url elsif idv_attempter.exceeded? - redirect_to verify_fail_url + redirect_to idv_fail_url else analytics.track_event(Analytics::IDV_INTRO_VISIT) end end def activated - redirect_to verify_url unless active_profile? + redirect_to idv_url unless active_profile? idv_attempter.reset idv_session.clear end @@ -25,7 +25,7 @@ def activated def cancel; end def fail - redirect_to verify_url unless ok_to_fail? + redirect_to idv_url unless ok_to_fail? end private diff --git a/app/controllers/openid_connect/authorization_controller.rb b/app/controllers/openid_connect/authorization_controller.rb index 0b0038093a5..fa63a51f879 100644 --- a/app/controllers/openid_connect/authorization_controller.rb +++ b/app/controllers/openid_connect/authorization_controller.rb @@ -28,7 +28,7 @@ def handle_successful_handoff def redirect_to_account_or_verify_profile_url return redirect_to(account_or_verify_profile_url) if profile_needs_verification? - redirect_to(verify_url) if identity_needs_verification? + redirect_to(idv_url) if identity_needs_verification? end def profile_or_identity_needs_verification? diff --git a/app/controllers/reactivate_account_controller.rb b/app/controllers/reactivate_account_controller.rb index dbb0eccba49..dbf6a427010 100644 --- a/app/controllers/reactivate_account_controller.rb +++ b/app/controllers/reactivate_account_controller.rb @@ -8,6 +8,6 @@ def index; end def update reactivate_account_session.suspend - redirect_to verify_url + redirect_to idv_url end end diff --git a/app/controllers/saml_idp_controller.rb b/app/controllers/saml_idp_controller.rb index de8e4b4f80f..5e4d7ce475d 100644 --- a/app/controllers/saml_idp_controller.rb +++ b/app/controllers/saml_idp_controller.rb @@ -75,7 +75,7 @@ def cert_rotation_saml_metadata def redirect_to_account_or_verify_profile_url return redirect_to(account_or_verify_profile_url) if profile_needs_verification? - redirect_to(verify_url) if identity_needs_verification? + redirect_to(idv_url) if identity_needs_verification? end def profile_or_identity_needs_verification? diff --git a/app/controllers/sign_up/completions_controller.rb b/app/controllers/sign_up/completions_controller.rb index d190ce022ca..aac85a776dd 100644 --- a/app/controllers/sign_up/completions_controller.rb +++ b/app/controllers/sign_up/completions_controller.rb @@ -48,7 +48,7 @@ def view_model end def verify_confirmed - redirect_to verify_url if current_user.decorate.identity_not_verified? + redirect_to idv_url if current_user.decorate.identity_not_verified? end def loa3? diff --git a/app/decorators/service_provider_session_decorator.rb b/app/decorators/service_provider_session_decorator.rb index 7779e0f64dd..cef1f435bdb 100644 --- a/app/decorators/service_provider_session_decorator.rb +++ b/app/decorators/service_provider_session_decorator.rb @@ -61,7 +61,7 @@ def verification_method_choice end def idv_hardfail4_partial - 'verify/hardfail4' + 'idv/hardfail4' end def requested_attributes diff --git a/app/decorators/session_decorator.rb b/app/decorators/session_decorator.rb index 9de1759be35..c161d8ddf41 100644 --- a/app/decorators/session_decorator.rb +++ b/app/decorators/session_decorator.rb @@ -27,7 +27,7 @@ def verification_method_choice end def idv_hardfail4_partial - 'verify/no_sp_hardfail' + 'idv/no_sp_hardfail' end def cancel_link_url diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a0d66f0f261..218148d6d8b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -55,7 +55,7 @@ def sign_up_or_idv_no_js_link if user_signing_up? destroy_user_path elsif user_verifying_identity? - verify_session_path + idv_session_path end end diff --git a/app/presenters/verify/otp_delivery_method_presenter.rb b/app/presenters/idv/otp_delivery_method_presenter.rb similarity index 97% rename from app/presenters/verify/otp_delivery_method_presenter.rb rename to app/presenters/idv/otp_delivery_method_presenter.rb index d0eb7a8d6d3..6d864fa48da 100644 --- a/app/presenters/verify/otp_delivery_method_presenter.rb +++ b/app/presenters/idv/otp_delivery_method_presenter.rb @@ -1,4 +1,4 @@ -module Verify +module Idv class OtpDeliveryMethodPresenter attr_reader :phone diff --git a/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb b/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb index 006d801f2d7..6117d9a4c45 100644 --- a/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb @@ -29,7 +29,7 @@ def cancel_link if confirmation_for_phone_change || reauthn account_path(locale: locale) elsif confirmation_for_idv - verify_cancel_path(locale: locale) + idv_cancel_path(locale: locale) else sign_out_path(locale: locale) end diff --git a/app/view_models/verify/base.rb b/app/view_models/idv/base.rb similarity index 95% rename from app/view_models/verify/base.rb rename to app/view_models/idv/base.rb index bc26124fa14..ff779335bef 100644 --- a/app/view_models/verify/base.rb +++ b/app/view_models/idv/base.rb @@ -1,4 +1,4 @@ -module Verify +module Idv class Base include Rails.application.routes.url_helpers @@ -42,7 +42,7 @@ def button :button, button_link_text, id: 'js-close-modal', class: button_css_classes ) else - helper.link_to button_link_text, verify_fail_path, class: button_css_classes + helper.link_to button_link_text, idv_fail_path, class: button_css_classes end end diff --git a/app/view_models/verify/phone_new.rb b/app/view_models/idv/phone_new.rb similarity index 51% rename from app/view_models/verify/phone_new.rb rename to app/view_models/idv/phone_new.rb index 10ac144327f..bff92046ffe 100644 --- a/app/view_models/verify/phone_new.rb +++ b/app/view_models/idv/phone_new.rb @@ -1,5 +1,5 @@ -module Verify - class PhoneNew < Verify::Base +module Idv + class PhoneNew < Idv::Base def step_name :phone end diff --git a/app/view_models/verify/sessions_new.rb b/app/view_models/idv/sessions_new.rb similarity index 90% rename from app/view_models/verify/sessions_new.rb rename to app/view_models/idv/sessions_new.rb index 26c59ab34f1..f550de58e7f 100644 --- a/app/view_models/verify/sessions_new.rb +++ b/app/view_models/idv/sessions_new.rb @@ -1,5 +1,5 @@ -module Verify - class SessionsNew < Verify::Base +module Idv + class SessionsNew < Idv::Base def step_name :sessions end diff --git a/app/views/verify/_hardfail4.html.slim b/app/views/idv/_hardfail4.html.slim similarity index 100% rename from app/views/verify/_hardfail4.html.slim rename to app/views/idv/_hardfail4.html.slim diff --git a/app/views/verify/_no_sp_hardfail.html.slim b/app/views/idv/_no_sp_hardfail.html.slim similarity index 100% rename from app/views/verify/_no_sp_hardfail.html.slim rename to app/views/idv/_no_sp_hardfail.html.slim diff --git a/app/views/verify/activated.html.slim b/app/views/idv/activated.html.slim similarity index 100% rename from app/views/verify/activated.html.slim rename to app/views/idv/activated.html.slim diff --git a/app/views/verify/address/index.html.slim b/app/views/idv/address/index.html.slim similarity index 95% rename from app/views/verify/address/index.html.slim rename to app/views/idv/address/index.html.slim index 41be657be62..b45b7bf12d6 100644 --- a/app/views/verify/address/index.html.slim +++ b/app/views/idv/address/index.html.slim @@ -24,4 +24,4 @@ p = button_tag t('forms.buttons.continue'), type: 'submit', class: 'btn btn-primary col-6 mb2 p2 rounded-lg inline-block' -= render 'shared/cancel', link: verify_cancel_path += render 'shared/cancel', link: idv_cancel_path diff --git a/app/views/verify/cancel.html.slim b/app/views/idv/cancel.html.slim similarity index 72% rename from app/views/verify/cancel.html.slim rename to app/views/idv/cancel.html.slim index 02002e71051..5ec50e8bac2 100644 --- a/app/views/verify/cancel.html.slim +++ b/app/views/idv/cancel.html.slim @@ -2,4 +2,4 @@ h1.h3.my0 = t('idv.titles.cancel') p.mt-tiny.mb0 = t('idv.messages.cancel', app: APP_NAME) -= link_to t('forms.buttons.back'), verify_path += link_to t('forms.buttons.back'), idv_path diff --git a/app/views/verify/come_back_later/show.html.slim b/app/views/idv/come_back_later/show.html.slim similarity index 100% rename from app/views/verify/come_back_later/show.html.slim rename to app/views/idv/come_back_later/show.html.slim diff --git a/app/views/idv/confirmations/show.html.slim b/app/views/idv/confirmations/show.html.slim new file mode 100644 index 00000000000..6f98164c64c --- /dev/null +++ b/app/views/idv/confirmations/show.html.slim @@ -0,0 +1,3 @@ +- title t('titles.personal_key') + += render 'shared/personal_key', code: @code, update_path: idv_confirmations_path diff --git a/app/views/verify/fail.html.slim b/app/views/idv/fail.html.slim similarity index 100% rename from app/views/verify/fail.html.slim rename to app/views/idv/fail.html.slim diff --git a/app/views/verify/index.html.slim b/app/views/idv/index.html.slim similarity index 89% rename from app/views/verify/index.html.slim rename to app/views/idv/index.html.slim index 6f6cafb290f..c846664299b 100644 --- a/app/views/verify/index.html.slim +++ b/app/views/idv/index.html.slim @@ -32,6 +32,6 @@ h1.h3.my0 = t('idv.titles.expectations') p.mb3 = t('idv.index.paragraph_1') p.mb3.bold = t('idv.index.prompt') -= link_to t('idv.index.continue_link'), verify_session_path, class: 'btn btn-primary btn-wide' += link_to t('idv.index.continue_link'), idv_session_path, class: 'btn btn-primary btn-wide' -= render 'shared/cancel', link: verify_cancel_path += render 'shared/cancel', link: idv_cancel_path diff --git a/app/views/verify/otp_delivery_method/new.html.slim b/app/views/idv/otp_delivery_method/new.html.slim similarity index 91% rename from app/views/verify/otp_delivery_method/new.html.slim rename to app/views/idv/otp_delivery_method/new.html.slim index 18a82b882c2..b8f57fc798b 100644 --- a/app/views/verify/otp_delivery_method/new.html.slim +++ b/app/views/idv/otp_delivery_method/new.html.slim @@ -1,7 +1,7 @@ h1.h3.my0 = t('idv.titles.otp_delivery_method') p = t('idv.messages.otp_delivery_method.phone_number_html', phone: @set_otp_delivery_method_presenter.phone) -= simple_form_for(@otp_delivery_selection_form, url: verify_otp_delivery_method_url, += simple_form_for(@otp_delivery_selection_form, url: idv_otp_delivery_method_url, html: { autocomplete: 'off', method: 'put', role: 'form', class: 'mt2' }) do |f| fieldset.mb3.p0.border-none legend.mb1.h4.serif.bold = t('devise.two_factor_authentication.otp_delivery_preference.title') @@ -30,4 +30,4 @@ p = t('idv.messages.otp_delivery_method.phone_number_html', = f.submit t('idv.buttons.send_confirmation_code'), type: :submit, class: 'btn btn-primary' .mt2.pt1.border-top = t('instructions.mfa.wrong_number_html', - link: link_to(t('forms.two_factor.try_again'), verify_phone_path)) + link: link_to(t('forms.two_factor.try_again'), idv_phone_path)) diff --git a/app/views/idv/phone/_verification_options.html.slim b/app/views/idv/phone/_verification_options.html.slim new file mode 100644 index 00000000000..ce9d7f85331 --- /dev/null +++ b/app/views/idv/phone/_verification_options.html.slim @@ -0,0 +1,3 @@ +p + = t('idv.form.no_alternate_phone_html', + link: link_to(t('idv.form.activate_by_mail'), idv_usps_path)) diff --git a/app/views/verify/phone/new.html.slim b/app/views/idv/phone/new.html.slim similarity index 93% rename from app/views/verify/phone/new.html.slim rename to app/views/idv/phone/new.html.slim index 14e8af13d44..3d833d81ed5 100644 --- a/app/views/verify/phone/new.html.slim +++ b/app/views/idv/phone/new.html.slim @@ -16,7 +16,7 @@ p.mt-tiny.mb2 = t('idv.messages.phone.intro') p = t('idv.messages.phone.same_as_2fa') -= simple_form_for(@view_model.idv_form, url: verify_phone_path, += simple_form_for(@view_model.idv_form, url: idv_phone_path, html: { autocomplete: 'off', method: :put, role: 'form', class: 'mt2' }) do |f| = f.label :phone, label: t('idv.form.phone'), class: 'bold' span.ml1 diff --git a/app/views/verify/review/new.html.slim b/app/views/idv/review/new.html.slim similarity index 81% rename from app/views/verify/review/new.html.slim rename to app/views/idv/review/new.html.slim index d34c053669e..8eed040222d 100644 --- a/app/views/verify/review/new.html.slim +++ b/app/views/idv/review/new.html.slim @@ -2,7 +2,7 @@ h1.h3 = t('idv.titles.session.review') -= render 'shared/user_verify_password', update_path: verify_review_path += render 'shared/user_verify_password', update_path: idv_review_path .mt4 = accordion('review-verified-info', t('idv.messages.review.intro')) do diff --git a/app/views/verify/sessions/dupe.html.slim b/app/views/idv/sessions/dupe.html.slim similarity index 100% rename from app/views/verify/sessions/dupe.html.slim rename to app/views/idv/sessions/dupe.html.slim diff --git a/app/views/verify/sessions/new.html.slim b/app/views/idv/sessions/new.html.slim similarity index 97% rename from app/views/verify/sessions/new.html.slim rename to app/views/idv/sessions/new.html.slim index b93bb58fc63..e39577aeecc 100644 --- a/app/views/verify/sessions/new.html.slim +++ b/app/views/idv/sessions/new.html.slim @@ -7,7 +7,7 @@ p.mb1 == t('idv.messages.sessions.access_sp', sp_name: decorated_session.sp_name p.mb2 = link_to t('links.access_help'), 'https://login.gov/help/privacy-and-security/how-does-logingov-protect-my-data/' -= simple_form_for(@view_model.idv_form, url: verify_session_path, += simple_form_for(@view_model.idv_form, url: idv_session_path, html: { autocomplete: 'off', method: :put, role: 'form' }) do |f| = f.error_notification fieldset.mb3.ml0.p0.border-none @@ -89,7 +89,7 @@ p.mb2 = link_to t('links.access_help'), .mt3 button type='submit' class='btn btn-primary btn-wide' = t('forms.buttons.continue') -= render 'shared/cancel', link: verify_cancel_path += render 'shared/cancel', link: idv_cancel_path = render @view_model.modal_partial, view_model: @view_model == javascript_pack_tag 'previous-address' diff --git a/app/views/verify/usps/index.html.slim b/app/views/idv/usps/index.html.slim similarity index 75% rename from app/views/verify/usps/index.html.slim rename to app/views/idv/usps/index.html.slim index 302048a8ad2..cb22e532055 100644 --- a/app/views/verify/usps/index.html.slim +++ b/app/views/idv/usps/index.html.slim @@ -10,7 +10,7 @@ strong = t('idv.messages.usps.success') -= button_to @decorated_usps.button, verify_usps_path, method: 'put', += button_to @decorated_usps.button, idv_usps_path, method: 'put', class: 'btn btn-primary btn-wide', form_class: 'inline-block mr2' -= link_to t('idv.messages.usps.bad_address'), verify_phone_path += link_to t('idv.messages.usps.bad_address'), idv_phone_path diff --git a/app/views/shared/_cancel_action_modal.html.slim b/app/views/shared/_cancel_action_modal.html.slim index bf3c32b458e..eaff3766858 100644 --- a/app/views/shared/_cancel_action_modal.html.slim +++ b/app/views/shared/_cancel_action_modal.html.slim @@ -18,7 +18,7 @@ = t("#{app_flow}.buttons.continue") - if idv - = button_to t('idv.buttons.cancel'), verify_session_path, method: :delete, + = button_to t('idv.buttons.cancel'), idv_session_path, method: :delete, class: 'btn col-12 p2 rounded-lg border border-blue blue border-box' - elsif user_signing_up = button_to t('sign_up.buttons.cancel'), destroy_user_path, method: :delete, diff --git a/app/views/users/verify_account/index.html.slim b/app/views/users/verify_account/index.html.slim index dccf1564779..dd5bacec669 100644 --- a/app/views/users/verify_account/index.html.slim +++ b/app/views/users/verify_account/index.html.slim @@ -10,8 +10,8 @@ p.mt-tiny.mb0 = t('forms.verify_profile.instructions') = f.input_field :otp, as: :inline, autofocus: true, type: 'text', maxlength: '10', value: @code = f.button :submit, t('forms.verify_profile.submit') - unless @mail_spammed - = link_to t('idv.messages.usps.resend'), verify_usps_path, + = link_to t('idv.messages.usps.resend'), idv_usps_path, class: 'block mb2' -= link_to t('idv.messages.usps.bad_address'), verify_phone_path += link_to t('idv.messages.usps.bad_address'), idv_phone_path .mt2.pt1.border-top = link_to t('idv.buttons.cancel'), account_path diff --git a/app/views/verify/confirmations/show.html.slim b/app/views/verify/confirmations/show.html.slim deleted file mode 100644 index 353a5f299fe..00000000000 --- a/app/views/verify/confirmations/show.html.slim +++ /dev/null @@ -1,3 +0,0 @@ -- title t('titles.personal_key') - -= render 'shared/personal_key', code: @code, update_path: verify_confirmations_path diff --git a/app/views/verify/phone/_verification_options.html.slim b/app/views/verify/phone/_verification_options.html.slim deleted file mode 100644 index 8e1b6377f56..00000000000 --- a/app/views/verify/phone/_verification_options.html.slim +++ /dev/null @@ -1,3 +0,0 @@ -p - = t('idv.form.no_alternate_phone_html', - link: link_to(t('idv.form.activate_by_mail'), verify_usps_path)) diff --git a/config/routes.rb b/config/routes.rb index 3496fd5cfc3..a6017242695 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -153,35 +153,40 @@ delete '/users' => 'users#destroy', as: :destroy_user if FeatureManagement.enable_identity_verification? - get '/verify' => 'verify#index' - get '/verify/activated' => 'verify#activated' - get '/verify/address' => 'verify/address#index' - post '/verify/address' => 'verify/address#create' - get '/verify/cancel' => 'verify#cancel' - get '/verify/come_back_later' => 'verify/come_back_later#show' - get '/verify/confirmations' => 'verify/confirmations#show' - post '/verify/confirmations' => 'verify/confirmations#update' - get '/verify/fail' => 'verify#fail' - get '/verify/otp_delivery_method' => 'verify/otp_delivery_method#new' - put '/verify/otp_delivery_method' => 'verify/otp_delivery_method#create' - get '/verify/phone' => 'verify/phone#new' - put '/verify/phone' => 'verify/phone#create' - get '/verify/phone/result' => 'verify/phone#show' - get '/verify/review' => 'verify/review#new' - put '/verify/review' => 'verify/review#create' - get '/verify/session' => 'verify/sessions#new' - put '/verify/session' => 'verify/sessions#create' - get '/verify/session/result' => 'verify/sessions#show' - delete '/verify/session' => 'verify/sessions#destroy' - get '/verify/session/dupe' => 'verify/sessions#dupe' - + scope '/verify', as: 'idv' do + get '/' => 'idv#index' + get '/activated' => 'idv#activated' + get '/cancel' => 'idv#cancel' + get '/fail' => 'idv#fail' + end + scope '/verify', module: 'idv', as: 'idv' do + get '/address' => 'address#index' + post '/address' => 'address#create' + get '/come_back_later' => 'come_back_later#show' + get '/confirmations' => 'confirmations#show' + post '/confirmations' => 'confirmations#update' + get '/otp_delivery_method' => 'otp_delivery_method#new' + put '/otp_delivery_method' => 'otp_delivery_method#create' + get '/phone' => 'phone#new' + put '/phone' => 'phone#create' + get '/phone/result' => 'phone#show' + get '/review' => 'review#new' + put '/review' => 'review#create' + get '/session' => 'sessions#new' + put '/session' => 'sessions#create' + get '/session/result' => 'sessions#show' + delete '/session' => 'sessions#destroy' + get '/session/dupe' => 'sessions#dupe' + end end if FeatureManagement.enable_usps_verification? get '/account/verify' => 'users/verify_account#index', as: :verify_account post '/account/verify' => 'users/verify_account#create' - get '/verify/usps' => 'verify/usps#index' - put '/verify/usps' => 'verify/usps#create' + scope '/verify', module: 'idv', as: 'idv' do + get '/usps' => 'usps#index' + put '/usps' => 'usps#create' + end end root to: 'users/sessions#new' diff --git a/spec/controllers/concerns/idv_step_concern_spec.rb b/spec/controllers/concerns/idv_step_concern_spec.rb index 4d76c6609d2..3d997dd2443 100644 --- a/spec/controllers/concerns/idv_step_concern_spec.rb +++ b/spec/controllers/concerns/idv_step_concern_spec.rb @@ -6,14 +6,14 @@ Idv::Session.new(user_session: subject.user_session, current_user: user, issuer: nil) end - module Verify + module Idv class StepController < ApplicationController include IdvStepConcern end end describe '#confirm_idv_attempts_allowed' do - controller Verify::StepController do + controller Idv::StepController do before_action :confirm_idv_attempts_allowed def show @@ -24,7 +24,7 @@ def show before(:each) do stub_sign_in(user) routes.draw do - get 'show' => 'verify/step#show' + get 'show' => 'idv/step#show' end end @@ -38,7 +38,7 @@ def show it 'redirects to hardfail page' do get :show - expect(response).to redirect_to verify_fail_url + expect(response).to redirect_to idv_fail_url end end @@ -52,7 +52,7 @@ def show it 'redirects to hardfail page' do get :show - expect(response).to redirect_to verify_fail_url + expect(response).to redirect_to idv_fail_url end end @@ -75,7 +75,7 @@ def show end describe '#confirm_idv_session_started' do - controller Verify::StepController do + controller Idv::StepController do before_action :confirm_idv_session_started def show @@ -86,7 +86,7 @@ def show before(:each) do stub_sign_in(user) routes.draw do - get 'show' => 'verify/step#show' + get 'show' => 'idv/step#show' end end @@ -98,7 +98,7 @@ def show it 'redirects to idv session url' do get :show - expect(response).to redirect_to(verify_session_url) + expect(response).to redirect_to(idv_session_url) end end @@ -117,7 +117,7 @@ def show end describe '#confirm_idv_needed' do - controller Verify::StepController do + controller Idv::StepController do before_action :confirm_idv_needed def show @@ -128,7 +128,7 @@ def show before(:each) do sign_in(user) routes.draw do - get 'show' => 'verify/step#show' + get 'show' => 'idv/step#show' end end @@ -143,7 +143,7 @@ def show it 'redirects to activated page' do get :show - expect(response).to redirect_to verify_activated_url + expect(response).to redirect_to idv_activated_url end end @@ -158,7 +158,7 @@ def show get :show expect(response.body).to eq 'Hello' - expect(response).to_not redirect_to verify_activated_url + expect(response).to_not redirect_to idv_activated_url expect(response.status).to eq 200 end end diff --git a/spec/controllers/verify/address_controller_spec.rb b/spec/controllers/idv/address_controller_spec.rb similarity index 89% rename from spec/controllers/verify/address_controller_spec.rb rename to spec/controllers/idv/address_controller_spec.rb index e68b99512f8..00e7d1b7cf9 100644 --- a/spec/controllers/verify/address_controller_spec.rb +++ b/spec/controllers/idv/address_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe Verify::AddressController do +describe Idv::AddressController do let(:user) { build(:user) } before do @@ -13,7 +13,7 @@ get :index - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end it 'redirects if usps mechanism selected' do @@ -21,7 +21,7 @@ get :index - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end it 'renders index if no mechanism selected' do diff --git a/spec/controllers/verify/come_back_later_controller_spec.rb b/spec/controllers/idv/come_back_later_controller_spec.rb similarity index 95% rename from spec/controllers/verify/come_back_later_controller_spec.rb rename to spec/controllers/idv/come_back_later_controller_spec.rb index bec8055623c..c689378560d 100644 --- a/spec/controllers/verify/come_back_later_controller_spec.rb +++ b/spec/controllers/idv/come_back_later_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe Verify::ComeBackLaterController do +describe Idv::ComeBackLaterController do let(:user) { build_stubbed(:user, :signed_up) } let(:needs_profile_usps_verification) { true } diff --git a/spec/controllers/verify/confirmations_controller_spec.rb b/spec/controllers/idv/confirmations_controller_spec.rb similarity index 97% rename from spec/controllers/verify/confirmations_controller_spec.rb rename to spec/controllers/idv/confirmations_controller_spec.rb index cc1a4c6f183..7714e01a3cd 100644 --- a/spec/controllers/verify/confirmations_controller_spec.rb +++ b/spec/controllers/idv/confirmations_controller_spec.rb @@ -1,7 +1,7 @@ require 'rails_helper' require 'proofer/vendor/mock' -describe Verify::ConfirmationsController do +describe Idv::ConfirmationsController do include SamlAuthHelper def stub_idv_session @@ -191,7 +191,7 @@ def index it 'redirects to come back later path' do patch :update - expect(response).to redirect_to verify_come_back_later_path + expect(response).to redirect_to idv_come_back_later_path end end end diff --git a/spec/controllers/verify/otp_delivery_method_controller_spec.rb b/spec/controllers/idv/otp_delivery_method_controller_spec.rb similarity index 88% rename from spec/controllers/verify/otp_delivery_method_controller_spec.rb rename to spec/controllers/idv/otp_delivery_method_controller_spec.rb index 1096eb83cd5..234c7d4218e 100644 --- a/spec/controllers/verify/otp_delivery_method_controller_spec.rb +++ b/spec/controllers/idv/otp_delivery_method_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe Verify::OtpDeliveryMethodController do +describe Idv::OtpDeliveryMethodController do let(:user) { build(:user) } before do @@ -19,7 +19,7 @@ it 'redirects to the review controller' do get :new - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end end @@ -30,7 +30,7 @@ it 'redirects to the review controller' do get :new - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end end @@ -41,7 +41,7 @@ it 'redirects to the review controller' do get :new - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end end @@ -69,7 +69,7 @@ it 'redirects to the review controller' do post :create, params: params - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end end @@ -80,7 +80,7 @@ it 'redirects to the review controller' do post :create, params: params - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end end @@ -91,7 +91,7 @@ it 'redirects to the review controller' do post :create, params: params - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end end diff --git a/spec/controllers/verify/phone_controller_spec.rb b/spec/controllers/idv/phone_controller_spec.rb similarity index 95% rename from spec/controllers/verify/phone_controller_spec.rb rename to spec/controllers/idv/phone_controller_spec.rb index 5cb5eb84e5b..cc987659fc8 100644 --- a/spec/controllers/verify/phone_controller_spec.rb +++ b/spec/controllers/idv/phone_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe Verify::PhoneController do +describe Idv::PhoneController do include Features::LocalizationHelper let(:max_attempts) { Idv::Attempter.idv_max_attempts } @@ -34,7 +34,7 @@ subject.idv_session.vendor_phone_confirmation = true get :new - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end end @@ -56,7 +56,7 @@ get :new - expect(response).to redirect_to verify_fail_path + expect(response).to redirect_to idv_fail_path end end @@ -121,7 +121,7 @@ put :create, params: { idv_phone_form: { phone: good_phone, international_code: 'US' } } - expect(response).to redirect_to verify_phone_result_path + expect(response).to redirect_to idv_phone_result_path expected_params = { phone: normalized_phone, @@ -138,7 +138,7 @@ put :create, params: { idv_phone_form: { phone: good_phone, international_code: 'US' } } - expect(response).to redirect_to verify_phone_result_path + expect(response).to redirect_to idv_phone_result_path expected_params = { phone: normalized_phone, @@ -260,7 +260,7 @@ it 'allows and does not affect attempt counter' do get :show - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path expect(user.idv_attempts).to eq(max_attempts - 1) expect(user.idv_attempted_at).to eq two_days_ago end diff --git a/spec/controllers/verify/review_controller_spec.rb b/spec/controllers/idv/review_controller_spec.rb similarity index 95% rename from spec/controllers/verify/review_controller_spec.rb rename to spec/controllers/idv/review_controller_spec.rb index ba61ffe6210..8da62ce35ec 100644 --- a/spec/controllers/verify/review_controller_spec.rb +++ b/spec/controllers/idv/review_controller_spec.rb @@ -2,7 +2,7 @@ require 'proofer/vendor/mock' -describe Verify::ReviewController do +describe Idv::ReviewController do let(:user) do create( :user, @@ -67,7 +67,7 @@ def show before(:each) do stub_sign_in(user) routes.draw do - get 'show' => 'verify/review#show' + get 'show' => 'idv/review#show' end idv_session.params = user_attrs allow(subject).to receive(:idv_session).and_return(idv_session) @@ -82,7 +82,7 @@ def show it 'redirects to address step' do get :show - expect(response).to redirect_to verify_address_path + expect(response).to redirect_to idv_address_path end end end @@ -100,7 +100,7 @@ def show stub_sign_in(user) allow(subject).to receive(:idv_session).and_return(idv_session) routes.draw do - get 'show' => 'verify/review#show' + get 'show' => 'idv/review#show' end end @@ -157,7 +157,7 @@ def show before(:each) do stub_sign_in(user) routes.draw do - post 'show' => 'verify/review#show' + post 'show' => 'idv/review#show' end allow(subject).to receive(:confirm_idv_steps_complete).and_return(true) allow(subject).to receive(:confirm_idv_attempts_allowed).and_return(true) @@ -170,7 +170,7 @@ def show post :show, params: { user: { password: '' } } expect(flash[:error]).to eq t('idv.errors.incorrect_password') - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end end @@ -179,7 +179,7 @@ def show post :show, params: { user: { password: 'wrong' } } expect(flash[:error]).to eq t('idv.errors.incorrect_password') - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end end @@ -282,7 +282,7 @@ def show it 'redirects to original path' do put :create, params: { user: { password: 'wrong' } } - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end end @@ -298,7 +298,7 @@ def show put :create, params: { user: { password: ControllerHelper::VALID_PASSWORD } } expect(@analytics).to have_received(:track_event).with(Analytics::IDV_REVIEW_COMPLETE) - expect(response).to redirect_to verify_confirmations_path + expect(response).to redirect_to idv_confirmations_path end it 'creates Profile with applicant and normalized_applicant attributes' do diff --git a/spec/controllers/verify/sessions_controller_spec.rb b/spec/controllers/idv/sessions_controller_spec.rb similarity index 95% rename from spec/controllers/verify/sessions_controller_spec.rb rename to spec/controllers/idv/sessions_controller_spec.rb index 7f50ba999d2..9d711636f84 100644 --- a/spec/controllers/verify/sessions_controller_spec.rb +++ b/spec/controllers/idv/sessions_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe Verify::SessionsController do +describe Idv::SessionsController do let(:max_attempts) { Idv::Attempter.idv_max_attempts } let(:user) { create(:user, :signed_up, email: 'old_email@example.com') } let(:user_attrs) do @@ -64,7 +64,7 @@ get :new - expect(response).to redirect_to verify_address_path + expect(response).to redirect_to idv_address_path end context 'max attempts exceeded' do @@ -77,12 +77,12 @@ get :new result = { - request_path: verify_session_path, + request_path: idv_session_path, } expect(@analytics).to have_received(:track_event). with(Analytics::IDV_MAX_ATTEMPTS_EXCEEDED, result) - expect(response).to redirect_to verify_fail_url + expect(response).to redirect_to idv_fail_url end end end @@ -115,7 +115,7 @@ post :create, params: { profile: user_attrs.merge(ssn: '666-66-1234') } - expect(response).to redirect_to(verify_session_dupe_path) + expect(response).to redirect_to(idv_session_dupe_path) expect(flash[:error]).to match t('idv.errors.duplicate_ssn') end end @@ -124,7 +124,7 @@ it 'renders the form' do post :create, params: { profile: user_attrs.merge(ssn: '') } - expect(response).to_not redirect_to(verify_session_dupe_path) + expect(response).to_not redirect_to(idv_session_dupe_path) expect(response).to render_template(:new) end end @@ -358,12 +358,12 @@ get :show result = { - request_path: verify_session_result_path, + request_path: idv_session_result_path, } expect(@analytics).to have_received(:track_event). with(Analytics::IDV_MAX_ATTEMPTS_EXCEEDED, result) - expect(response).to redirect_to verify_fail_url + expect(response).to redirect_to idv_fail_url end end @@ -380,7 +380,7 @@ it 'allows and resets attempt counter' do get :show - expect(response).to redirect_to verify_address_path + expect(response).to redirect_to idv_address_path expect(user.idv_attempts).to eq 1 end end diff --git a/spec/controllers/verify/usps_controller_spec.rb b/spec/controllers/idv/usps_controller_spec.rb similarity index 91% rename from spec/controllers/verify/usps_controller_spec.rb rename to spec/controllers/idv/usps_controller_spec.rb index 35a14b55dbf..e703016161d 100644 --- a/spec/controllers/verify/usps_controller_spec.rb +++ b/spec/controllers/idv/usps_controller_spec.rb @@ -2,7 +2,7 @@ require 'proofer/vendor/mock' -describe Verify::UspsController do +describe Idv::UspsController do let(:user) { create(:user) } describe 'before_actions' do @@ -33,7 +33,7 @@ and_return(true) get :index - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path end it 'allows a user to request another letter' do @@ -55,7 +55,7 @@ put :create - expect(response).to redirect_to verify_review_path + expect(response).to redirect_to idv_review_path expect(subject.idv_session.address_verification_mechanism).to eq :usps end end @@ -87,7 +87,7 @@ put :create - expect(response).to redirect_to verify_come_back_later_path + expect(response).to redirect_to idv_come_back_later_path end end end diff --git a/spec/controllers/verify_controller_spec.rb b/spec/controllers/idv_controller_spec.rb similarity index 91% rename from spec/controllers/verify_controller_spec.rb rename to spec/controllers/idv_controller_spec.rb index dad1b899d63..f75bdb6f602 100644 --- a/spec/controllers/verify_controller_spec.rb +++ b/spec/controllers/idv_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe VerifyController do +describe IdvController do describe '#index' do it 'tracks page visit' do stub_sign_in @@ -32,7 +32,7 @@ get :index - expect(response).to redirect_to verify_fail_url + expect(response).to redirect_to idv_fail_url end it 'redirects to account recovery if user has a password reset profile' do @@ -79,7 +79,7 @@ get :activated - expect(response).to redirect_to verify_url + expect(response).to redirect_to idv_url end end end @@ -93,7 +93,7 @@ get :cancel - expect(response).to redirect_to verify_activated_url + expect(response).to redirect_to idv_activated_url end end @@ -117,7 +117,7 @@ get :fail - expect(response).to redirect_to verify_activated_url + expect(response).to redirect_to idv_activated_url end end @@ -127,7 +127,7 @@ get :fail - expect(response).to redirect_to verify_url + expect(response).to redirect_to idv_url end end diff --git a/spec/controllers/openid_connect/authorization_controller_spec.rb b/spec/controllers/openid_connect/authorization_controller_spec.rb index 59bb08f235c..341e826e194 100644 --- a/spec/controllers/openid_connect/authorization_controller_spec.rb +++ b/spec/controllers/openid_connect/authorization_controller_spec.rb @@ -70,7 +70,7 @@ context 'account is not already verified' do it 'redirects to have the user verify their account' do action - expect(controller).to redirect_to(verify_url) + expect(controller).to redirect_to(idv_url) end end end diff --git a/spec/controllers/reactivate_account_controller_spec.rb b/spec/controllers/reactivate_account_controller_spec.rb index b094e36c7ff..d2489c96cd6 100644 --- a/spec/controllers/reactivate_account_controller_spec.rb +++ b/spec/controllers/reactivate_account_controller_spec.rb @@ -38,11 +38,11 @@ describe '#update' do let(:profiles) { [create(:profile, deactivation_reason: :password_reset)] } - it 'redirects user to verify_url' do + it 'redirects user to idv_url' do put :update expect(subject.user_session[:acknowledge_personal_key]).to be_nil - expect(response).to redirect_to verify_url + expect(response).to redirect_to idv_url end end end diff --git a/spec/controllers/saml_idp_controller_spec.rb b/spec/controllers/saml_idp_controller_spec.rb index fd6b2f6da55..f202715267e 100644 --- a/spec/controllers/saml_idp_controller_spec.rb +++ b/spec/controllers/saml_idp_controller_spec.rb @@ -223,7 +223,7 @@ user = create(:user, :signed_up) generate_saml_response(user, loa3_saml_settings) - expect(response).to redirect_to verify_path + expect(response).to redirect_to idv_path end end diff --git a/spec/controllers/two_factor_authentication/otp_verification_controller_spec.rb b/spec/controllers/two_factor_authentication/otp_verification_controller_spec.rb index 0080eab374f..626233dae02 100644 --- a/spec/controllers/two_factor_authentication/otp_verification_controller_spec.rb +++ b/spec/controllers/two_factor_authentication/otp_verification_controller_spec.rb @@ -493,8 +493,8 @@ expect(subject.current_user.reload.phone_confirmed_at).to eq @previous_phone_confirmed_at end - it 'redirects to verify_review_path' do - expect(response).to redirect_to(verify_review_path) + it 'redirects to idv_review_path' do + expect(response).to redirect_to(idv_review_path) end it 'does not call UserMailer' do diff --git a/spec/decorators/service_provider_session_decorator_spec.rb b/spec/decorators/service_provider_session_decorator_spec.rb index 5c6cd452f2a..083c52d1f81 100644 --- a/spec/decorators/service_provider_session_decorator_spec.rb +++ b/spec/decorators/service_provider_session_decorator_spec.rb @@ -51,7 +51,7 @@ describe '#idv_hardfail4_partial' do it 'returns the correct partial' do - expect(subject.idv_hardfail4_partial).to eq 'verify/hardfail4' + expect(subject.idv_hardfail4_partial).to eq 'idv/hardfail4' end end diff --git a/spec/decorators/session_decorator_spec.rb b/spec/decorators/session_decorator_spec.rb index a684cec68ad..c032abe3c71 100644 --- a/spec/decorators/session_decorator_spec.rb +++ b/spec/decorators/session_decorator_spec.rb @@ -45,7 +45,7 @@ describe '#idv_hardfail4_partial' do it 'returns the correct partial' do - expect(subject.idv_hardfail4_partial).to eq 'verify/no_sp_hardfail' + expect(subject.idv_hardfail4_partial).to eq 'idv/no_sp_hardfail' end end diff --git a/spec/features/accessibility/idv_pages_spec.rb b/spec/features/accessibility/idv_pages_spec.rb index d789fd1dadc..5f95dc3eede 100644 --- a/spec/features/accessibility/idv_pages_spec.rb +++ b/spec/features/accessibility/idv_pages_spec.rb @@ -8,7 +8,7 @@ scenario 'home page' do sign_in_and_2fa_user - visit verify_path + visit idv_path expect(page).to be_accessible end @@ -16,47 +16,47 @@ scenario 'basic info' do sign_in_and_2fa_user - visit verify_session_path + visit idv_session_path - expect(current_path).to eq verify_session_path + expect(current_path).to eq idv_session_path expect(page).to be_accessible end scenario 'cancel idv' do sign_in_and_2fa_user - visit verify_cancel_path + visit idv_cancel_path - expect(current_path).to eq verify_cancel_path + expect(current_path).to eq idv_cancel_path expect(page).to be_accessible end scenario 'phone info' do sign_in_and_2fa_user - visit verify_session_path + visit idv_session_path fill_out_idv_form_ok click_button t('forms.buttons.continue') click_idv_address_choose_phone - expect(current_path).to eq verify_phone_path + expect(current_path).to eq idv_phone_path expect(page).to be_accessible end scenario 'review page' do user = sign_in_and_2fa_user - visit verify_session_path + visit idv_session_path fill_out_idv_form_ok click_button t('forms.buttons.continue') click_idv_address_choose_phone click_button t('forms.buttons.continue') - expect(current_path).to eq verify_review_path + expect(current_path).to eq idv_review_path expect(page).to be_accessible end scenario 'personal key / confirmation page' do user = sign_in_and_2fa_user - visit verify_session_path + visit idv_session_path fill_out_idv_form_ok click_idv_continue click_idv_address_choose_phone @@ -64,7 +64,7 @@ fill_in :user_password, with: Features::SessionHelper::VALID_PASSWORD click_continue - expect(current_path).to eq verify_confirmations_path + expect(current_path).to eq idv_confirmations_path expect(page).to be_accessible end end diff --git a/spec/features/idv/previous_address_spec.rb b/spec/features/idv/previous_address_spec.rb index eb3f75f6ceb..76a1877634f 100644 --- a/spec/features/idv/previous_address_spec.rb +++ b/spec/features/idv/previous_address_spec.rb @@ -8,7 +8,7 @@ let(:previous_address) { '456 Other Ave' } def expect_to_stay_on_verify_session_page - expect(current_path).to eq verify_session_result_path + expect(current_path).to eq idv_session_result_path expect(page).to have_selector("input[value='#{bad_zipcode}']") end @@ -29,7 +29,7 @@ def expect_current_address_in_profile(user) fill_out_phone_form_ok(user.phone) click_idv_continue - expect(current_path).to eq verify_review_path + expect(current_path).to eq idv_review_path expect(page).to have_content(current_address) expect(page).to_not have_content(previous_address) end diff --git a/spec/features/idv/state_id_data_spec.rb b/spec/features/idv/state_id_data_spec.rb index b501dc0fb32..983132a70a5 100644 --- a/spec/features/idv/state_id_data_spec.rb +++ b/spec/features/idv/state_id_data_spec.rb @@ -14,7 +14,7 @@ click_idv_continue expect(page).to have_content t('idv.modal.sessions.warning') - expect(current_path).to eq(verify_session_result_path) + expect(current_path).to eq(idv_session_result_path) end it 'renders an error for blank state id number and does not submit a job', :email do @@ -25,7 +25,7 @@ click_idv_continue expect(page).to have_content t('errors.messages.blank') - expect(current_path).to eq(verify_session_path) + expect(current_path).to eq(idv_session_path) end it 'renders an error for unsupported jurisdiction and does not submit a job', :email do @@ -36,7 +36,7 @@ click_idv_continue expect(page).to have_content t('idv.errors.unsupported_jurisdiction') - expect(current_path).to eq(verify_session_path) + expect(current_path).to eq(idv_session_path) end it 'allows selection of different state id types', :email do @@ -49,6 +49,6 @@ ) expect(page).to have_content(success_message) - expect(current_path).to eq(verify_address_path) + expect(current_path).to eq(idv_address_path) end end diff --git a/spec/features/idv/steps/address_step_spec.rb b/spec/features/idv/steps/address_step_spec.rb index 6bef86fc472..023f2d851be 100644 --- a/spec/features/idv/steps/address_step_spec.rb +++ b/spec/features/idv/steps/address_step_spec.rb @@ -10,7 +10,7 @@ click_idv_address_choose_phone expect(page).to have_content(t('idv.titles.session.phone')) - expect(page).to have_current_path(verify_phone_path) + expect(page).to have_current_path(idv_phone_path) end end @@ -21,7 +21,7 @@ click_idv_address_choose_usps expect(page).to have_content(t('idv.titles.mail.verify')) - expect(page).to have_current_path(verify_usps_path) + expect(page).to have_current_path(idv_usps_path) end end diff --git a/spec/features/idv/steps/confirmation_step_spec.rb b/spec/features/idv/steps/confirmation_step_spec.rb index 25795ede4ab..0d24b7d25f8 100644 --- a/spec/features/idv/steps/confirmation_step_spec.rb +++ b/spec/features/idv/steps/confirmation_step_spec.rb @@ -12,7 +12,7 @@ personal_key = 'a1b2c3d4e5f6g7h8' @user = sign_in_and_2fa_user - visit verify_session_path + visit idv_session_path allow(RandomPhrase).to receive(:to_s).and_return(personal_key) complete_idv_steps_before_confirmation_step(@user) diff --git a/spec/features/idv/steps/phone_otp_verification_step_spec.rb b/spec/features/idv/steps/phone_otp_verification_step_spec.rb index 0cc8c49c19e..dcd17d921c0 100644 --- a/spec/features/idv/steps/phone_otp_verification_step_spec.rb +++ b/spec/features/idv/steps/phone_otp_verification_step_spec.rb @@ -10,7 +10,7 @@ complete_idv_steps_before_phone_otp_verification_step(user) # Attempt to bypass the step - visit verify_review_path + visit idv_review_path expect(current_path).to eq(login_two_factor_path(otp_delivery_preference: :sms)) # Enter an incorrect otp @@ -24,7 +24,7 @@ enter_correct_otp_code_for_user(user) expect(page).to have_content(t('idv.titles.session.review')) - expect(page).to have_current_path(verify_review_path) + expect(page).to have_current_path(idv_review_path) end it_behaves_like 'cancel at idv step', :phone_otp_verification diff --git a/spec/features/idv/steps/phone_step_spec.rb b/spec/features/idv/steps/phone_step_spec.rb index be48d9f2acc..5924e7139d8 100644 --- a/spec/features/idv/steps/phone_step_spec.rb +++ b/spec/features/idv/steps/phone_step_spec.rb @@ -11,7 +11,7 @@ click_idv_continue expect(page).to have_content(t('idv.titles.otp_delivery_method')) - expect(page).to have_current_path(verify_otp_delivery_method_path) + expect(page).to have_current_path(idv_otp_delivery_method_path) end it 'redirects to the confirmation step when the phone matches the 2fa phone number' do @@ -22,7 +22,7 @@ click_idv_continue expect(page).to have_content(t('idv.titles.session.review')) - expect(page).to have_current_path(verify_review_path) + expect(page).to have_current_path(idv_review_path) end end @@ -42,7 +42,7 @@ click_link t('forms.two_factor.try_again') expect(page).to have_content(t('idv.titles.session.phone')) - expect(page).to have_current_path(verify_phone_path) + expect(page).to have_current_path(idv_phone_path) fill_out_phone_form_ok(second_phone_number) click_idv_continue @@ -61,17 +61,17 @@ choose_idv_otp_delivery_method_sms enter_correct_otp_code_for_user(user) - visit verify_phone_path + visit idv_phone_path expect(page).to have_content(t('idv.titles.session.review')) - expect(page).to have_current_path(verify_review_path) + expect(page).to have_current_path(idv_review_path) fill_in 'Password', with: user_password click_continue # Currently this byasses the confirmation step since that is only # accessible once - visit verify_phone_path - expect(page).to_not have_current_path(verify_phone_path) + visit idv_phone_path + expect(page).to_not have_current_path(idv_phone_path) end end @@ -80,9 +80,9 @@ complete_idv_steps_before_phone_step # Try to skip ahead to review step - visit verify_review_path + visit idv_review_path # Get redirected to the address step (which leads to phone step) - expect(page).to have_current_path(verify_address_path) + expect(page).to have_current_path(idv_address_path) end xcontext 'cancelling IdV' do diff --git a/spec/features/idv/steps/profile_step_spec.rb b/spec/features/idv/steps/profile_step_spec.rb index d4cd5e79055..255de354495 100644 --- a/spec/features/idv/steps/profile_step_spec.rb +++ b/spec/features/idv/steps/profile_step_spec.rb @@ -9,10 +9,10 @@ complete_idv_steps_before_profile_step # Try to skip ahead to address step - visit verify_address_path + visit idv_address_path # Get redirected to the profile step - expect(page).to have_current_path(verify_session_path) + expect(page).to have_current_path(idv_session_path) # Complete the idv form fill_out_idv_form_ok @@ -20,14 +20,14 @@ # Expect to be on the address step expect(page).to have_content(t('idv.titles.select_verification')) - expect(page).to have_current_path(verify_address_path) + expect(page).to have_current_path(idv_address_path) # Attempt to go back to profile step - visit verify_session_path + visit idv_session_path # Get redirected to the address step expect(page).to have_content(t('idv.titles.select_verification')) - expect(page).to have_current_path(verify_address_path) + expect(page).to have_current_path(idv_address_path) end end diff --git a/spec/features/idv/steps/review_step_spec.rb b/spec/features/idv/steps/review_step_spec.rb index 4746916cebf..595c6f1232c 100644 --- a/spec/features/idv/steps/review_step_spec.rb +++ b/spec/features/idv/steps/review_step_spec.rb @@ -19,13 +19,13 @@ click_idv_continue expect(page).to have_content(t('idv.errors.incorrect_password')) - expect(page).to have_current_path(verify_review_path) + expect(page).to have_current_path(idv_review_path) fill_in 'Password', with: user_password click_idv_continue expect(page).to have_content(t('headings.personal_key')) - expect(page).to have_current_path(verify_confirmations_path) + expect(page).to have_current_path(idv_confirmations_path) end context 'choosing to confirm address with phone' do diff --git a/spec/features/idv/steps/usps_step_spec.rb b/spec/features/idv/steps/usps_step_spec.rb index f062ff96313..b8cfe0ffdbf 100644 --- a/spec/features/idv/steps/usps_step_spec.rb +++ b/spec/features/idv/steps/usps_step_spec.rb @@ -9,7 +9,7 @@ click_on t('idv.buttons.mail.send') expect(page).to have_content(t('idv.titles.session.review')) - expect(page).to have_current_path(verify_review_path) + expect(page).to have_current_path(idv_review_path) end it 'redirects to the phone step when the user says they cannot receive mail' do @@ -19,7 +19,7 @@ click_on t('idv.messages.usps.bad_address') expect(page).to have_content(t('idv.titles.session.phone')) - expect(page).to have_current_path(verify_phone_path) + expect(page).to have_current_path(idv_phone_path) end context 'the user has sent a letter but not verified an OTP' do @@ -32,7 +32,7 @@ to change { UspsConfirmation.count }.from(1).to(2) expect_user_to_be_unverified(user) expect(page).to have_content(t('idv.titles.come_back_later')) - expect(page).to have_current_path(verify_come_back_later_path) + expect(page).to have_current_path(idv_come_back_later_path) end def complete_idv_and_return_to_usps_step diff --git a/spec/features/idv/steps/verify_step_spec.rb b/spec/features/idv/steps/verify_step_spec.rb index a429eaaccc7..4d9c67ae17e 100644 --- a/spec/features/idv/steps/verify_step_spec.rb +++ b/spec/features/idv/steps/verify_step_spec.rb @@ -8,12 +8,12 @@ complete_idv_steps_before_verify_step expect(page).to have_content(t('idv.titles.expectations')) - expect(page).to have_current_path(verify_path) + expect(page).to have_current_path(idv_path) click_idv_begin expect(page).to have_content(t('idv.titles.sessions')) - expect(page).to have_current_path(verify_session_path) + expect(page).to have_current_path(idv_session_path) end context 'cancelling idv' do diff --git a/spec/features/saml/loa3_sso_spec.rb b/spec/features/saml/loa3_sso_spec.rb index 036c88be9bc..b11d7693360 100644 --- a/spec/features/saml/loa3_sso_spec.rb +++ b/spec/features/saml/loa3_sso_spec.rb @@ -69,7 +69,7 @@ def sign_out_user sign_in_with_warden(user) loa3_sp_session - visit verify_path + visit idv_path click_on t('links.cancel') click_on t('idv.buttons.cancel') @@ -80,7 +80,7 @@ def sign_out_user sign_in_and_2fa_user loa3_sp_session - visit verify_path + visit idv_path click_on t('links.cancel') click_on t('idv.buttons.cancel') @@ -94,7 +94,7 @@ def sign_out_user sign_in_with_warden(user) loa3_sp_session - visit verify_path + visit idv_path click_idv_cancel expect(current_path).to eq(manage_personal_key_path) @@ -104,7 +104,7 @@ def sign_out_user sign_in_and_2fa_user loa3_sp_session - visit verify_path + visit idv_path click_idv_cancel expect(current_url).to eq(account_url) @@ -141,12 +141,12 @@ def sign_out_user click_link(t('idv.messages.usps.resend')) expect(user.events.account_verified.size).to be(0) - expect(current_path).to eq(verify_usps_path) + expect(current_path).to eq(idv_usps_path) click_button(t('idv.buttons.mail.resend')) expect(user.events.usps_mail_sent.size).to eq 2 - expect(current_path).to eq(verify_come_back_later_path) + expect(current_path).to eq(idv_come_back_later_path) end it 'after signing out' do @@ -162,11 +162,11 @@ def sign_out_user click_link(t('idv.messages.usps.resend')) expect(user.events.account_verified.size).to be(0) - expect(current_path).to eq(verify_usps_path) + expect(current_path).to eq(idv_usps_path) click_button(t('idv.buttons.mail.resend')) - expect(current_path).to eq(verify_come_back_later_path) + expect(current_path).to eq(idv_come_back_later_path) end end end @@ -187,19 +187,19 @@ def sign_out_user fill_out_idv_form_ok click_idv_continue - expect(current_path).to eq verify_address_path + expect(current_path).to eq idv_address_path end end end context 'visiting sign_up_completed path before proofing' do - it 'redirects to verify_path' do + it 'redirects to idv_path' do sign_in_and_2fa_user visit loa3_authnrequest visit sign_up_completed_path - expect(current_path).to eq verify_path + expect(current_path).to eq idv_path end end end diff --git a/spec/features/two_factor_authentication/remember_device_spec.rb b/spec/features/two_factor_authentication/remember_device_spec.rb index 40db5c8feba..88f6f3b04de 100644 --- a/spec/features/two_factor_authentication/remember_device_spec.rb +++ b/spec/features/two_factor_authentication/remember_device_spec.rb @@ -76,7 +76,7 @@ def remember_device_and_sign_out_user sign_in_user(user) check :remember_device click_submit_default - visit verify_session_path + visit idv_session_path fill_out_idv_form_ok click_idv_continue click_idv_address_choose_phone diff --git a/spec/features/users/password_recovery_via_recovery_code_spec.rb b/spec/features/users/password_recovery_via_recovery_code_spec.rb index 284b7855f09..a0e2784dd46 100644 --- a/spec/features/users/password_recovery_via_recovery_code_spec.rb +++ b/spec/features/users/password_recovery_via_recovery_code_spec.rb @@ -88,7 +88,7 @@ click_on t('links.account.reactivate.with_key') click_on t('links.reverify') - expect(current_path).to eq(verify_path) + expect(current_path).to eq(idv_path) end scenario 'resets password, view modal and close it', email: true, js: true do diff --git a/spec/presenters/verify/otp_delivery_method_presenter_spec.rb b/spec/presenters/idv/otp_delivery_method_presenter_spec.rb similarity index 89% rename from spec/presenters/verify/otp_delivery_method_presenter_spec.rb rename to spec/presenters/idv/otp_delivery_method_presenter_spec.rb index f15d2775e23..597e93f87aa 100644 --- a/spec/presenters/verify/otp_delivery_method_presenter_spec.rb +++ b/spec/presenters/idv/otp_delivery_method_presenter_spec.rb @@ -1,11 +1,11 @@ require 'rails_helper' -describe Verify::OtpDeliveryMethodPresenter do +describe Idv::OtpDeliveryMethodPresenter do let(:phone) { '555-555-0000' } let(:formatted_phone) { '+1 (555) 555-0000' } let(:phone_number_capabilities) { PhoneNumberCapabilities.new(formatted_phone) } - subject { Verify::OtpDeliveryMethodPresenter.new(phone) } + subject { Idv::OtpDeliveryMethodPresenter.new(phone) } before do allow(PhoneNumberCapabilities).to receive(:new). diff --git a/spec/presenters/two_factor_auth_code/phone_delivery_presenter_spec.rb b/spec/presenters/two_factor_auth_code/phone_delivery_presenter_spec.rb index 254817ef912..566563390e2 100644 --- a/spec/presenters/two_factor_auth_code/phone_delivery_presenter_spec.rb +++ b/spec/presenters/two_factor_auth_code/phone_delivery_presenter_spec.rb @@ -48,7 +48,7 @@ it 'returns the verification cancel path during identity verification' do data[:confirmation_for_idv] = true - expect(presenter.cancel_link).to eq verify_cancel_path + expect(presenter.cancel_link).to eq idv_cancel_path end end diff --git a/spec/support/features/idv_step_helper.rb b/spec/support/features/idv_step_helper.rb index cf7fa5c557a..f54ace25713 100644 --- a/spec/support/features/idv_step_helper.rb +++ b/spec/support/features/idv_step_helper.rb @@ -18,7 +18,7 @@ def start_idv_from_sp(sp = :oidc) def complete_idv_steps_before_verify_step(user = user_with_2fa) sign_in_and_2fa_user(user) - visit verify_path unless current_path == verify_path + visit idv_path unless current_path == idv_path end def complete_idv_steps_before_profile_step(user = user_with_2fa) diff --git a/spec/support/idv_examples/cancel_at_idv_step.rb b/spec/support/idv_examples/cancel_at_idv_step.rb index 30e9fe992a8..f1b9d344bee 100644 --- a/spec/support/idv_examples/cancel_at_idv_step.rb +++ b/spec/support/idv_examples/cancel_at_idv_step.rb @@ -17,11 +17,11 @@ expect(page).to have_content(t('idv.titles.cancel')) expect(page).to have_content(t('idv.messages.cancel', app: 'login.gov')) - expect(current_path).to eq(verify_cancel_path) + expect(current_path).to eq(idv_cancel_path) click_link t('forms.buttons.back') - expect(current_url).to eq(verify_url) + expect(current_url).to eq(idv_url) end end @@ -50,11 +50,11 @@ expect(page).to have_content(t('idv.titles.cancel')) expect(page).to have_content(t('idv.messages.cancel', app: 'login.gov')) - expect(current_path).to eq(verify_cancel_path) + expect(current_path).to eq(idv_cancel_path) click_link t('forms.buttons.back') - expect(current_path).to eq(verify_path) + expect(current_path).to eq(idv_path) end end end diff --git a/spec/support/idv_examples/confirmation_step.rb b/spec/support/idv_examples/confirmation_step.rb index 846ad4e3cc0..6ec2ee402e5 100644 --- a/spec/support/idv_examples/confirmation_step.rb +++ b/spec/support/idv_examples/confirmation_step.rb @@ -8,7 +8,7 @@ it 'redirects to the come back later url then to the sp or account' do click_acknowledge_personal_key - expect(page).to have_current_path(verify_come_back_later_path) + expect(page).to have_current_path(idv_come_back_later_path) click_on t('forms.buttons.continue') # SAML test SP does not have a return URL, so it does not have a link diff --git a/spec/support/idv_examples/fail_to_verify.rb b/spec/support/idv_examples/fail_to_verify.rb index f15c4527529..24ab9081c6e 100644 --- a/spec/support/idv_examples/fail_to_verify.rb +++ b/spec/support/idv_examples/fail_to_verify.rb @@ -15,25 +15,25 @@ context 'without js' do it 'renders a flash message and lets the user try again' do expect_page_to_have_warning_message - expect(page).to have_current_path(verify_session_result_path) if step == :profile - expect(page).to have_current_path(verify_phone_result_path) if step == :phone + expect(page).to have_current_path(idv_session_result_path) if step == :profile + expect(page).to have_current_path(idv_phone_result_path) if step == :phone fill_out_idv_form_ok if step == :profile fill_out_phone_form_ok if step == :phone click_idv_continue expect(page).to have_content(t('idv.titles.select_verification')) if step == :profile - expect(page).to have_current_path(verify_address_path) if step == :profile + expect(page).to have_current_path(idv_address_path) if step == :profile expect(page).to have_content(t('idv.titles.otp_delivery_method')) if step == :phone - expect(page).to have_current_path(verify_otp_delivery_method_path) if step == :phone + expect(page).to have_current_path(idv_otp_delivery_method_path) if step == :phone end end context 'with js', :js do it 'renders a modal and lets the user try again' do expect_page_to_have_warning_modal - expect(page).to have_current_path(verify_session_result_path) if step == :profile - expect(page).to have_current_path(verify_phone_result_path) if step == :phone + expect(page).to have_current_path(idv_session_result_path) if step == :profile + expect(page).to have_current_path(idv_phone_result_path) if step == :phone dismiss_warning_modal fill_out_idv_form_ok if step == :profile @@ -41,9 +41,9 @@ click_idv_continue expect(page).to have_content(t('idv.titles.select_verification')) if step == :profile - expect(page).to have_current_path(verify_address_path) if step == :profile + expect(page).to have_current_path(idv_address_path) if step == :profile expect(page).to have_content(t('idv.titles.otp_delivery_method')) if step == :phone - expect(page).to have_current_path(verify_otp_delivery_method_path) if step == :phone + expect(page).to have_current_path(idv_otp_delivery_method_path) if step == :phone end end diff --git a/spec/support/idv_examples/failed_idv_job.rb b/spec/support/idv_examples/failed_idv_job.rb index f7d8a02d6c3..8355165469b 100644 --- a/spec/support/idv_examples/failed_idv_job.rb +++ b/spec/support/idv_examples/failed_idv_job.rb @@ -24,8 +24,8 @@ it 'shows a warning' do expect(page).to have_content t("idv.modal.#{step_locale_key}.heading") expect(page).to have_content t("idv.modal.#{step_locale_key}.jobfail") - expect(page).to have_current_path(verify_session_result_path) if step == :profile - expect(page).to have_current_path(verify_phone_result_path) if step == :phone + expect(page).to have_current_path(idv_session_result_path) if step == :profile + expect(page).to have_current_path(idv_phone_result_path) if step == :phone end end @@ -36,8 +36,8 @@ '.modal-warning', text: strip_tags(t("idv.modal.#{step_locale_key}.jobfail")) ) - expect(page).to have_current_path(verify_session_result_path) if step == :profile - expect(page).to have_current_path(verify_phone_result_path) if step == :phone + expect(page).to have_current_path(idv_session_result_path) if step == :profile + expect(page).to have_current_path(idv_phone_result_path) if step == :phone end end end @@ -63,8 +63,8 @@ it 'shows a warning' do expect(page).to have_content t("idv.modal.#{step_locale_key}.heading") expect(page).to have_content t("idv.modal.#{step_locale_key}.timeout") - expect(page).to have_current_path(verify_session_result_path) if step == :profile - expect(page).to have_current_path(verify_phone_result_path) if step == :phone + expect(page).to have_current_path(idv_session_result_path) if step == :profile + expect(page).to have_current_path(idv_phone_result_path) if step == :phone end end @@ -75,8 +75,8 @@ '.modal-warning', text: strip_tags(t("idv.modal.#{step_locale_key}.timeout")) ) - expect(page).to have_current_path(verify_session_result_path) if step == :profile - expect(page).to have_current_path(verify_phone_result_path) if step == :phone + expect(page).to have_current_path(idv_session_result_path) if step == :profile + expect(page).to have_current_path(idv_phone_result_path) if step == :phone end end end diff --git a/spec/support/idv_examples/max_attempts.rb b/spec/support/idv_examples/max_attempts.rb index 92995bbab8d..a99f367ba91 100644 --- a/spec/support/idv_examples/max_attempts.rb +++ b/spec/support/idv_examples/max_attempts.rb @@ -17,7 +17,7 @@ scenario 'more than 3 attempts in 24 hours prevents further attempts' do # Blocked if visiting verify directly - visit verify_url + visit idv_url advance_to_phone_step if step == :phone expect_user_to_be_unable_to_perform_idv(sp) @@ -44,7 +44,7 @@ sign_in_live_with_2fa(user) expect(page).to_not have_content(t("idv.modal.#{step_locale_key}.heading")) - expect(current_url).to eq(verify_url) + expect(current_url).to eq(idv_url) click_idv_begin complete_idv_profile_ok(user) @@ -97,7 +97,7 @@ def expect_user_to_be_unable_to_perform_idv(sp) strip_tags(t('idv.messages.help_center_html')) ) end - expect(current_url).to eq(verify_fail_url) + expect(current_url).to eq(idv_fail_url) end def advance_to_phone_step diff --git a/spec/support/idv_examples/sp_handoff.rb b/spec/support/idv_examples/sp_handoff.rb index de1dca459ce..9b77e5f1474 100644 --- a/spec/support/idv_examples/sp_handoff.rb +++ b/spec/support/idv_examples/sp_handoff.rb @@ -15,7 +15,7 @@ visit_idp_from_sp_with_loa3(sp) register_user(email) - expect(current_path).to eq verify_path + expect(current_path).to eq idv_path click_idv_begin complete_idv_profile_ok(user) @@ -44,7 +44,7 @@ sign_in_user(user) click_submit_default - expect(current_path).to eq verify_path + expect(current_path).to eq idv_path click_idv_begin complete_idv_profile_ok(user) @@ -69,7 +69,7 @@ before do sign_in_and_2fa_user(user) - visit verify_session_path + visit idv_session_path complete_idv_profile_ok(user) click_acknowledge_personal_key first(:link, t('links.sign_out')).click diff --git a/spec/support/idv_examples/sp_requested_attributes.rb b/spec/support/idv_examples/sp_requested_attributes.rb index 230ccd59396..e0719e40ee6 100644 --- a/spec/support/idv_examples/sp_requested_attributes.rb +++ b/spec/support/idv_examples/sp_requested_attributes.rb @@ -15,7 +15,7 @@ sign_in_user(user) click_submit_default - expect(current_path).to eq verify_path + expect(current_path).to eq idv_path click_idv_begin complete_idv_profile_ok(user) diff --git a/spec/support/idv_examples/usps_otp_verification_step.rb b/spec/support/idv_examples/usps_otp_verification_step.rb index b5bdbd5c143..a59e498948b 100644 --- a/spec/support/idv_examples/usps_otp_verification_step.rb +++ b/spec/support/idv_examples/usps_otp_verification_step.rb @@ -76,7 +76,7 @@ expect(UspsConfirmation.count).to eq(1) expect(UspsConfirmationCode.count).to eq(1) - expect(current_path).to eq verify_come_back_later_path + expect(current_path).to eq idv_come_back_later_path confirmation_code = UspsConfirmationCode.first otp_fingerprint = Pii::Fingerprinter.fingerprint(otp) diff --git a/spec/view_models/verify/base_spec.rb b/spec/view_models/idv/base_spec.rb similarity index 95% rename from spec/view_models/verify/base_spec.rb rename to spec/view_models/idv/base_spec.rb index 86bad253bf6..9a9132ada42 100644 --- a/spec/view_models/verify/base_spec.rb +++ b/spec/view_models/idv/base_spec.rb @@ -1,10 +1,10 @@ require 'rails_helper' -RSpec.describe Verify::Base do +RSpec.describe Idv::Base do describe '#message' do let(:timed_out) { false } let(:view_model) do - Verify::Base.new( + Idv::Base.new( error: error, remaining_attempts: 1, idv_form: nil, @@ -35,7 +35,7 @@ describe '#modal_class_name' do let(:view_model) do - Verify::Base.new( + Idv::Base.new( error: error, remaining_attempts: 1, idv_form: nil, diff --git a/spec/views/verify/_hardfail4.html.slim_spec.rb b/spec/views/idv/_hardfail4.html.slim_spec.rb similarity index 89% rename from spec/views/verify/_hardfail4.html.slim_spec.rb rename to spec/views/idv/_hardfail4.html.slim_spec.rb index 24901339489..fb573ef77ab 100644 --- a/spec/views/verify/_hardfail4.html.slim_spec.rb +++ b/spec/views/idv/_hardfail4.html.slim_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe 'verify/_hardfail4.html.slim' do +RSpec.describe 'idv/_hardfail4.html.slim' do let(:decorated_session) do instance_double('SessionDecorator', sp_name: 'Example SP', sp_return_url: 'test.host') end diff --git a/spec/views/verify/_no_sp_hardfail.html.slim_spec.rb b/spec/views/idv/_no_sp_hardfail.html.slim_spec.rb similarity index 79% rename from spec/views/verify/_no_sp_hardfail.html.slim_spec.rb rename to spec/views/idv/_no_sp_hardfail.html.slim_spec.rb index 53311875071..dea6d862f7d 100644 --- a/spec/views/verify/_no_sp_hardfail.html.slim_spec.rb +++ b/spec/views/idv/_no_sp_hardfail.html.slim_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe 'verify/_no_sp_hardfail.html.slim' do +RSpec.describe 'idv/_no_sp_hardfail.html.slim' do it 'links to the profile' do render diff --git a/spec/views/verify/activated.html.slim_spec.rb b/spec/views/idv/activated.html.slim_spec.rb similarity index 87% rename from spec/views/verify/activated.html.slim_spec.rb rename to spec/views/idv/activated.html.slim_spec.rb index 938676322f1..57dc5b45044 100644 --- a/spec/views/verify/activated.html.slim_spec.rb +++ b/spec/views/idv/activated.html.slim_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'verify/activated.html.slim' do +describe 'idv/activated.html.slim' do it 'has a localized title' do expect(view).to receive(:title).with(t('idv.titles.activated')) diff --git a/spec/views/verify/come_back_later/show.html.slim_spec.rb b/spec/views/idv/come_back_later/show.html.slim_spec.rb similarity index 97% rename from spec/views/verify/come_back_later/show.html.slim_spec.rb rename to spec/views/idv/come_back_later/show.html.slim_spec.rb index 2be79079581..8936f8ac829 100644 --- a/spec/views/verify/come_back_later/show.html.slim_spec.rb +++ b/spec/views/idv/come_back_later/show.html.slim_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'verify/come_back_later/show.html.slim' do +describe 'idv/come_back_later/show.html.slim' do let(:sp_return_url) { 'https://www.example.com' } let(:sp_name) { '🔒🌐💻' } diff --git a/spec/views/verify/fail.html.slim_spec.rb b/spec/views/idv/fail.html.slim_spec.rb similarity index 83% rename from spec/views/verify/fail.html.slim_spec.rb rename to spec/views/idv/fail.html.slim_spec.rb index bccc5ff6f29..fcc29ef4421 100644 --- a/spec/views/verify/fail.html.slim_spec.rb +++ b/spec/views/idv/fail.html.slim_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'verify/fail.html.slim' do +describe 'idv/fail.html.slim' do let(:view_context) { ActionController::Base.new.view_context } context 'when SP is present' do @@ -15,7 +15,7 @@ it 'displays the hardfail4 partial' do render - expect(view).to render_template(partial: 'verify/_hardfail4') + expect(view).to render_template(partial: 'idv/_hardfail4') expect(rendered).to have_content( strip_tags(t('idv.messages.hardfail4_html', sp: @decorated_session.sp_name)) ) @@ -30,7 +30,7 @@ it 'displays the null partial' do render - expect(view).to render_template(partial: 'verify/_no_sp_hardfail') + expect(view).to render_template(partial: 'idv/_no_sp_hardfail') end end end diff --git a/spec/views/verify/review/new.html.slim_spec.rb b/spec/views/idv/review/new.html.slim_spec.rb similarity index 97% rename from spec/views/verify/review/new.html.slim_spec.rb rename to spec/views/idv/review/new.html.slim_spec.rb index 56738407872..3b0c6a99ee1 100644 --- a/spec/views/verify/review/new.html.slim_spec.rb +++ b/spec/views/idv/review/new.html.slim_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'verify/review/new.html.slim' do +describe 'idv/review/new.html.slim' do include XPathHelper context 'user has completed all steps' do diff --git a/spec/views/verify/usps/index.html.slim_spec.rb b/spec/views/idv/usps/index.html.slim_spec.rb similarity index 91% rename from spec/views/verify/usps/index.html.slim_spec.rb rename to spec/views/idv/usps/index.html.slim_spec.rb index c72e0b65701..b24f0edcf5e 100644 --- a/spec/views/verify/usps/index.html.slim_spec.rb +++ b/spec/views/idv/usps/index.html.slim_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'verify/usps/index.html.slim' do +describe 'idv/usps/index.html.slim' do it 'calls UspsDecorator#title and #button' do user = build_stubbed(:user, :signed_up) usps_mail_service = Idv::UspsMail.new(user) diff --git a/spec/views/two_factor_authentication/otp_verification/show.html.slim_spec.rb b/spec/views/two_factor_authentication/otp_verification/show.html.slim_spec.rb index 3df2f29d900..d09f422d7d7 100644 --- a/spec/views/two_factor_authentication/otp_verification/show.html.slim_spec.rb +++ b/spec/views/two_factor_authentication/otp_verification/show.html.slim_spec.rb @@ -7,7 +7,7 @@ phone_number: '***-***-1212', code_value: '12777', unconfirmed_user: false, - reenter_phone_number_path: verify_phone_path, + reenter_phone_number_path: idv_phone_path, } end @@ -317,7 +317,7 @@ render - expect(rendered).to have_link(t('forms.two_factor.try_again'), href: verify_phone_path) + expect(rendered).to have_link(t('forms.two_factor.try_again'), href: idv_phone_path) end end @@ -332,7 +332,7 @@ render - expect(rendered).to have_link(t('forms.two_factor.try_again'), href: verify_phone_path) + expect(rendered).to have_link(t('forms.two_factor.try_again'), href: idv_phone_path) end end end