Skip to content

Commit

Permalink
Fix flaky spec
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-isler committed Nov 15, 2024
1 parent c4216da commit 7ee859f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions spec/system/editable_attributes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@

describe "update strings" do
before do
Hotsheet.configure do |config|
config.model :Author do |model|
model.included_attributes = %i[name birthdate]
end
end
Hotsheet.instance_variable_set(:@editable_attributes_for, nil) # reset the memoized editable attributes

visit "/hotsheet"
click_link "Author"

wait_for_turbo
expect(page).to have_content("Stephen") # rubocop:disable RSpec/ExpectInHook
find(".readonly-attribute", text: "Stephen").click
fill_in "author_name", with: "King"
end
Expand Down

0 comments on commit 7ee859f

Please sign in to comment.