In our Behat tests, we have some code for waiting for AJAX to complete. That doesn't work when we've switched to an iframe (which is necessary for the Media tests) and so we have a bunch of steps which just wait for an arbitrary number of seconds in the actual Behat feature. Still this leads to some sporadic failures on Travis, which is really annoying.
I don't know that we can fix this entirely, but I think we could improve it by at least adding a delay in the same steps as we do when not in an iframe, even if we have to just wait an arbitrary amount of time. And it'd be moving the delay out of the Behat feature and into the integration code which makes for cleaner tests.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | panopoly_test-iframe-ajax-2971200-3.patch | 1.1 KB | dsnopek |
Comments
Comment #2
dsnopekPatch is attached!
EDIT: Here's the Travis build: https://travis-ci.org/panopoly/panopoly/builds/376106061
Comment #3
dsnopekHere's a new version of this patch that increases the delay a little and will wait immediately after switching to the iframe too.
EDIT: Here's a Travis build: https://travis-ci.org/panopoly/panopoly/builds/376700759
Comment #6
dsnopekThis seems to be working! Committed :-)