Make login through form in tests more readable

We're removing the word "email" from the method name because the method
was accepting either an email or a username, and we're using the name of
the label to fill in fields, which is better because it checks that the
label is correctly associated with the field , as shown for instance in
commit 431ebeda8.
This commit is contained in:
Javi Martín
2025-03-13 01:47:56 +01:00
parent fa9ab61f72
commit 8774488650
2 changed files with 7 additions and 8 deletions

View File

@@ -42,7 +42,7 @@ describe "Account" do
logout
login_through_form_with_email_and_password(user.email, "new_password")
login_through_form_with(user.email, password: "new_password")
expect(page).to have_content "You have been signed in successfully."
end
@@ -63,7 +63,7 @@ describe "Account" do
logout
login_through_form_with_email_and_password(user.username, new_password)
login_through_form_with(user.username, password: new_password)
expect(page).to have_content "You have been signed in successfully."
end