I have the helper sign_in
which signs in a user. I\'m trying to use a new approach to make sure that the user signed in using polling:
def sign_in(
You shouldn't need to do any of that.
Capybara has Powerful synchronization features mean you never have to manually wait for asynchronous processes to complete
Your test for page.should have_content
just needs a bit more time, you can give it to it in the step or as a general setup. The default wait is 2 seconds, and you might need 5 seconds or more.
Add Capybara.default_wait_time = 5
In the link above, search down and find Asynchronous JavaScript (Ajax and friends)
You should be able to delete your AsyncSupport
entirely. Just remember, if you set this inside a step and you want the wait to be 2 seconds otherwise, you might want an ensure
block to set it back to the original time.