Use labels to fill in fields in management account tests

This way we're testing that the label is correctly associated with the
field.
This commit is contained in:
Javi Martín
2025-02-27 13:36:57 +01:00
parent 75ef3e0a51
commit db9b849d82

View File

@@ -34,7 +34,7 @@ describe "Account" do
login_as_manager login_as_manager
click_link "Reset password manually" click_link "Reset password manually"
find(:css, "input[id$='user_password']").set("new_password") fill_in "Password", with: "new_password"
click_button "Save password" click_button "Save password"
@@ -75,7 +75,7 @@ describe "Account" do
login_as_manager login_as_manager
click_link "Reset password manually" click_link "Reset password manually"
find(:css, "input[id$='user_password']").set("another_new_password") fill_in "Password", with: "another_new_password"
click_button "Save password" click_button "Save password"