From c946371e43940042f9a36d4c62f5577381f3f3c0 Mon Sep 17 00:00:00 2001 From: Jacklyn Ma <29336370+jacklynhma@users.noreply.github.com> Date: Sat, 14 Dec 2024 12:31:17 -0500 Subject: [PATCH] fix failing tests --- app/views/profiles/edit.html.erb | 2 +- test/integration/profile_test.rb | 3 +-- test/system/authorizing_profile_update_test.rb | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/profiles/edit.html.erb b/app/views/profiles/edit.html.erb index e1cc2ba27e8..38251ff3d9d 100644 --- a/app/views/profiles/edit.html.erb +++ b/app/views/profiles/edit.html.erb @@ -71,7 +71,7 @@

<%= t('.enter_password') %>

- <%= form.password_field :password, autocomplete: 'current-password', class: 'form__input' %> + <%= form.password_field :password, autocomplete: 'current-password', class: 'form__input', required: true %> diff --git a/test/integration/profile_test.rb b/test/integration/profile_test.rb index 681fa101499..415aa674120 100644 --- a/test/integration/profile_test.rb +++ b/test/integration/profile_test.rb @@ -144,8 +144,7 @@ def sign_out click_link "Sign out" visit profile_path("nick1") - - assert page.has_link?("https://nickisawesome.com") + assert page.has_link?("https://nickisawe...") end test "deleting profile" do diff --git a/test/system/authorizing_profile_update_test.rb b/test/system/authorizing_profile_update_test.rb index 112eef39c42..99d5f7f8b66 100644 --- a/test/system/authorizing_profile_update_test.rb +++ b/test/system/authorizing_profile_update_test.rb @@ -25,11 +25,10 @@ def sign_in assert_equal twitter_username, page.find_by_id("user_twitter_username").value click_button "Update" - # Verify that the newly added Twitter username is still on the form so that the user does not need to re-enter it assert_equal twitter_username, page.find_by_id("user_twitter_username").value - fill_in "Password", with: PasswordHelpers::SECURE_TEST_PASSWORD + fill_in "Password", with: @user.password click_button "Update" assert page.has_content? "Your profile was updated."