Wait for client-side AJAX requests in E2E tests
Similar to the wait_for_requests
method we have in the feature tests, it would be helpful to have one for E2E tests as well for improving stability. The two main checks we need to perform are:
Capybara.page.evaluate_script('window.pendingRequests || 0').zero?
Capybara.page.evaluate_script('jQuery.active').zero?
Edited by Sanad Liaquat