On Thu, Oct 15, 2009 at 5:48 AM, Vlad GURDIGA <[email protected]> wrote: > Hello! > > I'm trying to set up some acceptance tests for a $.CouchApp form like: > - fill the form fields with some values; > - submit the form and check the success; > > Right now (couchdb r825472) the form is submitted asynchronously, and, > as far as I can see there is no way to cleanly automate form > submission and check the result. > > For this purpose, I think it would be nice to have the opportunity to > ask $.couch.db.saveDoc() to save the document asynchronously. > As far as I could see in jquery.couch.js, this would need a few little > changes (the patch is attached).
I think you mean synchronously? The current behavior is async. It is hard to test that stuff. Let us know what you come up with. Ordinarily patches like this need to come through Jira. I'd apply it but I think you can get the synchronous behavior without the patch. See these docs: http://docs.jquery.com/Ajax/jQuery.ajaxSetup If this doesn't work for your purposes, I'd be happy to accept the patch, but it'd be nice if it made the async option available across all CouchDB Ajax calls. Chris > > What do you think? > -- Chris Anderson http://jchrisa.net http://couch.io
