Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
ignaciosy committed Jan 20, 2025
1 parent 015878e commit 640654e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions spec/system/editable_attributes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@
visit "/hotsheet"
click_link "Author"

find(".readonly-attribute", text: "Stephen").click
fill_in "author_name", with: "King"
end

it "updates attribute when pressing enter" do
find_by_id("author_name").native.send_keys :return

expect(page).to have_content("King")
expect(page).to have_field("author_name", with: "King")
expect(author.reload.name).to eq("King")
end

it "updates attribute when clicking outside the input" do
find("th", text: "name").click

expect(page).to have_content("King")
expect(page).to have_field("author_name", with: "King")
expect(author.reload.name).to eq("King")
end
end
Expand Down

0 comments on commit 640654e

Please sign in to comment.