Commit e13a197c authored by Paul Slaughter's avatar Paul Slaughter

Merge branch...

Merge branch '297366-the-banner-prompting-users-to-check-their-account-recovery-settings-causes-confusion' into 'master'

Update copy in account recovery settings global alert

See merge request gitlab-org/gitlab!66693
parents 67bfef2c f30bd5cd
.gl-alert.gl-alert-warning.js-recovery-settings-callout{ role: 'alert', data: { feature_id: "account_recovery_regular_check", dismiss_endpoint: user_callouts_path, defer_links: "true" } }
%button.js-close.gl-alert-dismiss.gl-cursor-pointer{ type: 'button', 'aria-label' => _('Dismiss') }
= sprite_icon('close', css_class: 'gl-icon')
= render 'shared/global_alert',
variant: :warning,
alert_class: 'js-recovery-settings-callout',
alert_data: { feature_id: 'account_recovery_regular_check', dismiss_endpoint: user_callouts_path, defer_links: 'true' } do
.gl-alert-body
- account_link_start = '<a class="deferred-link" href="%{url}">'.html_safe % { url: profile_account_path }
= _("Please ensure your account's %{account_link_start}recovery settings%{account_link_end} are up to date.").html_safe % { account_link_start: account_link_start, account_link_end: '</a>'.html_safe }
= s_('Profiles|We recommend you ensure two-factor authentication is enabled and the settings are up to date.')
= link_to _('Learn more.'), help_page_path('user/profile/account/two_factor_authentication'), target: '_blank', rel: 'noopener noreferrer'
.gl-alert-actions
= link_to profile_two_factor_auth_path, class: 'deferred-link btn gl-alert-action btn-confirm btn-md gl-button' do
= s_('Profiles|Manage two-factor authentication')
......@@ -5,25 +5,27 @@ require 'spec_helper'
RSpec.describe 'Account recovery regular check callout' do
context 'when signed in' do
let(:user) { create(:user, created_at: 4.months.ago ) }
let(:message) { "Please ensure your account's recovery settings are up to date." }
let(:message) { "We recommend you ensure two-factor authentication is enabled and the settings are up to date." }
let(:action_button) { 'Manage two-factor authentication' }
before do
allow(Gitlab).to receive(:com?) { true }
gitlab_sign_in(user)
sign_in(user)
end
it 'shows callout if not dismissed' do
visit root_dashboard_path
expect(page).to have_content(message)
expect(page).to have_link(action_button, href: profile_two_factor_auth_path)
end
it 'hides callout when user opens profile', :js do
it 'hides callout when user clicks action button', :js do
visit root_dashboard_path
expect(page).to have_content(message)
click_link 'recovery settings'
click_link action_button
wait_for_requests
expect(page).not_to have_content(message)
......
......@@ -24723,9 +24723,6 @@ msgstr ""
msgid "Please enable and migrate to hashed storage to avoid security issues and ensure data integrity. %{migrate_link}"
msgstr ""
msgid "Please ensure your account's %{account_link_start}recovery settings%{account_link_end} are up to date."
msgstr ""
msgid "Please enter a non-negative number"
msgstr ""
......@@ -25374,6 +25371,9 @@ msgstr ""
msgid "Profiles|Main settings"
msgstr ""
msgid "Profiles|Manage two-factor authentication"
msgstr ""
msgid "Profiles|No file chosen."
msgstr ""
......@@ -25479,6 +25479,9 @@ msgstr ""
msgid "Profiles|Using emojis in names seems fun, but please try to set a status message instead"
msgstr ""
msgid "Profiles|We recommend you ensure two-factor authentication is enabled and the settings are up to date."
msgstr ""
msgid "Profiles|What's your status?"
msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment