I have a remote form, which disables the submit button while the AJAX request is in progress. I’d like to check that if I stress click the button, no other AJAX requests will be done. How could I check this in an integration test?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you can check active ajax calls with jquery
If you use capybara for integration tests
might be a solution.
As you probably don’t know when calls occur
a helper function might do the trick
wich can be called like this
Thus you test for 5 seconds if there are ever more than one active ajax call