From db9b849d8295c5bd45b2c614fc180abcc8a68a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 27 Feb 2025 13:36:57 +0100 Subject: [PATCH] Use labels to fill in fields in management account tests This way we're testing that the label is correctly associated with the field. --- spec/system/management/account_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/system/management/account_spec.rb b/spec/system/management/account_spec.rb index 9350137db..0507affe1 100644 --- a/spec/system/management/account_spec.rb +++ b/spec/system/management/account_spec.rb @@ -34,7 +34,7 @@ describe "Account" do login_as_manager click_link "Reset password manually" - find(:css, "input[id$='user_password']").set("new_password") + fill_in "Password", with: "new_password" click_button "Save password" @@ -75,7 +75,7 @@ describe "Account" do login_as_manager 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"