diff --git a/app/controllers/profile_controller.rb b/app/controllers/accounts_controller.rb similarity index 73% rename from app/controllers/profile_controller.rb rename to app/controllers/accounts_controller.rb index f4d89ed847d..b0757ac2299 100644 --- a/app/controllers/profile_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -1,11 +1,11 @@ -class ProfileController < ApplicationController +class AccountsController < ApplicationController before_action :confirm_two_factor_authenticated layout 'card_wide' - def index + def show cacher = Pii::Cacher.new(current_user, user_session) - @view_model = ProfileIndex.new( + @view_model = AccountShow.new( decrypted_pii: cacher.fetch, personal_key: flash[:personal_key], decorated_user: current_user.decorate diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 38bb578c22b..115dd99e9d6 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -83,7 +83,7 @@ def after_sign_in_path_for(user) end def signed_in_path - user_fully_authenticated? ? profile_path : user_two_factor_authentication_path + user_fully_authenticated? ? account_path : user_two_factor_authentication_path end def reauthn_param diff --git a/app/controllers/concerns/two_factor_authenticatable.rb b/app/controllers/concerns/two_factor_authenticatable.rb index 1e616b988ab..19c8c354815 100644 --- a/app/controllers/concerns/two_factor_authenticatable.rb +++ b/app/controllers/concerns/two_factor_authenticatable.rb @@ -62,7 +62,7 @@ def current_password_required? def check_already_authenticated return unless initial_authentication_context? - redirect_to profile_path if user_fully_authenticated? + redirect_to account_path if user_fully_authenticated? end def reset_attempt_count_if_user_no_longer_locked_out @@ -195,11 +195,11 @@ def after_otp_action_path user_session[:first_time_personal_key_view] = 'true' sign_up_personal_key_path elsif @updating_existing_number - profile_path + account_path elsif decorated_user.password_reset_profile.present? reactivate_profile_path else - profile_path + account_path end end diff --git a/app/controllers/concerns/unconfirmed_user_concern.rb b/app/controllers/concerns/unconfirmed_user_concern.rb index 6bbc082fbfb..fcec4501bec 100644 --- a/app/controllers/concerns/unconfirmed_user_concern.rb +++ b/app/controllers/concerns/unconfirmed_user_concern.rb @@ -12,7 +12,7 @@ def after_confirmation_path_for(user) if !user_signed_in? new_user_session_url elsif user.two_factor_enabled? - profile_path + account_path else phone_setup_url end diff --git a/app/controllers/sign_up/email_confirmations_controller.rb b/app/controllers/sign_up/email_confirmations_controller.rb index cf881c83d52..7902d365965 100644 --- a/app/controllers/sign_up/email_confirmations_controller.rb +++ b/app/controllers/sign_up/email_confirmations_controller.rb @@ -56,7 +56,7 @@ def process_already_confirmed_user action_text = 'Please sign in.' unless user_signed_in? flash[:error] = t('devise.confirmations.already_confirmed', action: action_text) - redirect_to user_signed_in? ? profile_path : new_user_session_url + redirect_to user_signed_in? ? account_path : new_user_session_url end def unsuccessful_confirmation_error diff --git a/app/controllers/users/emails_controller.rb b/app/controllers/users/emails_controller.rb index 7a0ceff2671..a4ccd8f10af 100644 --- a/app/controllers/users/emails_controller.rb +++ b/app/controllers/users/emails_controller.rb @@ -32,7 +32,7 @@ def process_updates flash[:notice] = t('devise.registrations.email_update_needs_confirmation') end - redirect_to profile_url + redirect_to account_url end end end diff --git a/app/controllers/users/passwords_controller.rb b/app/controllers/users/passwords_controller.rb index 8649670eb28..3e1b05657a7 100644 --- a/app/controllers/users/passwords_controller.rb +++ b/app/controllers/users/passwords_controller.rb @@ -31,7 +31,7 @@ def handle_success bypass_sign_in current_user flash[:personal_key] = @update_user_password.personal_key - redirect_to profile_url, notice: t('notices.password_changed') + redirect_to account_url, notice: t('notices.password_changed') end end end diff --git a/app/controllers/users/personal_keys_controller.rb b/app/controllers/users/personal_keys_controller.rb index 175fb8f477a..7a05ed874a6 100644 --- a/app/controllers/users/personal_keys_controller.rb +++ b/app/controllers/users/personal_keys_controller.rb @@ -21,7 +21,7 @@ def next_step if current_user.decorate.password_reset_profile.present? reactivate_profile_url else - profile_url + account_url end end end diff --git a/app/controllers/users/phones_controller.rb b/app/controllers/users/phones_controller.rb index 4537e97028e..3fbeaadf54f 100644 --- a/app/controllers/users/phones_controller.rb +++ b/app/controllers/users/phones_controller.rb @@ -31,7 +31,7 @@ def process_updates flash[:notice] = t('devise.registrations.phone_update_needs_confirmation') prompt_to_confirm_phone(phone: @update_user_phone_form.phone) else - redirect_to profile_url + redirect_to account_url end end end diff --git a/app/controllers/users/reactivate_profile_controller.rb b/app/controllers/users/reactivate_profile_controller.rb index 4e730fcfb9b..b4239e84d01 100644 --- a/app/controllers/users/reactivate_profile_controller.rb +++ b/app/controllers/users/reactivate_profile_controller.rb @@ -7,7 +7,7 @@ def index def create @reactivate_profile_form = build_reactivate_profile_form if @reactivate_profile_form.submit(flash) - redirect_to profile_path + redirect_to account_path else render :index end diff --git a/app/controllers/users/totp_setup_controller.rb b/app/controllers/users/totp_setup_controller.rb index 2e181441dee..7e2b186b529 100644 --- a/app/controllers/users/totp_setup_controller.rb +++ b/app/controllers/users/totp_setup_controller.rb @@ -3,7 +3,7 @@ class TotpSetupController < ApplicationController before_action :confirm_two_factor_authenticated def new - return redirect_to profile_path if current_user.totp_enabled? + return redirect_to account_path if current_user.totp_enabled? user_session[:new_totp_secret] = current_user.generate_totp_secret if new_totp_secret.nil? @@ -29,14 +29,14 @@ def disable UpdateUser.new(user: current_user, attributes: { otp_secret_key: nil }).call flash[:success] = t('notices.totp_disabled') end - redirect_to profile_path + redirect_to account_path end private def process_valid_code flash[:success] = t('notices.totp_configured') - redirect_to profile_path + redirect_to account_path user_session.delete(:new_totp_secret) end diff --git a/app/controllers/users/verify_profile_controller.rb b/app/controllers/users/verify_profile_controller.rb index 28e3073f9d2..d9e7ec7bfab 100644 --- a/app/controllers/users/verify_profile_controller.rb +++ b/app/controllers/users/verify_profile_controller.rb @@ -9,8 +9,8 @@ def index def create @verify_profile_form = build_verify_profile_form if @verify_profile_form.submit - flash[:success] = t('profile.index.verification.success') - redirect_to profile_path + flash[:success] = t('account.index.verification.success') + redirect_to account_path else render :index end diff --git a/app/controllers/verify/confirmations_controller.rb b/app/controllers/verify/confirmations_controller.rb index 59b5e1a0fc4..43577d73bf5 100644 --- a/app/controllers/verify/confirmations_controller.rb +++ b/app/controllers/verify/confirmations_controller.rb @@ -27,7 +27,7 @@ def next_step end def confirm_profile_has_been_created - redirect_to profile_path if idv_session.profile.blank? + redirect_to account_path if idv_session.profile.blank? end def track_final_idv_event diff --git a/app/controllers/verify/sessions_controller.rb b/app/controllers/verify/sessions_controller.rb index fe854e6ff76..ce79641bccb 100644 --- a/app/controllers/verify/sessions_controller.rb +++ b/app/controllers/verify/sessions_controller.rb @@ -51,7 +51,7 @@ def step end def handle_idv_redirect - redirect_to profile_path and return if current_user.personal_key.present? + redirect_to account_path and return if current_user.personal_key.present? redirect_to manage_personal_key_path end diff --git a/app/decorators/user_decorator.rb b/app/decorators/user_decorator.rb index 52106d690d6..ed0f6bb4c91 100644 --- a/app/decorators/user_decorator.rb +++ b/app/decorators/user_decorator.rb @@ -99,7 +99,7 @@ def recent_events def verified_account_partial if identity_verified? - 'profile/verified_account_badge' + 'accounts/verified_account_badge' else 'shared/null' end diff --git a/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb b/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb index f5164f5ef2e..0f27b0959bf 100644 --- a/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb @@ -20,7 +20,7 @@ def fallback_links def cancel_link if reauthn - profile_path + account_path else destroy_user_session_path end 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 bfdb518ef28..85e805bdc34 100644 --- a/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb @@ -20,7 +20,7 @@ def fallback_links def cancel_link if confirmation_for_phone_change || reauthn - profile_path + account_path else destroy_user_session_path end diff --git a/app/view_models/profile_index.rb b/app/view_models/account_show.rb similarity index 71% rename from app/view_models/profile_index.rb rename to app/view_models/account_show.rb index 8f40f0d8436..d0a10d22ecb 100644 --- a/app/view_models/profile_index.rb +++ b/app/view_models/account_show.rb @@ -1,4 +1,4 @@ -class ProfileIndex +class AccountShow attr_reader :decorated_user, :decrypted_pii, :personal_key def initialize(decrypted_pii:, personal_key:, decorated_user:) @@ -9,15 +9,15 @@ def initialize(decrypted_pii:, personal_key:, decorated_user:) def header_partial if decorated_user.identity_verified? - 'profile/verified_header' + 'accounts/verified_header' else - 'profile/header' + 'accounts/header' end end def personal_key_partial if personal_key.present? - 'profile/personal_key' + 'accounts/personal_key' else 'shared/null' end @@ -25,7 +25,7 @@ def personal_key_partial def password_reset_partial if decorated_user.password_reset_profile.present? - 'profile/password_reset' + 'accounts/password_reset' else 'shared/null' end @@ -33,19 +33,19 @@ def password_reset_partial def pending_profile_partial if decorated_user.pending_profile.present? - 'profile/pending_profile' + 'accounts/pending_profile' else 'shared/null' end end def edit_action_partial - 'profile/actions/edit_action_button' + 'accounts/actions/edit_action_button' end def pii_partial if decrypted_pii.present? - 'profile/pii' + 'accounts/pii' else 'shared/null' end @@ -53,9 +53,9 @@ def pii_partial def totp_partial if decorated_user.totp_enabled? - 'profile/actions/disable_totp' + 'accounts/actions/disable_totp' else - 'profile/actions/enable_totp' + 'accounts/actions/enable_totp' end end @@ -64,15 +64,15 @@ def manage_personal_key_partial end def personal_key_action_partial - 'profile/actions/manage_personal_key' + 'accounts/actions/manage_personal_key' end def personal_key_item_partial - 'profile/personal_key_item_heading' + 'accounts/personal_key_item_heading' end def recent_event_partial - 'profile/event_item' + 'accounts/event_item' end def header_personalization @@ -82,9 +82,9 @@ def header_personalization end def totp_content - return 'profile.index.auth_app_enabled' if decorated_user.totp_enabled? + return 'account.index.auth_app_enabled' if decorated_user.totp_enabled? - 'profile.index.auth_app_disabled' + 'account.index.auth_app_disabled' end delegate :recent_events, to: :decorated_user diff --git a/app/view_models/verify/base.rb b/app/view_models/verify/base.rb index a9df6e836b5..3da31cf76b3 100644 --- a/app/view_models/verify/base.rb +++ b/app/view_models/verify/base.rb @@ -51,7 +51,7 @@ def button class: button_css_classes ) else - helper.link_to button_link_text, profile_path, class: button_css_classes + helper.link_to button_link_text, account_path, class: button_css_classes end end diff --git a/app/views/profile/_profile_item.html.slim b/app/views/accounts/_account_item.html.slim similarity index 100% rename from app/views/profile/_profile_item.html.slim rename to app/views/accounts/_account_item.html.slim diff --git a/app/views/profile/_event_item.html.slim b/app/views/accounts/_event_item.html.slim similarity index 100% rename from app/views/profile/_event_item.html.slim rename to app/views/accounts/_event_item.html.slim diff --git a/app/views/profile/_header.html.slim b/app/views/accounts/_header.html.slim similarity index 71% rename from app/views/profile/_header.html.slim rename to app/views/accounts/_header.html.slim index c71e82ceb82..0d29abe069e 100644 --- a/app/views/profile/_header.html.slim +++ b/app/views/accounts/_header.html.slim @@ -3,12 +3,12 @@ h2.h3.m0.center.sm-left-align .sm-hide.regular.sans-serif.inline span - = t('profile.welcome') + = t('account.welcome') ', p.mb0.bold = view_model.header_personalization span.sm-show - = t('headings.profile.login_info') + = t('headings.account.login_info') .px2.pb1.bold.h3.sm-hide.serif - = t('headings.profile.login_info') + = t('headings.account.login_info') diff --git a/app/views/profile/_nav_auth.html.slim b/app/views/accounts/_nav_auth.html.slim similarity index 93% rename from app/views/profile/_nav_auth.html.slim rename to app/views/accounts/_nav_auth.html.slim index d37a9ae5187..0d6381068de 100644 --- a/app/views/profile/_nav_auth.html.slim +++ b/app/views/accounts/_nav_auth.html.slim @@ -9,7 +9,7 @@ nav.bg-white width: 170), root_path .right-align.col.col-5 span.sm-display-inline-block.display-none.border-right.border-silver.pr1 - = t('profile.welcome') + = t('account.welcome') ' span.bold = greeting = link_to t('links.sign_out'), destroy_user_session_path, diff --git a/app/views/accounts/_password_reset.html.slim b/app/views/accounts/_password_reset.html.slim new file mode 100644 index 00000000000..b9667265108 --- /dev/null +++ b/app/views/accounts/_password_reset.html.slim @@ -0,0 +1,3 @@ +.mb4.alert.alert-warning + p = t('account.index.reactivation.instructions') + p.mb0 = link_to t('account.index.reactivation.reactivate_button'), reactivate_profile_path diff --git a/app/views/accounts/_pending_profile.html.slim b/app/views/accounts/_pending_profile.html.slim new file mode 100644 index 00000000000..3c1cda7f968 --- /dev/null +++ b/app/views/accounts/_pending_profile.html.slim @@ -0,0 +1,3 @@ +.mb4.alert.alert-warning + p = t('account.index.verification.instructions') + p.mb0 = link_to t('account.index.verification.reactivate_button'), verify_profile_path diff --git a/app/views/profile/_personal_key.html.slim b/app/views/accounts/_personal_key.html.slim similarity index 100% rename from app/views/profile/_personal_key.html.slim rename to app/views/accounts/_personal_key.html.slim diff --git a/app/views/profile/_personal_key_item_heading.html.slim b/app/views/accounts/_personal_key_item_heading.html.slim similarity index 70% rename from app/views/profile/_personal_key_item_heading.html.slim rename to app/views/accounts/_personal_key_item_heading.html.slim index 6fb0c1b1568..93205672d48 100644 --- a/app/views/profile/_personal_key_item_heading.html.slim +++ b/app/views/accounts/_personal_key_item_heading.html.slim @@ -1,3 +1,3 @@ .col = image_tag asset_url('p-key.svg'), width: 16, class: 'mr1 align-middle' -= t('profile.items.personal_key') += t('account.items.personal_key') diff --git a/app/views/profile/_pii.html.slim b/app/views/accounts/_pii.html.slim similarity index 71% rename from app/views/profile/_pii.html.slim rename to app/views/accounts/_pii.html.slim index f212026646a..1de04c6b4d7 100644 --- a/app/views/profile/_pii.html.slim +++ b/app/views/accounts/_pii.html.slim @@ -1,18 +1,18 @@ .mb3.profile-info-box .bg-light-blue.py1.px2.h6.caps.clearfix .col.col-11 - = t('headings.profile.profile_info') + = t('headings.account.profile_info') = image_tag asset_url('user.svg'), width: 8, class: 'ml1 mt-tiny' .col.col-1.right-align = image_tag asset_url('lock.svg'), width: 8, class: 'mr1' .p2 .clearfix.mxn1 - .sm-col.sm-col-4.px1.bold = t('profile.index.full_name') + .sm-col.sm-col-4.px1.bold = t('account.index.full_name') .sm-col.sm-col-8.px1.truncate #{decrypted_pii.first_name} #{decrypted_pii.last_name} .p2.border-top .clearfix.mxn1 - .sm-col.sm-col-4.px1.bold = t('profile.index.address') + .sm-col.sm-col-4.px1.bold = t('account.index.address') .sm-col.sm-col-8.px1 | #{decrypted_pii.address1}
- if decrypted_pii.address2.present? @@ -21,21 +21,21 @@ .p2.border-top .clearfix.mxn1 - .sm-col.sm-col-4.px1.bold = t('profile.index.dob') + .sm-col.sm-col-4.px1.bold = t('account.index.dob') .sm-col.sm-col-8.px1 #{decrypted_pii.dob.to_date.to_formatted_s(:long)} .p2.border-top .clearfix.mxn1 - .sm-col.sm-col-4.px1.bold = t('profile.index.ssn') + .sm-col.sm-col-4.px1.bold = t('account.index.ssn') .sm-col.sm-col-8.px1 = "***-**-#{decrypted_pii.ssn.raw[-4..-1]}" .p2.border-top.border-bottom .clearfix.mxn1 - .sm-col.sm-col-4.px1.bold = t('profile.index.phone') + .sm-col.sm-col-4.px1.bold = t('account.index.phone') .sm-col.sm-col-8.px1 = decrypted_pii.phone .bg-gray-lighter.px2.py1.clearfix.fs-12p .col.col-12.sm-col-6 = image_tag asset_url('lock.svg'), width: 8, class: 'mr1' - = t('profile.security.text') - = link_to t('profile.security.link'), MarketingSite.help_url + = t('account.security.text') + = link_to t('account.security.link'), MarketingSite.help_url diff --git a/app/views/profile/_verified_account_badge.html.slim b/app/views/accounts/_verified_account_badge.html.slim similarity index 77% rename from app/views/profile/_verified_account_badge.html.slim rename to app/views/accounts/_verified_account_badge.html.slim index d8af2d7f645..2c6b3ea2f25 100644 --- a/app/views/profile/_verified_account_badge.html.slim +++ b/app/views/accounts/_verified_account_badge.html.slim @@ -2,4 +2,4 @@ .verification-badge.mx-auto span = image_tag asset_url('alert/success.svg'), width: 16, class: 'mr1 align-middle' - = t('headings.profile.verified_account') + = t('headings.account.verified_account') diff --git a/app/views/profile/_verified_header.html.slim b/app/views/accounts/_verified_header.html.slim similarity index 75% rename from app/views/profile/_verified_header.html.slim rename to app/views/accounts/_verified_header.html.slim index 1c824637238..5d5c8b93375 100644 --- a/app/views/profile/_verified_header.html.slim +++ b/app/views/accounts/_verified_header.html.slim @@ -2,13 +2,13 @@ .sm-col.sm-col-8 h2.h3.m0.center.sm-left-align span.regular.sans-serif.sm-hide - = t('profile.welcome') + = t('account.welcome') ', span.bold = view_model.header_personalization span.sm-show - = t('headings.profile.login_info') + = t('headings.account.login_info') = render partial: current_user.decorate.verified_account_partial .px2.pb1.bold.h3.sm-hide.serif - = t('headings.profile.login_info') + = t('headings.account.login_info') diff --git a/app/views/profile/actions/_disable_totp.html.slim b/app/views/accounts/actions/_disable_totp.html.slim similarity index 60% rename from app/views/profile/actions/_disable_totp.html.slim rename to app/views/accounts/actions/_disable_totp.html.slim index 8d8a8bbf0b7..8abe89160f5 100644 --- a/app/views/profile/actions/_disable_totp.html.slim +++ b/app/views/accounts/actions/_disable_totp.html.slim @@ -1,3 +1,3 @@ = button_to disable_totp_url, method: :delete do - span.hide = t('profile.index.authentication_app') + span.hide = t('account.index.authentication_app') = t('forms.buttons.disable') diff --git a/app/views/profile/actions/_edit_action_button.html.slim b/app/views/accounts/actions/_edit_action_button.html.slim similarity index 100% rename from app/views/profile/actions/_edit_action_button.html.slim rename to app/views/accounts/actions/_edit_action_button.html.slim diff --git a/app/views/profile/actions/_enable_totp.html.slim b/app/views/accounts/actions/_enable_totp.html.slim similarity index 56% rename from app/views/profile/actions/_enable_totp.html.slim rename to app/views/accounts/actions/_enable_totp.html.slim index 374ee69d0a0..1fd86a7dc4c 100644 --- a/app/views/profile/actions/_enable_totp.html.slim +++ b/app/views/accounts/actions/_enable_totp.html.slim @@ -1,3 +1,3 @@ = link_to authenticator_start_url do - span.hide = t('profile.index.authentication_app') + span.hide = t('account.index.authentication_app') = t('forms.buttons.enable') diff --git a/app/views/accounts/actions/_manage_personal_key.html.slim b/app/views/accounts/actions/_manage_personal_key.html.slim new file mode 100644 index 00000000000..d851c482497 --- /dev/null +++ b/app/views/accounts/actions/_manage_personal_key.html.slim @@ -0,0 +1,4 @@ += link_to manage_personal_key_path do + span.hide + = t('account.items.personal_key') + = t('account.links.regenerate_personal_key') diff --git a/app/views/profile/index.html.slim b/app/views/accounts/show.html.slim similarity index 72% rename from app/views/profile/index.html.slim rename to app/views/accounts/show.html.slim index 7397f02b8c2..dde4f2d8d6b 100644 --- a/app/views/profile/index.html.slim +++ b/app/views/accounts/show.html.slim @@ -1,7 +1,7 @@ - content_for(:nav) do - = render 'profile/nav_auth', greeting: @view_model.header_personalization + = render 'accounts/nav_auth', greeting: @view_model.header_personalization -- title t('titles.profile') +- title t('titles.account') = render @view_model.personal_key_partial, view_model: @view_model @@ -9,44 +9,44 @@ = render @view_model.pending_profile_partial, view_model: @view_model -h1.hide = t('titles.profile') +h1.hide = t('titles.account') = render @view_model.header_partial, view_model: @view_model .mb3.profile-info-box .bg-light-blue.py1.px2.h6.caps - = t('profile.index.login') + = t('account.index.login') = image_tag asset_url('sign-in.svg'), width: 12, class: 'ml1 mt-tiny' - = render 'profile_item', - name: t('profile.index.email'), + = render 'account_item', + name: t('account.index.email'), content: current_user.email, path: manage_email_path, action: @view_model.edit_action_partial - = render 'profile_item', - name: t('profile.index.password'), + = render 'account_item', + name: t('account.index.password'), content: '************', path: manage_password_path, action: @view_model.edit_action_partial .mb3.profile-info-box .bg-light-blue.py1.px2.h6.caps - = t('headings.profile.two_factor') + = t('headings.account.two_factor') = image_tag asset_url('2fa-account.svg'), width: 8, class: 'ml1 mt-tiny' - = render 'profile_item', - name: t('profile.index.phone'), + = render 'account_item', + name: t('account.index.phone'), content: current_user.phone, path: manage_phone_path, action: @view_model.edit_action_partial - = render 'profile_item', - name: t('profile.index.authentication_app'), + = render 'account_item', + name: t('account.index.authentication_app'), content: content_tag(:em, t(@view_model.totp_content)), action: @view_model.totp_partial - @view_model.manage_personal_key_partial do - = render 'profile_item', + = render 'account_item', name: render(@view_model.personal_key_item_partial), action: @view_model.personal_key_action_partial @@ -54,7 +54,7 @@ h1.hide = t('titles.profile') .mb3.profile-info-box .bg-light-blue.pb1.pt1.px2.h6.caps.clearfix - = t('headings.profile.account_history') + = t('headings.account.account_history') = image_tag asset_url('history.svg'), width: 12, class: 'ml1 mt-tiny' - @view_model.recent_events.each do |event| = render @view_model.recent_event_partial, event: event diff --git a/app/views/mfa_confirmation/new.html.slim b/app/views/mfa_confirmation/new.html.slim index 56759216daf..4745dbfe384 100644 --- a/app/views/mfa_confirmation/new.html.slim +++ b/app/views/mfa_confirmation/new.html.slim @@ -7,4 +7,4 @@ p.mt-tiny.mb0 = t('help_text.change_factor', factor: user_session[:factor_to_cha html: { autocomplete: 'off', role: 'form', method: 'post' }) do |f| = f.input :password, required: true = f.button :submit, t('forms.buttons.continue'), class: 'btn-wide mt2' -= render 'shared/cancel', link: profile_path += render 'shared/cancel', link: account_path diff --git a/app/views/profile/_password_reset.html.slim b/app/views/profile/_password_reset.html.slim deleted file mode 100644 index fe659492c5b..00000000000 --- a/app/views/profile/_password_reset.html.slim +++ /dev/null @@ -1,3 +0,0 @@ -.mb4.alert.alert-warning - p = t('profile.index.reactivation.instructions') - p.mb0 = link_to t('profile.index.reactivation.reactivate_button'), reactivate_profile_path diff --git a/app/views/profile/_pending_profile.html.slim b/app/views/profile/_pending_profile.html.slim deleted file mode 100644 index 8491a565636..00000000000 --- a/app/views/profile/_pending_profile.html.slim +++ /dev/null @@ -1,3 +0,0 @@ -.mb4.alert.alert-warning - p = t('profile.index.verification.instructions') - p.mb0 = link_to t('profile.index.verification.reactivate_button'), verify_profile_path diff --git a/app/views/profile/actions/_manage_personal_key.html.slim b/app/views/profile/actions/_manage_personal_key.html.slim deleted file mode 100644 index 5a04db22d88..00000000000 --- a/app/views/profile/actions/_manage_personal_key.html.slim +++ /dev/null @@ -1,4 +0,0 @@ -= link_to manage_personal_key_path do - span.hide - = t('profile.items.personal_key') - = t('profile.links.regenerate_personal_key') diff --git a/app/views/test/saml_test/decode_response.html.slim b/app/views/test/saml_test/decode_response.html.slim index b26ffd133b5..da175b3fa61 100644 --- a/app/views/test/saml_test/decode_response.html.slim +++ b/app/views/test/saml_test/decode_response.html.slim @@ -2,8 +2,8 @@ div class='container' div class='row' h3 Decoded SAML Response p - | Visit the profile page to demo the SP iniated email change + redirect: - = link_to 'Profile page', profile_path, role: 'menuitem' + | Visit the account page to demo the SP iniated email change + redirect: + = link_to 'Account page', account_path, role: 'menuitem' table border='2' width='80%' tbody tr diff --git a/app/views/users/emails/edit.html.slim b/app/views/users/emails/edit.html.slim index 05320c686d2..a03fd09f80d 100644 --- a/app/views/users/emails/edit.html.slim +++ b/app/views/users/emails/edit.html.slim @@ -7,4 +7,4 @@ h1.h3.my0 = t('headings.edit_info.email') = f.error_notification = f.input :email, required: true = f.button :submit, t('forms.buttons.submit.update'), class: 'mt2' -= render 'shared/cancel', link: profile_path += render 'shared/cancel', link: account_path diff --git a/app/views/users/passwords/edit.html.slim b/app/views/users/passwords/edit.html.slim index 710266b87ce..eb11e6dc2ef 100644 --- a/app/views/users/passwords/edit.html.slim +++ b/app/views/users/passwords/edit.html.slim @@ -13,6 +13,6 @@ p.mt-tiny.mb0#password-description = render 'shared/password_accordion' -= render 'shared/cancel', link: profile_path += render 'shared/cancel', link: account_path == javascript_include_tag 'misc/pw-strength' diff --git a/app/views/users/phones/edit.html.slim b/app/views/users/phones/edit.html.slim index 452bc574ca6..3da297496fd 100644 --- a/app/views/users/phones/edit.html.slim +++ b/app/views/users/phones/edit.html.slim @@ -5,6 +5,6 @@ h1.h3.my0 = t('headings.edit_info.phone') = simple_form_for(@update_user_phone_form, url: manage_phone_path, html: { autocomplete: 'off', method: :put, role: 'form' }) do |f| = f.input :phone, as: :tel, required: true, input_html: { class: 'phone', value: nil }, - label: t('profile.index.phone') + label: t('account.index.phone') = f.button :submit, t('forms.buttons.submit.confirm_change'), class: 'mt2' -= render 'shared/cancel', link: profile_path += render 'shared/cancel', link: account_path diff --git a/app/views/users/totp_setup/new.html.slim b/app/views/users/totp_setup/new.html.slim index 3d09ef52cfe..88378306d69 100644 --- a/app/views/users/totp_setup/new.html.slim +++ b/app/views/users/totp_setup/new.html.slim @@ -10,4 +10,4 @@ p.mt-tiny.mb0 = t('forms.totp_setup.totp_info') = text_field_tag :code, '', required: true, pattern: '[0-9]*', type: 'tel', class: 'block col-12 field monospace mfa', maxlength: Devise.otp_length = submit_tag 'Submit', class: 'btn btn-primary align-top' -= render 'shared/cancel', link: profile_path += render 'shared/cancel', link: account_path diff --git a/app/views/users/totp_setup/start.html.slim b/app/views/users/totp_setup/start.html.slim index 3ef65dc273c..aab065a4071 100644 --- a/app/views/users/totp_setup/start.html.slim +++ b/app/views/users/totp_setup/start.html.slim @@ -7,4 +7,4 @@ p.mt-tiny.mb3 = t('forms.totp_setup.totp_intro') .mt3.sm-mt4.mb1 = link_to t('forms.buttons.setup_totp'), authenticator_setup_url, \ class: 'btn btn-primary' -= render 'shared/cancel', link: profile_path += render 'shared/cancel', link: account_path diff --git a/app/views/verify/sessions/new.html.slim b/app/views/verify/sessions/new.html.slim index 0771a2b15d2..59fe0958e9c 100644 --- a/app/views/verify/sessions/new.html.slim +++ b/app/views/verify/sessions/new.html.slim @@ -6,11 +6,11 @@ h1.h3.my0 = @view_model.title html: { autocomplete: 'off', method: :put, role: 'form' }) do |f| = f.error_notification fieldset.mb3.ml0.p0.border-none - legend.col-12.mb3.pb-tiny.border-bottom.border-teal = t('profile.index.full_name') + legend.col-12.mb3.pb-tiny.border-bottom.border-teal = t('account.index.full_name') = f.input :first_name, label: t('idv.form.first_name'), required: true = f.input :last_name, label: t('idv.form.last_name'), required: true fieldset.m0.p0.border-none - legend.col-12.mb3.pb-tiny.border-bottom.border-teal = t('profile.index.address') + legend.col-12.mb3.pb-tiny.border-bottom.border-teal = t('account.index.address') = f.input :address1, label: t('idv.form.address1'), required: true = f.input :address2, label: t('idv.form.address2') = f.input :city, label: t('idv.form.city'), required: true @@ -28,7 +28,7 @@ h1.h3.my0 = @view_model.title = accordion('previous-address', t('idv.form.previous_address_add'), hide_header: true, hide_close_link: true) do fieldset.mt2.ml0.p0.border-none - legend.col-12.my2.pb-tiny.border-bottom.border-teal = t('profile.index.previous_address') + legend.col-12.my2.pb-tiny.border-bottom.border-teal = t('account.index.previous_address') = f.input :prev_address1, label: t('idv.form.address1') = f.input :prev_address2, label: t('idv.form.address2') = f.input :prev_city, label: t('idv.form.city') diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index 1437dddddbe..66e41856e15 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -106,8 +106,8 @@ ignore_unused: - 'links.two_factor_authentication.resend_code.{sms,voice}_html' - 'links.two_factor_authentication.{sms,voice}_html' - 'time.*' - - 'profile.index.auth_app_enabled' - - 'profile.index.auth_app_disabled' + - 'account.index.auth_app_enabled' + - 'account.index.auth_app_disabled' - 'tooltips.authentication_app' # - 'simple_form.{yes,no}' # - 'simple_form.{placeholders,hints,labels}.*' diff --git a/config/locales/profile/en.yml b/config/locales/account/en.yml similarity index 98% rename from config/locales/profile/en.yml rename to config/locales/account/en.yml index 5013f1e75ec..877479d9322 100644 --- a/config/locales/profile/en.yml +++ b/config/locales/account/en.yml @@ -1,6 +1,6 @@ --- en: - profile: + account: index: address: Current address authentication_app: Authentication app diff --git a/config/locales/profile/es.yml b/config/locales/account/es.yml similarity index 98% rename from config/locales/profile/es.yml rename to config/locales/account/es.yml index 9f213f4c793..0c930206652 100644 --- a/config/locales/profile/es.yml +++ b/config/locales/account/es.yml @@ -1,6 +1,6 @@ --- es: - profile: + account: index: address: NOT TRANSLATED YET authentication_app: NOT TRANSLATED YET diff --git a/config/locales/headings/en.yml b/config/locales/headings/en.yml index da861fced5e..17175799719 100644 --- a/config/locales/headings/en.yml +++ b/config/locales/headings/en.yml @@ -15,7 +15,7 @@ en: change: Change your password confirm: Confirm your current password to continue forgot: Forgot your password? - profile: + account: account_history: Account history login_info: Your account profile_info: Profile information diff --git a/config/locales/headings/es.yml b/config/locales/headings/es.yml index c0ca37684ed..a765736d3c1 100644 --- a/config/locales/headings/es.yml +++ b/config/locales/headings/es.yml @@ -15,7 +15,7 @@ es: change: Cambiar su contraseña confirm: Confirme la contraseña actual para continuar forgot: ¿Olvidó su contraseña? - profile: + account: account_history: La historia de la cuenta login_info: Información de la cuenta profile_info: NOT TRANSLATED YET diff --git a/config/locales/titles/en.yml b/config/locales/titles/en.yml index 78d346af46f..07020fb68bd 100644 --- a/config/locales/titles/en.yml +++ b/config/locales/titles/en.yml @@ -17,7 +17,7 @@ en: change: Change the password for your account confirm: Confirm the password for your account forgot: Reset the password for your account - profile: Profile + account: Account reactivate_profile: Reactivate profile personal_key: Just in case registrations: diff --git a/config/locales/titles/es.yml b/config/locales/titles/es.yml index b88650d0c55..9af40fae6a0 100644 --- a/config/locales/titles/es.yml +++ b/config/locales/titles/es.yml @@ -17,7 +17,7 @@ es: change: NOT TRANSLATED YET confirm: NOT TRANSLATED YET forgot: NOT TRANSLATED YET - profile: NOT TRANSLATED YET + account: NOT TRANSLATED YET reactivate_profile: NOT TRANSLATED YET personal_key: NOT TRANSLATED YET registrations: diff --git a/config/routes.rb b/config/routes.rb index ff082de6899..2637acde969 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -43,6 +43,9 @@ # Non-devise-controller routes. Alphabetically sorted. get '/.well-known/openid-configuration' => 'openid_connect/configuration#index', as: :openid_connect_configuration + + get '/account' => 'accounts#show' + get '/api/health/workers' => 'health/workers#index' get '/api/openid_connect/certs' => 'openid_connect/certs#index' post '/api/openid_connect/token' => 'openid_connect/token#create' @@ -84,7 +87,7 @@ get '/users/two_factor_authentication' => 'users/two_factor_authentication#show', as: :user_two_factor_authentication # route name is used by two_factor_authentication gem - get '/profile' => 'profile#index', as: :profile + get '/profile', to: redirect('/account') get '/profile/reactivate' => 'users/reactivate_profile#index', as: :reactivate_profile post '/profile/reactivate' => 'users/reactivate_profile#create' get '/profile/verify' => 'users/verify_profile#index', as: :verify_profile diff --git a/spec/controllers/profile_controller_spec.rb b/spec/controllers/accounts_controller_spec.rb similarity index 90% rename from spec/controllers/profile_controller_spec.rb rename to spec/controllers/accounts_controller_spec.rb index 0693d37eb49..f47cc299ce8 100644 --- a/spec/controllers/profile_controller_spec.rb +++ b/spec/controllers/accounts_controller_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe ProfileController do +describe AccountsController do describe 'before_actions' do it 'includes before_actions from AccountStateChecker' do expect(subject).to have_actions( @@ -10,7 +10,7 @@ end end - describe '#index' do + describe '#show' do context 'when user has an active identity' do it 'renders the profile and does not redirect out of the app' do user = create(:user, :signed_up) @@ -21,7 +21,7 @@ sign_in user - get :index + get :show expect(response).to_not be_redirect end @@ -38,14 +38,14 @@ sign_in user - view_model = ProfileIndex.new( + view_model = AccountShow.new( decrypted_pii: nil, personal_key: nil, decorated_user: user.decorate ) allow(subject).to receive(:view_model).and_return(view_model) - get :index + get :show expect(response).to_not be_redirect end diff --git a/spec/controllers/sign_up/personal_keys_controller_spec.rb b/spec/controllers/sign_up/personal_keys_controller_spec.rb index b9167fe9e06..a7b9f7279bd 100644 --- a/spec/controllers/sign_up/personal_keys_controller_spec.rb +++ b/spec/controllers/sign_up/personal_keys_controller_spec.rb @@ -18,8 +18,8 @@ stub_sign_in subject.user_session[:first_time_personal_key_view] = 'true' - expect(get(:show)).not_to redirect_to(profile_path) - expect(get(:show)).to redirect_to(profile_path) + expect(get(:show)).not_to redirect_to(account_path) + expect(get(:show)).to redirect_to(account_path) end it 're-encrypts PII with new code if active profile exists' do @@ -54,7 +54,7 @@ patch :update - expect(response).to redirect_to profile_path + expect(response).to redirect_to account_path end end end diff --git a/spec/controllers/sign_up/registrations_controller_spec.rb b/spec/controllers/sign_up/registrations_controller_spec.rb index b06bd3084c9..0bff308f684 100644 --- a/spec/controllers/sign_up/registrations_controller_spec.rb +++ b/spec/controllers/sign_up/registrations_controller_spec.rb @@ -33,7 +33,7 @@ get :new - expect(response).to redirect_to profile_path + expect(response).to redirect_to account_path end end @@ -75,7 +75,7 @@ post :create, user: { email: user.email } - expect(response).to redirect_to profile_path + expect(response).to redirect_to account_path end end @@ -130,7 +130,7 @@ get :show - expect(response).to redirect_to profile_path + expect(response).to redirect_to account_path end it 'redirects to sign_up_email_path if request_id param is missing' do 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 a46d7c82978..10dad127122 100644 --- a/spec/controllers/two_factor_authentication/otp_verification_controller_spec.rb +++ b/spec/controllers/two_factor_authentication/otp_verification_controller_spec.rb @@ -127,7 +127,7 @@ it 'redirects to the profile' do post :create, code: subject.current_user.reload.direct_otp, otp_delivery_preference: 'sms' - expect(response).to redirect_to profile_path + expect(response).to redirect_to account_path end it 'resets the second_factor_attempts_count' do @@ -298,7 +298,7 @@ end it 'redirects to profile page' do - expect(response).to redirect_to(profile_path) + expect(response).to redirect_to(account_path) end it 'tracks the confirmation event' do diff --git a/spec/controllers/two_factor_authentication/personal_key_verification_controller_spec.rb b/spec/controllers/two_factor_authentication/personal_key_verification_controller_spec.rb index e26a4ea29a5..761234be8dd 100644 --- a/spec/controllers/two_factor_authentication/personal_key_verification_controller_spec.rb +++ b/spec/controllers/two_factor_authentication/personal_key_verification_controller_spec.rb @@ -32,7 +32,7 @@ it 'redirects to the profile' do post :create, payload - expect(response).to redirect_to profile_path + expect(response).to redirect_to account_path end it 'calls handle_valid_otp' do diff --git a/spec/controllers/two_factor_authentication/totp_verification_controller_spec.rb b/spec/controllers/two_factor_authentication/totp_verification_controller_spec.rb index d1828061a2a..66152e2f37e 100644 --- a/spec/controllers/two_factor_authentication/totp_verification_controller_spec.rb +++ b/spec/controllers/two_factor_authentication/totp_verification_controller_spec.rb @@ -15,7 +15,7 @@ post :create, code: generate_totp_code(@secret) - expect(response).to redirect_to profile_path + expect(response).to redirect_to account_path end it 'resets the second_factor_attempts_count' do diff --git a/spec/controllers/users/emails_controller_spec.rb b/spec/controllers/users/emails_controller_spec.rb index 4981f3662e1..5084cbbdcd1 100644 --- a/spec/controllers/users/emails_controller_spec.rb +++ b/spec/controllers/users/emails_controller_spec.rb @@ -25,7 +25,7 @@ put :update, update_user_email_form: { email: new_email } - expect(response).to redirect_to profile_url + expect(response).to redirect_to account_url expect(flash[:notice]).to eq t('devise.registrations.email_update_needs_confirmation') expect(response).to render_template('devise/mailer/confirmation_instructions') expect(user.reload.email).to eq 'old_email@example.com' @@ -72,7 +72,7 @@ put :update, update_user_email_form: { email: second_user.email.upcase } - expect(response).to redirect_to profile_url + expect(response).to redirect_to account_url expect(flash[:notice]).to eq t('devise.registrations.email_update_needs_confirmation') expect(response).to render_template('user_mailer/signup_with_your_email') expect(last_email.subject).to eq t('mailer.email_reuse_notice.subject') @@ -119,7 +119,7 @@ put :update, update_user_email_form: { email: user.email } - expect(response).to redirect_to profile_url + expect(response).to redirect_to account_url expect(flash.keys).to be_empty expect(@analytics).to have_received(:track_event). with(Analytics::EMAIL_CHANGE_REQUEST, analytics_hash) diff --git a/spec/controllers/users/passwords_controller_spec.rb b/spec/controllers/users/passwords_controller_spec.rb index 4afe4abf6f3..ee55ba029b9 100644 --- a/spec/controllers/users/passwords_controller_spec.rb +++ b/spec/controllers/users/passwords_controller_spec.rb @@ -16,7 +16,7 @@ expect(@analytics).to have_received(:track_event). with(Analytics::PASSWORD_CHANGED, success: true, errors: {}) - expect(response).to redirect_to profile_url + expect(response).to redirect_to account_url expect(flash[:notice]).to eq t('notices.password_changed') expect(flash[:personal_key]).to be_nil end diff --git a/spec/controllers/users/personal_keys_controller_spec.rb b/spec/controllers/users/personal_keys_controller_spec.rb index 750e406a83b..28c492f2b79 100644 --- a/spec/controllers/users/personal_keys_controller_spec.rb +++ b/spec/controllers/users/personal_keys_controller_spec.rb @@ -51,7 +51,7 @@ patch :update - expect(response).to redirect_to profile_url + expect(response).to redirect_to account_url end end diff --git a/spec/controllers/users/phones_controller_spec.rb b/spec/controllers/users/phones_controller_spec.rb index 336b2126b62..be1dc4f75ec 100644 --- a/spec/controllers/users/phones_controller_spec.rb +++ b/spec/controllers/users/phones_controller_spec.rb @@ -87,7 +87,7 @@ put :update, update_user_phone_form: { phone: user.phone } - expect(response).to redirect_to profile_url + expect(response).to redirect_to account_url expect(flash.keys).to be_empty end end diff --git a/spec/controllers/users/reactivate_profile_controller_spec.rb b/spec/controllers/users/reactivate_profile_controller_spec.rb index 83c807c11c6..1028ebb36b3 100644 --- a/spec/controllers/users/reactivate_profile_controller_spec.rb +++ b/spec/controllers/users/reactivate_profile_controller_spec.rb @@ -27,7 +27,7 @@ it 'redirects to the profile page' do action - expect(response).to redirect_to(profile_path) + expect(response).to redirect_to(account_path) end end diff --git a/spec/controllers/users/sessions_controller_spec.rb b/spec/controllers/users/sessions_controller_spec.rb index 0a446699a4e..9be166701c8 100644 --- a/spec/controllers/users/sessions_controller_spec.rb +++ b/spec/controllers/users/sessions_controller_spec.rb @@ -293,7 +293,7 @@ subject.session[:logged_in] = true get :new - expect(response).to redirect_to profile_path + expect(response).to redirect_to account_path expect(subject.session[:logged_in]).to be true end end diff --git a/spec/controllers/users/totp_setup_controller_spec.rb b/spec/controllers/users/totp_setup_controller_spec.rb index 472b7e0d169..65674e55461 100644 --- a/spec/controllers/users/totp_setup_controller_spec.rb +++ b/spec/controllers/users/totp_setup_controller_spec.rb @@ -40,7 +40,7 @@ get :new - expect(response).to redirect_to profile_path + expect(response).to redirect_to account_path end end end @@ -89,8 +89,8 @@ patch :confirm, code: code end - it 'redirects to profile_path with a success message' do - expect(response).to redirect_to(profile_path) + it 'redirects to account_path with a success message' do + expect(response).to redirect_to(account_path) expect(flash[:success]).to eq t('notices.totp_configured') expect(subject.user_session[:new_totp_secret]).to be_nil @@ -117,7 +117,7 @@ expect(user.reload.otp_secret_key).to be_nil expect(user.reload.totp_enabled?).to be(false) - expect(response).to redirect_to(profile_path) + expect(response).to redirect_to(account_path) expect(flash[:success]).to eq t('notices.totp_disabled') expect(@analytics).to have_received(:track_event).with(Analytics::TOTP_USER_DISABLED) expect(subject).to have_received(:create_user_event).with(:authenticator_disabled) diff --git a/spec/controllers/users/two_factor_authentication_controller_spec.rb b/spec/controllers/users/two_factor_authentication_controller_spec.rb index 0a23697a133..02214bcae8c 100644 --- a/spec/controllers/users/two_factor_authentication_controller_spec.rb +++ b/spec/controllers/users/two_factor_authentication_controller_spec.rb @@ -33,7 +33,7 @@ def index it 'redirects to the profile' do get :index - expect(response).to redirect_to(profile_url) + expect(response).to redirect_to(account_url) end end @@ -60,7 +60,7 @@ def index it 'does not redirect to the profile' do get :index - expect(response).not_to redirect_to(profile_url) + expect(response).not_to redirect_to(account_url) expect(response.code).to eq('200') end end diff --git a/spec/controllers/users/verify_profile_controller_spec.rb b/spec/controllers/users/verify_profile_controller_spec.rb index 63a02b3f919..db5843382dd 100644 --- a/spec/controllers/users/verify_profile_controller_spec.rb +++ b/spec/controllers/users/verify_profile_controller_spec.rb @@ -26,7 +26,7 @@ it 'redirects to the profile page' do action - expect(response).to redirect_to(profile_path) + expect(response).to redirect_to(account_path) end end diff --git a/spec/controllers/verify/confirmations_controller_spec.rb b/spec/controllers/verify/confirmations_controller_spec.rb index a325f31990d..99bb9fccf53 100644 --- a/spec/controllers/verify/confirmations_controller_spec.rb +++ b/spec/controllers/verify/confirmations_controller_spec.rb @@ -179,7 +179,7 @@ def stub_idv_session patch :update - expect(response).to redirect_to profile_path + expect(response).to redirect_to account_path end end end diff --git a/spec/controllers/verify/sessions_controller_spec.rb b/spec/controllers/verify/sessions_controller_spec.rb index f7db0970c2e..741bccd3af1 100644 --- a/spec/controllers/verify/sessions_controller_spec.rb +++ b/spec/controllers/verify/sessions_controller_spec.rb @@ -269,7 +269,7 @@ delete :destroy expect(controller.user_session[:idv]).to eq({}) - expect(response).to redirect_to(profile_path) + expect(response).to redirect_to(account_path) end end end diff --git a/spec/decorators/user_decorator_spec.rb b/spec/decorators/user_decorator_spec.rb index ebc1c3fae4b..e8e2cf60726 100644 --- a/spec/decorators/user_decorator_spec.rb +++ b/spec/decorators/user_decorator_spec.rb @@ -140,7 +140,7 @@ context 'with a verified account' do let(:user) { create(:user, profiles: [verified_profile]) } - it { expect(partial).to eq('profile/verified_account_badge') } + it { expect(partial).to eq('accounts/verified_account_badge') } end end end diff --git a/spec/features/accessibility/user_pages_spec.rb b/spec/features/accessibility/user_pages_spec.rb index 90c17a1dc24..497081e224c 100644 --- a/spec/features/accessibility/user_pages_spec.rb +++ b/spec/features/accessibility/user_pages_spec.rb @@ -76,7 +76,7 @@ scenario 'profile page' do sign_in_and_2fa_user - visit profile_path + visit account_path expect(page).to be_accessible end diff --git a/spec/features/idv/flow_spec.rb b/spec/features/idv/flow_spec.rb index 6741d7db6a1..155305c43f6 100644 --- a/spec/features/idv/flow_spec.rb +++ b/spec/features/idv/flow_spec.rb @@ -48,7 +48,7 @@ expect(page).to have_content(t('headings.personal_key')) click_acknowledge_personal_key - expect(current_url).to eq(profile_url) + expect(current_url).to eq(account_url) expect(page).to have_content('José One') expect(page).to have_content('123 Main St') expect(user.reload.active_profile).to be_a(Profile) @@ -374,7 +374,7 @@ click_idv_cancel - expect(current_path).to eq(profile_path) + expect(current_path).to eq(account_path) end end @@ -392,7 +392,7 @@ click_on t('links.cancel_idv') click_idv_cancel_modal - expect(current_path).to eq(profile_path) + expect(current_path).to eq(account_path) end end end diff --git a/spec/features/idv/phone_spec.rb b/spec/features/idv/phone_spec.rb index 577bb75fbbf..2af68727238 100644 --- a/spec/features/idv/phone_spec.rb +++ b/spec/features/idv/phone_spec.rb @@ -41,7 +41,7 @@ enter_correct_otp_code_for_user(user) click_acknowledge_personal_key - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end end diff --git a/spec/features/saml/idp_initiated_slo_spec.rb b/spec/features/saml/idp_initiated_slo_spec.rb index 42df804b833..3fa27686a29 100644 --- a/spec/features/saml/idp_initiated_slo_spec.rb +++ b/spec/features/saml/idp_initiated_slo_spec.rb @@ -73,7 +73,7 @@ expect(logout_user.active_identities).to be_empty - visit profile_path + visit account_path expect(current_path).to eq root_path end @@ -85,7 +85,7 @@ expect(request_xmldoc.asserted_session_index).to eq(@sp1_asserted_session_index) click_button t('forms.buttons.submit.default') - visit profile_path + visit account_path expect(current_path).to eq root_path end end diff --git a/spec/features/saml/loa1_sso_spec.rb b/spec/features/saml/loa1_sso_spec.rb index 85ee65115c7..6719794512f 100644 --- a/spec/features/saml/loa1_sso_spec.rb +++ b/spec/features/saml/loa1_sso_spec.rb @@ -43,7 +43,7 @@ expect(page.get_rack_session.keys).to_not include('sp') visit root_path - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end it 'shows user the start page without accordion' do @@ -141,7 +141,7 @@ def sign_in_and_require_viewing_personal_key(user) } end - visit profile_path + visit account_path click_submit_default end diff --git a/spec/features/saml/loa3_sso_spec.rb b/spec/features/saml/loa3_sso_spec.rb index 3591c18bd34..096bcbc9478 100644 --- a/spec/features/saml/loa3_sso_spec.rb +++ b/spec/features/saml/loa3_sso_spec.rb @@ -73,7 +73,7 @@ click_on t('links.cancel') click_on t('idv.buttons.cancel') - expect(current_path).to match(profile_path) + expect(current_path).to match(account_path) end end @@ -96,7 +96,7 @@ visit verify_path click_idv_cancel - expect(current_url).to eq(profile_url) + expect(current_url).to eq(account_url) end end end diff --git a/spec/features/saml/sp_initiated_slo_spec.rb b/spec/features/saml/sp_initiated_slo_spec.rb index eb3ce173b48..5676deb3fc5 100644 --- a/spec/features/saml/sp_initiated_slo_spec.rb +++ b/spec/features/saml/sp_initiated_slo_spec.rb @@ -21,7 +21,7 @@ end it 'signs out the user from IdP' do - visit profile_path + visit account_path expect(current_path).to eq root_path end @@ -44,7 +44,7 @@ end it 'signs out the user from IdP' do - visit profile_path + visit account_path expect(current_path).to eq root_path end @@ -130,7 +130,7 @@ expect(current_url).to eq(sp2.metadata[:assertion_consumer_logout_service_url]) expect(user.active_identities.size).to eq(0) - visit profile_path + visit account_path expect(current_url).to eq root_url end end @@ -167,7 +167,7 @@ to eq('urn:oasis:names:tc:SAML:2.0:status:Success') click_button t('forms.buttons.submit.default') # LogoutResponse for originating SP: sp1 - visit profile_path + visit account_path expect(current_path).to eq root_path expect(user.active_identities.size).to eq(0) @@ -206,7 +206,7 @@ to eq('urn:oasis:names:tc:SAML:2.0:status:Success') click_button t('forms.buttons.submit.default') # LogoutResponse for originating SP: sp2 - visit profile_path + visit account_path expect(current_path).to eq root_path expect(user.active_identities.size).to eq(0) diff --git a/spec/features/two_factor_authentication/change_factor_spec.rb b/spec/features/two_factor_authentication/change_factor_spec.rb index 3d9e2e3efca..76dbb1a4c8f 100644 --- a/spec/features/two_factor_authentication/change_factor_spec.rb +++ b/spec/features/two_factor_authentication/change_factor_spec.rb @@ -28,7 +28,7 @@ complete_2fa_confirmation update_phone_number - expect(page).to have_link t('links.cancel'), href: profile_path + expect(page).to have_link t('links.cancel'), href: account_path expect(page).to have_link t('forms.two_factor.try_again'), href: manage_phone_path expect(page).not_to have_content( t('devise.two_factor_authentication.personal_key_fallback.text_html') @@ -42,14 +42,14 @@ submit_correct_otp - expect(current_path).to eq profile_path + expect(current_path).to eq account_path expect(UserMailer).to have_received(:phone_changed).with(user) expect(mailer).to have_received(:deliver_later) expect(page).to have_content new_phone expect(user.reload.phone_confirmed_at).to_not eq(@previous_phone_confirmed_at) visit login_two_factor_path(otp_delivery_preference: 'sms') - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end scenario 'waiting too long to change phone number' do @@ -136,7 +136,7 @@ expect(current_path).to eq manage_phone_path update_phone_number - expect(page).to have_link t('links.cancel'), href: profile_path + expect(page).to have_link t('links.cancel'), href: account_path end end end diff --git a/spec/features/two_factor_authentication/sign_in_spec.rb b/spec/features/two_factor_authentication/sign_in_spec.rb index f5211bdacf5..80d33721990 100644 --- a/spec/features/two_factor_authentication/sign_in_spec.rb +++ b/spec/features/two_factor_authentication/sign_in_spec.rb @@ -35,7 +35,7 @@ end def attempt_to_bypass_2fa_setup - visit profile_path + visit account_path end def send_security_code_without_entering_phone_number @@ -73,11 +73,11 @@ def submit_2fa_setup_form_with_valid_phone_and_choose_phone_call_delivery submit_prefilled_otp_code - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end def attempt_to_bypass_2fa - visit profile_path + visit account_path end def submit_prefilled_otp_code @@ -139,7 +139,7 @@ def submit_prefilled_otp_code sign_in_before_2fa(user) click_button t('forms.buttons.submit.default') - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end end @@ -152,7 +152,7 @@ def submit_prefilled_otp_code expect(page).to have_content t('devise.two_factor_authentication.' \ 'max_generic_login_attempts_reached') - visit profile_path + visit account_path expect(current_path).to eq root_path end @@ -229,7 +229,7 @@ def submit_prefilled_otp_code click_acknowledge_personal_key - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end end @@ -238,11 +238,11 @@ def submit_prefilled_otp_code sign_in_and_2fa_user visit login_two_factor_path(otp_delivery_preference: 'sms') - expect(current_path).to eq profile_path + expect(current_path).to eq account_path visit user_two_factor_authentication_path - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end end diff --git a/spec/features/two_factor_authentication/sign_in_via_personal_key_spec.rb b/spec/features/two_factor_authentication/sign_in_via_personal_key_spec.rb index 77a3c3444d3..b125e56343c 100644 --- a/spec/features/two_factor_authentication/sign_in_via_personal_key_spec.rb +++ b/spec/features/two_factor_authentication/sign_in_via_personal_key_spec.rb @@ -15,7 +15,7 @@ click_acknowledge_personal_key expect(user.reload.personal_key).to_not eq personal_key - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end context 'user enters incorrect personal key' do diff --git a/spec/features/users/regenerate_personal_key_spec.rb b/spec/features/users/regenerate_personal_key_spec.rb index 8db2d3208e7..26927907574 100644 --- a/spec/features/users/regenerate_personal_key_spec.rb +++ b/spec/features/users/regenerate_personal_key_spec.rb @@ -10,7 +10,7 @@ visit sign_up_personal_key_path - expect(current_path).to eq(profile_path) + expect(current_path).to eq(account_path) end end @@ -20,7 +20,7 @@ user = sign_in_and_2fa_user old_code = user.personal_key - click_link t('profile.links.regenerate_personal_key') + click_link t('account.links.regenerate_personal_key') expect(user.reload.personal_key).to_not eq old_code end @@ -36,7 +36,7 @@ first(:link, t('forms.buttons.edit')).click click_on(t('links.cancel')) - click_on(t('profile.links.regenerate_personal_key')) + click_on(t('account.links.regenerate_personal_key')) expect(user.reload.personal_key).to_not eq old_code end @@ -45,7 +45,7 @@ context 'personal key actions and information' do before do @user = sign_in_and_2fa_user - click_link t('profile.links.regenerate_personal_key') + click_link t('account.links.regenerate_personal_key') end it_behaves_like 'personal key page' @@ -58,7 +58,7 @@ it 'prompts the user to enter their personal key to confirm they have it' do sign_in_and_2fa_user - click_link t('profile.links.regenerate_personal_key') + click_link t('account.links.regenerate_personal_key') expect_accordion_content_to_be_hidden_by_default @@ -81,12 +81,12 @@ click_acknowledge_personal_key submit_form_without_entering_the_code - expect(current_path).not_to eq profile_path + expect(current_path).not_to eq account_path visit manage_personal_key_path acknowledge_and_confirm_personal_key - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end end end diff --git a/spec/features/users/sign_in_spec.rb b/spec/features/users/sign_in_spec.rb index 1d84e75f301..2e0ec853185 100644 --- a/spec/features/users/sign_in_spec.rb +++ b/spec/features/users/sign_in_spec.rb @@ -44,12 +44,12 @@ scenario 'user session expires in amount of time specified by Devise config' do sign_in_and_2fa_user - visit profile_path - expect(current_path).to eq profile_path + visit account_path + expect(current_path).to eq account_path Timecop.travel(Devise.timeout_in + 1.minute) - visit profile_path + visit account_path expect(current_path).to eq root_path Timecop.return @@ -86,7 +86,7 @@ scenario 'user can continue browsing' do find_link(t('notices.timeout_warning.signed_in.continue')).trigger('click') - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end scenario 'user has option to sign out' do @@ -197,17 +197,17 @@ perform_in_browser(:one) do sign_in_live_with_2fa(user) - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end perform_in_browser(:two) do sign_in_live_with_2fa(user) - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end perform_in_browser(:one) do - visit profile_path + visit account_path expect(current_path).to eq new_user_session_path expect(page).to have_content(t('devise.failure.session_limited')) diff --git a/spec/features/users/user_profile_spec.rb b/spec/features/users/user_profile_spec.rb index e1be59dd71e..6c69d0637db 100644 --- a/spec/features/users/user_profile_spec.rb +++ b/spec/features/users/user_profile_spec.rb @@ -10,7 +10,7 @@ let(:profile) { create(:profile, :active, :verified, pii: { ssn: '111', dob: '1920-01-01' }) } it 'shows a "Verified Account" badge with no tooltip' do - expect(page).to have_content(t('headings.profile.verified_account')) + expect(page).to have_content(t('headings.account.verified_account')) end end end @@ -19,7 +19,7 @@ xit 'deletes the account and signs the user out with a flash message' do pending 'temporarily disabled until we figure out the MBUN to SSN mapping' sign_in_and_2fa_user - visit profile_path + visit account_path click_button t('forms.buttons.delete_account') click_button t('forms.buttons.delete_account_confirm') @@ -47,7 +47,7 @@ click_button 'Update' - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end context 'LOA3 user' do @@ -59,7 +59,7 @@ fill_in 'update_user_password_form_password', with: 'this is a great sentence' click_button 'Update' - expect(current_path).to eq profile_path + expect(current_path).to eq account_path expect(page).to have_content(t('idv.messages.personal_key')) end end diff --git a/spec/features/users/verify_profile_spec.rb b/spec/features/users/verify_profile_spec.rb index 8c04d3e2f49..b47cc7c4eab 100644 --- a/spec/features/users/verify_profile_spec.rb +++ b/spec/features/users/verify_profile_spec.rb @@ -16,17 +16,17 @@ scenario 'received OTP via USPS' do sign_in_live_with_2fa(user) - expect(current_path).to eq profile_path + expect(current_path).to eq account_path - click_on t('profile.index.verification.reactivate_button') + click_on t('account.index.verification.reactivate_button') expect(current_path).to eq verify_profile_path fill_in 'Secret code', with: otp click_button t('forms.verify_profile.submit') - expect(current_path).to eq profile_path - expect(page).to_not have_content(t('profile.index.verification.reactivate_button')) + expect(current_path).to eq account_path + expect(page).to_not have_content(t('account.index.verification.reactivate_button')) end xscenario 'OTP has expired' do @@ -36,7 +36,7 @@ scenario 'wrong OTP used' do sign_in_live_with_2fa(user) - click_on t('profile.index.verification.reactivate_button') + click_on t('account.index.verification.reactivate_button') fill_in 'Secret code', with: 'the wrong code' click_button t('forms.verify_profile.submit') diff --git a/spec/features/visitors/email_confirmation_spec.rb b/spec/features/visitors/email_confirmation_spec.rb index e42983a1ccf..f57613a64d7 100644 --- a/spec/features/visitors/email_confirmation_spec.rb +++ b/spec/features/visitors/email_confirmation_spec.rb @@ -61,7 +61,7 @@ visit sign_up_create_email_confirmation_url(confirmation_token: @raw_confirmation_token) - expect(current_url).to eq profile_url + expect(current_url).to eq account_url end end diff --git a/spec/features/visitors/password_recovery_spec.rb b/spec/features/visitors/password_recovery_spec.rb index ab04cacb95f..c4f5a0b37c6 100644 --- a/spec/features/visitors/password_recovery_spec.rb +++ b/spec/features/visitors/password_recovery_spec.rb @@ -121,7 +121,7 @@ fill_in 'code', with: @user.reload.direct_otp click_button t('forms.buttons.submit.default') - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end end @@ -161,7 +161,7 @@ expect(last_email.subject).to eq t('devise.mailer.password_updated.subject') - visit profile_path + visit account_path expect(current_path).to eq new_user_session_path end end diff --git a/spec/features/visitors/phone_confirmation_spec.rb b/spec/features/visitors/phone_confirmation_spec.rb index 934d7f291a7..b32f556c6c7 100644 --- a/spec/features/visitors/phone_confirmation_spec.rb +++ b/spec/features/visitors/phone_confirmation_spec.rb @@ -24,7 +24,7 @@ click_acknowledge_personal_key - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end it 'allows user to resend confirmation code' do diff --git a/spec/features/visitors/sign_up_with_email_spec.rb b/spec/features/visitors/sign_up_with_email_spec.rb index c2897b35c77..d90542698ea 100644 --- a/spec/features/visitors/sign_up_with_email_spec.rb +++ b/spec/features/visitors/sign_up_with_email_spec.rb @@ -51,6 +51,6 @@ visit sign_up_email_path sign_up_and_2fa_loa1_user - expect(current_path).to eq profile_path + expect(current_path).to eq account_path end end diff --git a/spec/requests/redirects_spec.rb b/spec/requests/redirects_spec.rb new file mode 100644 index 00000000000..41d75f95acf --- /dev/null +++ b/spec/requests/redirects_spec.rb @@ -0,0 +1,11 @@ +require 'rails_helper' + +RSpec.describe 'Redirecting Legacy Routes', type: :request do + describe '/profile' do + it 'redirects to /account' do + get '/profile' + + expect(response).to redirect_to('/account') + end + end +end diff --git a/spec/support/controller_helper.rb b/spec/support/controller_helper.rb index f74c5c3c217..bc351b2acb1 100644 --- a/spec/support/controller_helper.rb +++ b/spec/support/controller_helper.rb @@ -11,7 +11,7 @@ def sign_in_before_2fa(user = create(:user, :signed_up)) sign_in_as_user(user) controller.current_user.send_new_otp allow(controller).to receive(:user_fully_authenticated?).and_return(false) - allow(controller).to receive(:signed_in_path).and_return(profile_path) + allow(controller).to receive(:signed_in_path).and_return(account_path) end def stub_sign_in(user = build(:user, password: VALID_PASSWORD)) @@ -29,7 +29,7 @@ def stub_sign_in_before_2fa(user = build(:user, password: VALID_PASSWORD)) allow(request.env['warden']).to receive(:session).and_return(user: {}) allow(controller).to receive(:current_user).and_return(user) allow(controller).to receive(:user_fully_authenticated?).and_return(false) - allow(controller).to receive(:signed_in_path).and_return(profile_path) + allow(controller).to receive(:signed_in_path).and_return(account_path) end def stub_verify_steps_one_and_two(user) diff --git a/spec/support/features/session_helper.rb b/spec/support/features/session_helper.rb index 8ebc5f276e7..c6cdd446e8f 100644 --- a/spec/support/features/session_helper.rb +++ b/spec/support/features/session_helper.rb @@ -45,7 +45,7 @@ def begin_sign_up_with_sp_and_loa(loa3:) session[:sp] = { loa3: loa3, issuer: sp.issuer } end - visit profile_path + visit account_path fill_in 'Phone', with: '202-555-1212' click_send_security_code user @@ -75,7 +75,7 @@ def sign_in_before_2fa(user = create(:user)) end end - visit profile_path + visit account_path user end @@ -87,7 +87,7 @@ def sign_in_with_warden(user) session = proxy.env['rack.session'] session['warden.user.user.session'] = { authn_at: Time.zone.now } end - visit profile_path + visit account_path end def sign_in_and_2fa_user(user = user_with_2fa) diff --git a/spec/view_models/profile_index_spec.rb b/spec/view_models/account_show_spec.rb similarity index 76% rename from spec/view_models/profile_index_spec.rb rename to spec/view_models/account_show_spec.rb index dd4ff4999af..4fecd16d0c9 100644 --- a/spec/view_models/profile_index_spec.rb +++ b/spec/view_models/account_show_spec.rb @@ -1,17 +1,17 @@ require 'rails_helper' -describe ProfileIndex do - let(:unverified_view_model) { unverified_profile_index } +describe AccountShow do + let(:unverified_view_model) { unverified_account_show } describe '#header_partial' do it 'returns a basic header when user\'s identity is unverified' do - expect(unverified_view_model.header_partial).to eq('profile/header') + expect(unverified_view_model.header_partial).to eq('accounts/header') end it 'returns a verified header when user identity is verified' do view_model = verified_profile_index - expect(view_model.header_partial).to eq('profile/verified_header') + expect(view_model.header_partial).to eq('accounts/verified_header') end end @@ -21,9 +21,9 @@ end it 'returns personal_key partial when a new personal key is present' do - view_model = unverified_profile_index(personal_key: '123') + view_model = unverified_account_show(personal_key: '123') - expect(view_model.personal_key_partial).to eq('profile/personal_key') + expect(view_model.personal_key_partial).to eq('accounts/personal_key') end end @@ -34,13 +34,13 @@ it 'returns password reset alert partial when password reset flag present' do user = create(:profile, deactivation_reason: 1).user.decorate - view_model = ProfileIndex.new( + view_model = AccountShow.new( decrypted_pii: nil, personal_key: nil, decorated_user: user ) - expect(view_model.password_reset_partial).to eq('profile/password_reset') + expect(view_model.password_reset_partial).to eq('accounts/password_reset') end end @@ -51,13 +51,13 @@ it 'returns pending profile alert partial when pending profile flag present' do user = create(:profile, deactivation_reason: 3).user.decorate - view_model = ProfileIndex.new( + view_model = AccountShow.new( decrypted_pii: nil, personal_key: nil, decorated_user: user ) - expect(view_model.pending_profile_partial).to eq('profile/pending_profile') + expect(view_model.pending_profile_partial).to eq('accounts/pending_profile') end end @@ -67,14 +67,14 @@ end it 'returns pii partial when user is verified' do - expect(verified_profile_index.pii_partial).to eq('profile/pii') + expect(verified_profile_index.pii_partial).to eq('accounts/pii') end end describe '#edit_action_partial' do it 'returns edit action button partial' do expect(unverified_view_model.edit_action_partial).to( - eq('profile/actions/edit_action_button') + eq('accounts/actions/edit_action_button') ) end end @@ -82,7 +82,7 @@ describe '#personal_key_action_partial' do it 'returns manage personal key action partial' do expect(unverified_view_model.personal_key_action_partial).to( - eq('profile/actions/manage_personal_key') + eq('accounts/actions/manage_personal_key') ) end end @@ -90,14 +90,14 @@ describe '#personal_key_item_partial' do it 'returns personal key item heading partial' do expect(unverified_view_model.personal_key_item_partial).to( - eq('profile/personal_key_item_heading') + eq('accounts/personal_key_item_heading') ) end end describe '#recent_event_partial' do it 'returns partial to format a single recent user event' do - expect(unverified_view_model.recent_event_partial).to eq('profile/event_item') + expect(unverified_view_model.recent_event_partial).to eq('accounts/event_item') end end @@ -105,7 +105,7 @@ context 'with totp enabled' do before do user = build_stubbed(:user, otp_secret_key: '123').decorate - @view_model = ProfileIndex.new( + @view_model = AccountShow.new( decrypted_pii: nil, personal_key: nil, decorated_user: user @@ -114,13 +114,13 @@ describe '#totp_partial' do it 'returns a partial to disable totp if active' do - expect(@view_model.totp_partial).to eq('profile/actions/disable_totp') + expect(@view_model.totp_partial).to eq('accounts/actions/disable_totp') end end describe '#totp_content' do it 'returns auth app enabled message' do - expect(@view_model.totp_content).to eq('profile.index.auth_app_enabled') + expect(@view_model.totp_content).to eq('account.index.auth_app_enabled') end end end @@ -128,13 +128,13 @@ context 'with totp disabled' do describe '#totp_partial' do it 'returns a partial to enable totp' do - expect(unverified_view_model.totp_partial).to eq('profile/actions/enable_totp') + expect(unverified_view_model.totp_partial).to eq('accounts/actions/enable_totp') end end describe '#totp_content' do it 'returns auth app disabled message' do - expect(unverified_view_model.totp_content).to eq('profile.index.auth_app_disabled') + expect(unverified_view_model.totp_content).to eq('account.index.auth_app_disabled') end end end @@ -153,7 +153,7 @@ describe '#recent_events' do it 'exposes recent_events method from decorated_user' do - expect(unverified_profile_index).to respond_to(:recent_events) + expect(unverified_account_show).to respond_to(:recent_events) end end @@ -163,15 +163,15 @@ def verified_profile_index(personal_key: nil) user_access_key = user.unlock_user_access_key(user.password) decrypted_pii = profile.decrypt_pii(user_access_key) - ProfileIndex.new( + AccountShow.new( decrypted_pii: decrypted_pii, personal_key: personal_key, decorated_user: user.decorate ) end - def unverified_profile_index(personal_key: nil) - ProfileIndex.new( + def unverified_account_show(personal_key: nil) + AccountShow.new( decrypted_pii: nil, personal_key: personal_key, decorated_user: unverified_decorated_user diff --git a/spec/views/profile/_nav_auth.html.slim_spec.rb b/spec/views/accounts/_nav_auth.html.slim_spec.rb similarity index 94% rename from spec/views/profile/_nav_auth.html.slim_spec.rb rename to spec/views/accounts/_nav_auth.html.slim_spec.rb index c771dce63b4..73f34b37edd 100644 --- a/spec/views/profile/_nav_auth.html.slim_spec.rb +++ b/spec/views/accounts/_nav_auth.html.slim_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'profile/_nav_auth.html.slim' do +describe 'accounts/_nav_auth.html.slim' do context 'user is signed in' do before do @user = build_stubbed(:user, :signed_up) diff --git a/spec/views/profile/index.html.slim_spec.rb b/spec/views/accounts/show.html.slim_spec.rb similarity index 78% rename from spec/views/profile/index.html.slim_spec.rb rename to spec/views/accounts/show.html.slim_spec.rb index 58a90fb5e45..36bd5e12d77 100644 --- a/spec/views/profile/index.html.slim_spec.rb +++ b/spec/views/accounts/show.html.slim_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'profile/index.html.slim' do +describe 'accounts/show.html.slim' do let(:user) { build_stubbed(:user, :signed_up) } let(:decorated_user) { user.decorate } @@ -9,13 +9,13 @@ allow(view).to receive(:current_user).and_return(user) assign( :view_model, - ProfileIndex.new(decrypted_pii: nil, personal_key: nil, decorated_user: decorated_user) + AccountShow.new(decrypted_pii: nil, personal_key: nil, decorated_user: decorated_user) ) end context 'user is not TOTP enabled' do it 'has a localized title' do - expect(view).to receive(:title).with(t('titles.profile')) + expect(view).to receive(:title).with(t('titles.account')) render end @@ -43,7 +43,7 @@ before do assign( :view_model, - ProfileIndex.new(decrypted_pii: nil, personal_key: nil, decorated_user: decorated_user) + AccountShow.new(decrypted_pii: nil, personal_key: nil, decorated_user: decorated_user) ) end @@ -63,9 +63,9 @@ it 'contains a personal key section' do render - expect(rendered).to have_content t('profile.items.personal_key') + expect(rendered).to have_content t('account.items.personal_key') expect(rendered). - to have_link(t('profile.links.regenerate_personal_key'), href: manage_personal_key_path) + to have_link(t('account.links.regenerate_personal_key'), href: manage_personal_key_path) end end @@ -77,9 +77,9 @@ it 'lacks a personal key section' do render - expect(rendered).to_not have_content t('profile.items.personal_key') + expect(rendered).to_not have_content t('account.items.personal_key') expect(rendered).to_not have_link( - t('profile.links.regenerate_personal_key'), href: manage_personal_key_path + t('account.links.regenerate_personal_key'), href: manage_personal_key_path ) end end @@ -93,7 +93,7 @@ render expect(rendered).to_not have_link( - t('profile.index.verification.reactivate_button'), href: verify_profile_path + t('account.index.verification.reactivate_button'), href: verify_profile_path ) end end @@ -107,14 +107,14 @@ render expect(rendered). - to have_link(t('profile.index.verification.reactivate_button'), href: verify_profile_path) + to have_link(t('account.index.verification.reactivate_button'), href: verify_profile_path) end end it 'contains account history' do render - expect(rendered).to have_content t('headings.profile.account_history') + expect(rendered).to have_content t('headings.account.account_history') end it 'shows the auth nav bar' do diff --git a/spec/views/layouts/application.html.slim_spec.rb b/spec/views/layouts/application.html.slim_spec.rb index c3732208edb..6f1cad2eb03 100644 --- a/spec/views/layouts/application.html.slim_spec.rb +++ b/spec/views/layouts/application.html.slim_spec.rb @@ -17,7 +17,7 @@ render expect(rendered).to have_xpath('//nav[contains(@class, "bg-light-blue")]') - expect(rendered).to_not have_content(t('profile.welcome')) + expect(rendered).to_not have_content(t('account.welcome')) expect(rendered).to_not have_link(t('links.sign_out'), href: destroy_user_session_path) end end 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 8a1235b5870..ff54370186c 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 @@ -96,7 +96,7 @@ it 'provides a cancel link to return to profile' do expect(rendered).to have_link( t('links.cancel'), - href: profile_path + href: account_path ) end @@ -121,7 +121,7 @@ expect(rendered).to have_link( t('links.cancel'), - href: profile_path + href: account_path ) end end diff --git a/spec/views/two_factor_authentication/totp_verification/show.html.slim_spec.rb b/spec/views/two_factor_authentication/totp_verification/show.html.slim_spec.rb index 3d0fe13854f..1b7e4724516 100644 --- a/spec/views/two_factor_authentication/totp_verification/show.html.slim_spec.rb +++ b/spec/views/two_factor_authentication/totp_verification/show.html.slim_spec.rb @@ -62,7 +62,7 @@ it 'provides a cancel link to return to profile' do expect(rendered).to have_link( t('links.cancel'), - href: profile_path + href: account_path ) end