diff --git a/app/views/users/phone_setup/index.html.slim b/app/views/users/phone_setup/index.html.slim index f6ddb4f5c43..7728c1797f2 100644 --- a/app/views/users/phone_setup/index.html.slim +++ b/app/views/users/phone_setup/index.html.slim @@ -21,7 +21,8 @@ p.mt-tiny.mb0 = @presenter.info input_html: { class: 'phone col-8 mb4' } = f.button :submit, t('forms.buttons.send_security_code') .mt2.pt1.border-top - = link_to t('devise.two_factor_authentication.two_factor_choice_cancel'), two_factor_options_path + - path = current_user.piv_cac_enabled? ? account_recovery_setup_path : two_factor_options_path + = link_to t('devise.two_factor_authentication.two_factor_choice_cancel'), path = stylesheet_link_tag 'intl-tel-number/intlTelInput' = javascript_pack_tag 'intl-tel-input' diff --git a/spec/support/shared_examples/account_creation.rb b/spec/support/shared_examples/account_creation.rb index b5f0381ea93..afe342b0246 100644 --- a/spec/support/shared_examples/account_creation.rb +++ b/spec/support/shared_examples/account_creation.rb @@ -77,6 +77,12 @@ expect(page).to have_current_path(account_recovery_setup_path) expect(page).to have_content t('instructions.account_recovery_setup.piv_cac_next_step') + + select_2fa_option('sms') + click_link t('devise.two_factor_authentication.two_factor_choice_cancel') + + expect(page).to have_current_path account_recovery_setup_path + configure_backup_phone click_acknowledge_personal_key