Skip to content

Commit 79ed86d

Browse files
committed
Chack page load rather forcing sleep
1 parent 71a779d commit 79ed86d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/stimulus/turbo_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@
5252
fill_in author_field, with: comment.author
5353
fill_in text_field, with: comment.text
5454
click_button("Post")
55-
sleep(1)
55+
56+
# This will ensure we wait enough for the changes to be applied
57+
expect(page).to have_text("")
58+
5659
expect(Comment.all.count).to equal(new_comment_count)
5760
end
5861

0 commit comments

Comments
 (0)