navigate to scenario waits for outstanding requests to clear before proceeding.

This commit is contained in:
Andres Ornelas 2010-05-26 16:09:48 -07:00
parent aedf12f25e
commit 177873df86

View file

@ -6,7 +6,9 @@ angular.scenario.dsl.browser = {
self.testFrame.unbind();
self.testDocument = jQuery(self.testWindow.document);
self.testWindow = self.testFrame[0].contentWindow;
done();
self.$browser = self.testWindow.angular.service.$browser();
self.notifyWhenNoOutstandingRequests = bind(self.$browser, self.$browser.notifyWhenNoOutstandingRequests);
self.notifyWhenNoOutstandingRequests(done);
});
if (this.testFrame.attr('src') == url) {
this.testWindow.location.reload();