Skip to content

Commit

Permalink
Chack page load rather forcing sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangarha committed Jan 1, 2024
1 parent 71a779d commit 79ed86d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/stimulus/turbo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@
fill_in author_field, with: comment.author
fill_in text_field, with: comment.text
click_button("Post")
sleep(1)

# This will ensure we wait enough for the changes to be applied
expect(page).to have_text("")

expect(Comment.all.count).to equal(new_comment_count)
end

Expand Down

0 comments on commit 79ed86d

Please sign in to comment.