Interestings
- Capybara/Selenium wait_for_ajax is your friend
A good generic wait until the last AJAX call has returned before moving on to your next assertion. Solved a lot of unstable-in-ci Capybara specs for us
http://agilesoftwaretesting.com/selenium-wait-for-ajax-the-right-way/