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

Unit testing - updating a DropDownChoice with Ajax

by glr :: Rate this Message:

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

Hi

I have 2 DropDownChoice's on a form. When making a choice in the first, the choices in the second are updated using AjaxFormComponentUpdatingBehavior. (Just like in the Drop Down Choice Example of the "live action" Wicket Examples (http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.ChoicePage)).

Could anyone tell me what the recommended way is to unit-test the above case?

I tried using WicketTester with FormTester but I cannot have the model of the first DropDownChoice updated as a response to making a selection in it. As a result, when the OnEvent handler of the AjaxFormComponentUpdatingBehavior fires, it looks as if there was no selection in the first DropDownChoice.

Thanks for your answer in advance,
Richard.

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