« Return to Thread: Unit testing - updating a DropDownChoice with Ajax

Re: Unit testing - updating a DropDownChoice with Ajax

by glr :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View in Thread

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

 « Return to Thread: Unit testing - updating a DropDownChoice with Ajax