Skip to content

Commit

Permalink
WIP fix specs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MadelineCollier committed Sep 18, 2024
1 parent 9ccbb4a commit 0dda58d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions admin/spec/features/users_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
expect(page).to have_content("Users / [email protected]")
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
Expand All @@ -93,12 +93,12 @@
# Update user
within("form.edit_user") do
fill_in "Email", with: "[email protected]"
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 / [email protected]")
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
Expand Down

0 comments on commit 0dda58d

Please sign in to comment.