couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject Re: async saveDoc
Date Thu, 15 Oct 2009 17:52:25 GMT
On Thu, Oct 15, 2009 at 5:48 AM, Vlad GURDIGA <gurdiga@gmail.com> 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

Mime
View raw message