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 98f6fbcfb9a..c85fc9e4071 100644 --- a/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb @@ -4,13 +4,6 @@ def header t('two_factor_authentication.totp_header_text') end - def help_text - t( - 'instructions.mfa.authenticator.confirm_code_html', - app_name_html: content_tag(:strong, APP_NAME), - ) - end - def fallback_question t('two_factor_authentication.totp_fallback.question') end diff --git a/app/presenters/two_factor_auth_code/backup_code_presenter.rb b/app/presenters/two_factor_auth_code/backup_code_presenter.rb index fc4df267ffc..9ff4e35abb7 100644 --- a/app/presenters/two_factor_auth_code/backup_code_presenter.rb +++ b/app/presenters/two_factor_auth_code/backup_code_presenter.rb @@ -2,10 +2,6 @@ module TwoFactorAuthCode class BackupCodePresenter < TwoFactorAuthCode::GenericDeliveryPresenter include ActionView::Helpers::TranslationHelper - def help_text - '' - end - def cancel_link if reauthn account_path diff --git a/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb b/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb index d30266f8526..28d6d6fc4a6 100644 --- a/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb @@ -19,10 +19,6 @@ def header raise NotImplementedError end - def help_text - raise NotImplementedError - end - def link_text t('two_factor_authentication.login_options_link_text') end diff --git a/app/presenters/two_factor_auth_code/personal_key_presenter.rb b/app/presenters/two_factor_auth_code/personal_key_presenter.rb index 428307a1095..5a1aeee1e06 100644 --- a/app/presenters/two_factor_auth_code/personal_key_presenter.rb +++ b/app/presenters/two_factor_auth_code/personal_key_presenter.rb @@ -2,10 +2,6 @@ module TwoFactorAuthCode class PersonalKeyPresenter < TwoFactorAuthCode::GenericDeliveryPresenter def initialize; end - def help_text - '' - end - def fallback_question t('two_factor_authentication.personal_key_fallback.question') 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 ecd2fb45be3..49f436644f9 100644 --- a/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb @@ -41,10 +41,6 @@ def fallback_question t('two_factor_authentication.phone_fallback.question') end - def help_text - '' - end - def troubleshooting_header t('components.troubleshooting_options.default_heading') end diff --git a/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb b/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb index deaefaaf425..ab67d0327f3 100644 --- a/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb +++ b/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb @@ -18,10 +18,6 @@ def piv_cac_help end end - def help_text - '' - end - def piv_cac_capture_text t('forms.piv_cac_mfa.submit') end diff --git a/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb b/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb index 1d68fc3d42d..7b143474850 100644 --- a/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb +++ b/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb @@ -37,10 +37,6 @@ def authenticate_button_text end end - def help_text - '' - end - def header if platform_authenticator? t('two_factor_authentication.webauthn_platform_header_text') diff --git a/app/views/shared/_fallback_links.html.erb b/app/views/shared/_fallback_links.html.erb index 4737ce72ff5..b24bc11988b 100644 --- a/app/views/shared/_fallback_links.html.erb +++ b/app/views/shared/_fallback_links.html.erb @@ -1,7 +1,4 @@ -
- <% if @presenter.help_text.present? %> -

<%= @presenter.help_text %>

- <% end %> +

<%= @presenter.fallback_question %>

diff --git a/app/views/two_factor_authentication/backup_code_verification/show.html.erb b/app/views/two_factor_authentication/backup_code_verification/show.html.erb index 4f8318b3c3a..7516e477e25 100644 --- a/app/views/two_factor_authentication/backup_code_verification/show.html.erb +++ b/app/views/two_factor_authentication/backup_code_verification/show.html.erb @@ -12,7 +12,7 @@ html: { autocomplete: 'off', method: :post }, ) do |f| %> <%= render 'partials/backup_code/entry_fields', f: f, attribute_name: :backup_code %> - <%= f.submit t('forms.buttons.submit.default') %> + <%= f.submit t('forms.buttons.submit.default'), class: 'display-block margin-y-5' %> <% end %> <%= render 'shared/fallback_links', presenter: @presenter %> diff --git a/app/views/two_factor_authentication/personal_key_verification/show.html.erb b/app/views/two_factor_authentication/personal_key_verification/show.html.erb index 7a7ad3b29e4..0e15b428285 100644 --- a/app/views/two_factor_authentication/personal_key_verification/show.html.erb +++ b/app/views/two_factor_authentication/personal_key_verification/show.html.erb @@ -11,7 +11,7 @@ html: { autocomplete: 'off', method: :post } ) do |f| %> <%= render 'partials/personal_key/entry_fields', f: f, attribute_name: :personal_key %> - <%= f.submit t('forms.buttons.submit.default') %> + <%= f.submit t('forms.buttons.submit.default'), class: 'display-block margin-y-5' %> <% end %> <%= render 'shared/fallback_links', presenter: @presenter %> diff --git a/app/views/two_factor_authentication/piv_cac_verification/show.html.erb b/app/views/two_factor_authentication/piv_cac_verification/show.html.erb index 662c35876eb..81d64fa01d1 100644 --- a/app/views/two_factor_authentication/piv_cac_verification/show.html.erb +++ b/app/views/two_factor_authentication/piv_cac_verification/show.html.erb @@ -6,12 +6,14 @@ <%= @presenter.piv_cac_help %>

