diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb
index 50a540f6f98..0d4020656ad 100644
--- a/app/views/devise/passwords/new.html.erb
+++ b/app/views/devise/passwords/new.html.erb
@@ -14,10 +14,14 @@
url: user_password_path,
html: { autocomplete: 'off', method: :post },
) do |f| %>
- <%= f.input :email,
- required: true,
- input_html: { autocorrect: 'off',
- aria: { invalid: false, describedby: 'email-description' } } %>
+ <%= render ValidatedFieldComponent.new(
+ form: f,
+ name: :email,
+ label: t('account.index.email'),
+ required: true,
+ input_html: { autocorrect: 'off',
+ aria: { describedby: 'email-description' } },
+ ) %>
<%= f.input :request_id, as: :hidden, input_html: { value: request_id } %>
<%= f.submit t('forms.buttons.continue'), class: 'display-block margin-y-5' %>
<% end %>
diff --git a/spec/features/multiple_emails/reset_password_spec.rb b/spec/features/multiple_emails/reset_password_spec.rb
index 71b18b5b894..6f032d1d922 100644
--- a/spec/features/multiple_emails/reset_password_spec.rb
+++ b/spec/features/multiple_emails/reset_password_spec.rb
@@ -7,7 +7,7 @@
visit root_path
click_link t('links.passwords.forgot')
- fill_in 'Email', with: email1
+ fill_in t('account.index.email'), with: email1
click_button t('forms.buttons.continue')
expect_delivered_email_count(1)
@@ -20,7 +20,7 @@
visit root_path
click_link t('links.passwords.forgot')
- fill_in 'Email', with: email2
+ fill_in t('account.index.email'), with: email2
click_button t('forms.buttons.continue')
expect_delivered_email_count(2)
@@ -42,7 +42,7 @@
visit root_path
click_link t('links.passwords.forgot')
- fill_in 'Email', with: unconfirmed_email_address.email
+ fill_in t('account.index.email'), with: unconfirmed_email_address.email
click_button t('forms.buttons.continue')
expect_delivered_email_count(1)
diff --git a/spec/features/users/sign_in_spec.rb b/spec/features/users/sign_in_spec.rb
index 31614b5eda7..fc650729d3e 100644
--- a/spec/features/users/sign_in_spec.rb
+++ b/spec/features/users/sign_in_spec.rb
@@ -362,7 +362,7 @@
allow(Devise).to receive(:timeout_in).and_return(1)
user = create(:user)
visit root_path
- fill_in 'Email', with: user.email
+ fill_in t('account.index.email'), with: user.email
fill_in 'Password', with: user.password
expect(page).to have_content(
diff --git a/spec/features/visitors/password_recovery_spec.rb b/spec/features/visitors/password_recovery_spec.rb
index 8d2ec6fe37f..26d6eb91e65 100644
--- a/spec/features/visitors/password_recovery_spec.rb
+++ b/spec/features/visitors/password_recovery_spec.rb
@@ -11,7 +11,7 @@
visit root_path
click_link t('links.passwords.forgot')
- fill_in 'Email', with: user.email
+ fill_in t('account.index.email'), with: user.email
expect(PushNotification::HttpPush).to receive(:deliver).
with(PushNotification::RecoveryActivatedEvent.new(user: user))
@@ -99,7 +99,7 @@
before do
user = create(:user)
visit new_user_password_path
- fill_in 'Email', with: user.email
+ fill_in t('account.index.email'), with: user.email
click_button t('forms.buttons.continue')
visit edit_user_password_path(reset_password_token: 'invalid_token')
end
@@ -143,7 +143,7 @@
@user = create(:user, :signed_up)
visit new_user_password_path
- fill_in 'Email', with: @user.email
+ fill_in t('account.index.email'), with: @user.email
click_button t('forms.buttons.continue')
raw_reset_token, db_confirmation_token =
@@ -226,7 +226,7 @@
user = create(:user, :signed_up)
visit new_user_password_path
- fill_in 'Email', with: user.email
+ fill_in t('account.index.email'), with: user.email
click_button t('forms.buttons.continue')
user.reset_password_sent_at =
@@ -261,7 +261,7 @@
def submit_email_for_password_reset(email)
visit new_user_password_path
- fill_in 'Email', with: email
+ fill_in t('account.index.email'), with: email
click_button t('forms.buttons.continue')
end
end
diff --git a/spec/support/features/personal_key_helper.rb b/spec/support/features/personal_key_helper.rb
index a773b451412..8135f275641 100644
--- a/spec/support/features/personal_key_helper.rb
+++ b/spec/support/features/personal_key_helper.rb
@@ -21,7 +21,7 @@ def personal_key_from_pii(user, pii)
def trigger_reset_password_and_click_email_link(email)
visit new_user_password_path
- fill_in 'Email', with: email
+ fill_in t('account.index.email'), with: email
click_button t('forms.buttons.continue')
open_last_email
click_email_link_matching(/reset_password_token/)