From dcbfb70c463b1af2c571cbb1531556bbe71d5a02 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:46:22 +0000 Subject: [PATCH] CLCD-3759 Update reset password copy and move the link (#2832) * Update reset password copy and move the link * lint --- app/views/devise/sessions/new.html.erb | 4 ++-- app/views/devise/shared/_links.html.erb | 2 +- spec/features/user_spec.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 440eeb624..04b436aa5 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -12,6 +12,8 @@ <%= content_for(:title) %> + <%= render "devise/shared/links" %> + <%= f.govuk_email_field :email, label: { text: "Email address" }, autocomplete: "email", @@ -25,5 +27,3 @@ <% end %> - -<%= render "devise/shared/links" %> diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb index e463f5deb..f48e1b3af 100644 --- a/app/views/devise/shared/_links.html.erb +++ b/app/views/devise/shared/_links.html.erb @@ -7,7 +7,7 @@ <% end %> <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> -
You can <%= govuk_link_to "reset your password", new_password_path(resource_name) %> if you’ve forgotten it.
+<%= govuk_link_to "Forgot password", new_password_path(resource_name) %>
<% end %> <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb index bc562824c..2e837abe2 100644 --- a/spec/features/user_spec.rb +++ b/spec/features/user_spec.rb @@ -61,7 +61,7 @@ RSpec.describe "User Features" do context "when the user has forgotten their password" do it "is redirected to the reset password page when they click the reset password link" do visit("/lettings-logs") - click_link("reset your password") + click_link("Forgot password") expect(page).to have_current_path("/account/password/new") end @@ -744,7 +744,7 @@ RSpec.describe "User Features" do it "is redirected to the reset password page when they click the reset password link" do visit("/account/sign-in") - click_link("reset your password") + click_link("Forgot password") expect(page).to have_current_path("/account/password/new") end