I tried with formTester.submit() and the test went OK with that.

Anyway, thanks for informing about the fix (WICKET-254), I will take it into
use.

Regards,
Richard.


Jean-Baptiste Quenot-3 wrote:
> 
> * Jean-Baptiste Quenot:
>> * glr:
>> >
>> >         FormTester formTester =
>> this.tester.newFormTester("articleEditorForm", false);
>> >         formTester.select("rscTypesList", 0);
>> >         this.tester.executeAjaxEvent("articleEditorForm:rscTypesList",
>> "onchange");
>> 
>> Can you please try with:
>> 
>>         formTester.submit();
>> 
>> instead of:
>> 
>>         this.tester.executeAjaxEvent("articleEditorForm:rscTypesList",
>> "onchange");
>> 
>> To see if it's not the ajax behavior that causes problems?
> 
> Indeed  WicketTester was  overwriting field  values in  two places
> when submitting via  Ajax.  I just fixed this, you  can safely use
> executeAjaxEvent() now.
> 
> The related JIRA issue is:
> 
> Allow to set field values before submitting a form with Ajax in
> WicketTester
> https://issues.apache.org/jira/browse/WICKET-254
> -- 
>      Jean-Baptiste Quenot
> aka  John Banana   Qwerty
> http://caraldi.com/jbq/
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Unit-testing---updating-a-DropDownChoice-with-Ajax-tf3946499.html#a11305654
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to