Browse Source

Update reset password copy and move the link

pull/2832/head
Kat 1 year ago
parent
commit
d15d90b73c
  1. 4
      app/views/devise/sessions/new.html.erb
  2. 2
      app/views/devise/shared/_links.html.erb
  3. 4
      spec/features/user_spec.rb

4
app/views/devise/sessions/new.html.erb

@ -12,6 +12,8 @@
<%= content_for(:title) %> <%= content_for(:title) %>
</h1> </h1>
<%= render "devise/shared/links" %>
<%= f.govuk_email_field :email, <%= f.govuk_email_field :email,
label: { text: "Email address" }, label: { text: "Email address" },
autocomplete: "email", autocomplete: "email",
@ -25,5 +27,3 @@
</div> </div>
</div> </div>
<% end %> <% end %>
<%= render "devise/shared/links" %>

2
app/views/devise/shared/_links.html.erb

@ -7,7 +7,7 @@
<% end %> <% end %>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<p class="govuk-body">You can <%= govuk_link_to "reset your password", new_password_path(resource_name) %> if you’ve forgotten it.</p> <p class="govuk-body"><%= govuk_link_to "Forgot password", new_password_path(resource_name) %></p>
<% end %> <% end %>
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>

4
spec/features/user_spec.rb

@ -61,7 +61,7 @@ RSpec.describe "User Features" do
context "when the user has forgotten their password" 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 it "is redirected to the reset password page when they click the reset password link" do
visit("/lettings-logs") visit("/lettings-logs")
click_link("reset your password") click_link("Forgot password")
expect(page).to have_current_path("/account/password/new") expect(page).to have_current_path("/account/password/new")
end 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 it "is redirected to the reset password page when they click the reset password link" do
visit("/account/sign-in") visit("/account/sign-in")
click_link("reset your password") click_link("Forgot password")
expect(page).to have_current_path("/account/password/new") expect(page).to have_current_path("/account/password/new")
end end

Loading…
Cancel
Save