-<%= render SpinnerButtonComponent.new( - action: ->(**tag_options, &block) do - link_to(@presenter.piv_cac_service_link, **tag_options, &block) - end, - big: true, - wide: true, - ).with_content(@presenter.piv_cac_capture_text) %> +
+ <%= render SpinnerButtonComponent.new( + action: ->(**tag_options, &block) do + link_to(@presenter.piv_cac_service_link, **tag_options, &block) + end, + big: true, + wide: true, + ).with_content(@presenter.piv_cac_capture_text) %> +
<%= render 'shared/fallback_links', presenter: @presenter %> <%= render 'shared/cancel', link: @presenter.cancel_link %> diff --git a/app/views/two_factor_authentication/totp_verification/show.html.erb b/app/views/two_factor_authentication/totp_verification/show.html.erb index 79ec2746cfe..6285af8c435 100644 --- a/app/views/two_factor_authentication/totp_verification/show.html.erb +++ b/app/views/two_factor_authentication/totp_verification/show.html.erb @@ -26,5 +26,12 @@ <%= f.submit t('forms.buttons.submit.default'), class: 'display-block margin-top-5' %> <% end %> +

+ <%= t( + 'instructions.mfa.authenticator.confirm_code_html', + app_name_html: content_tag(:strong, APP_NAME), + ) %> +

+ <%= render 'shared/fallback_links', presenter: @presenter %> <%= render 'shared/cancel', link: @presenter.cancel_link %> diff --git a/spec/presenters/two_factor_auth_code/backup_code_presenter_spec.rb b/spec/presenters/two_factor_auth_code/backup_code_presenter_spec.rb index 8e0d0747460..4206a4eb27f 100644 --- a/spec/presenters/two_factor_auth_code/backup_code_presenter_spec.rb +++ b/spec/presenters/two_factor_auth_code/backup_code_presenter_spec.rb @@ -28,10 +28,4 @@ '/account' end end - - describe '#help_text' do - it 'returns blank' do - expect(presenter.help_text).to eq '' - end - end end diff --git a/spec/presenters/two_factor_auth_code/generic_delivery_presenter_spec.rb b/spec/presenters/two_factor_auth_code/generic_delivery_presenter_spec.rb index b27b8af628c..23aecc25140 100644 --- a/spec/presenters/two_factor_auth_code/generic_delivery_presenter_spec.rb +++ b/spec/presenters/two_factor_auth_code/generic_delivery_presenter_spec.rb @@ -6,7 +6,7 @@ it 'is an abstract presenter with methods that should be implemented' do presenter = presenter_with - %w[header help_text fallback_links].each do |m| + %w[header fallback_links].each do |m| expect { presenter.send(m.to_sym) }.to raise_error(NotImplementedError) end end diff --git a/spec/presenters/two_factor_auth_code/personal_key_presenter_spec.rb b/spec/presenters/two_factor_auth_code/personal_key_presenter_spec.rb index 11435b98c46..9dcad3d0870 100644 --- a/spec/presenters/two_factor_auth_code/personal_key_presenter_spec.rb +++ b/spec/presenters/two_factor_auth_code/personal_key_presenter_spec.rb @@ -13,10 +13,4 @@ t('two_factor_authentication.personal_key_fallback.question') end end - - describe '#help_text' do - it 'returns blank' do - expect(presenter.help_text).to eq '' - end - end end diff --git a/spec/presenters/two_factor_auth_code/piv_cac_authentication_presenter_spec.rb b/spec/presenters/two_factor_auth_code/piv_cac_authentication_presenter_spec.rb index 38bcadca7f7..936f16b3b51 100644 --- a/spec/presenters/two_factor_auth_code/piv_cac_authentication_presenter_spec.rb +++ b/spec/presenters/two_factor_auth_code/piv_cac_authentication_presenter_spec.rb @@ -91,12 +91,6 @@ end end - describe 'help_text' do - it 'supplies no help text' do - expect(presenter.help_text).to eq('') - end - end - describe '#link_text' do let(:phishing_resistant_required) { true } diff --git a/spec/presenters/two_factor_auth_code/webauthn_authentication_presenter_spec.rb b/spec/presenters/two_factor_auth_code/webauthn_authentication_presenter_spec.rb index 7d3292bd647..3a4ab64a054 100644 --- a/spec/presenters/two_factor_auth_code/webauthn_authentication_presenter_spec.rb +++ b/spec/presenters/two_factor_auth_code/webauthn_authentication_presenter_spec.rb @@ -137,12 +137,6 @@ end end - describe '#help_text' do - it 'supplies no help text' do - expect(presenter.help_text).to eq('') - end - end - describe '#link_text' do let(:phishing_resistant_required) { true } diff --git a/spec/views/two_factor_authentication/otp_verification/show.html.erb_spec.rb b/spec/views/two_factor_authentication/otp_verification/show.html.erb_spec.rb index 1b0d8f24333..e7303fe16a6 100644 --- a/spec/views/two_factor_authentication/otp_verification/show.html.erb_spec.rb +++ b/spec/views/two_factor_authentication/otp_verification/show.html.erb_spec.rb @@ -54,30 +54,16 @@ end end - context 'OTP copy' do - let(:help_text) do + it 'informs the user that an OTP has been sent to their number' do + render + + expect(rendered).to include( t( 'instructions.mfa.sms.number_message_html', number_html: content_tag(:strong, presenter_data[:phone_number]), expiration: TwoFactorAuthenticatable::DIRECT_OTP_VALID_FOR_MINUTES, - ) - end - - it 'informs the user that an OTP has been sent to their number via #help_text' do - render - - expect(rendered).to include help_text - end - - context 'in other locales' do - before { I18n.locale = :es } - - it 'translates correctly' do - render - - expect(rendered).to include help_text - end - end + ), + ) end context 'user signed up' do