From 0dda58d19b0b88a44d074aaaeade265212636d70 Mon Sep 17 00:00:00 2001 From: Madeline Collier Date: Wed, 18 Sep 2024 21:50:00 +0200 Subject: [PATCH] WIP fix specs Locally specs are passing and finding the "Admin" label. I wonder if the specs in CI are instead looking for "admin", or whether the label is entirely absent. Let's test. --- admin/spec/features/users_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/spec/features/users_spec.rb b/admin/spec/features/users_spec.rb index 67b3a2a6070..36cd9eba915 100644 --- a/admin/spec/features/users_spec.rb +++ b/admin/spec/features/users_spec.rb @@ -72,7 +72,7 @@ expect(page).to have_content("Users / customer@example.com") expect(page).to have_content("Lifetime Stats") expect(page).to have_content("Roles") - expect(find("label", text: "Admin").find("input[type=checkbox]").checked?).to eq(false) + expect(find("label", text: /admin/i).find("input[type=checkbox]").checked?).to eq(false) end it "allows editing of the existing user" do @@ -93,12 +93,12 @@ # Update user within("form.edit_user") do fill_in "Email", with: "dogtown@example.com" - find("label", text: "Admin").find("input[type=checkbox]").check + find("label", text: /admin/i).find("input[type=checkbox]").check click_on "Update" end expect(page).to have_content("Users / dogtown@example.com") - expect(find("label", text: "Admin").find("input[type=checkbox]").checked?).to eq(true) + expect(find("label", text: /admin/i).find("input[type=checkbox]").checked?).to eq(true) # Cancel out of editing within("form.edit_user") do