Is there a way to prevent synchronization with HTTP requests in an Angular app?
I am working on a form that should be disabled while the POST request is in progress. I want to write specifications to ensure that the form remains disabled during this time.
In Protractor, after filling out the form and clicking on the send button, the request will remain pending indefinitely, waiting for the browser to terminate it due to a timeout (usually 30 seconds). This allows me to verify if the form is disabled. However, Protractor's synchronization with HTTP requests causes a timeout in the presence of a pending request.
To address this issue, I included the line
browser.ignoreSynchronization = true
, instructing Protractor to disregard synchronization with HTTP requests. However, I suspect this also means ignoring synchronization with Angular as a whole, without waiting for Angular to update data-bindings before proceeding with Protractor.