Hello Juergen and others, On Wed, 21 Jan 2009, Juergen Donnerstag wrote: > It breaks WicketTester but does it break code deployed on a servlet > container as well? Please have a look at the change to the test cases. > Doesn't it make ajax tests more simple and straight forward? It avoids > that we have to code around buggy WicketTester behavior. The question > of course is, if that is sufficient enough to break the rule.
I think that WICKET-1910 is a good catch and should definitely be addressed -- but only in Wicket 1.5, if existing tests cannot be preserved. Likewise I'm sure that there are a lot of problems with the current state of WicketTester, but with current trunk I cannot make WicketTester work on ajax-submitted forms at all :) I added a simple test case (disabled in trunk) to demonstrate the problem http://www.papernapkin.org/pastebin/view/4181/ Expected :New name Actual :Mock name at org.apache.wicket.util.tester.WicketTesterTest.testSubmittingFormWithAjaxEventSubmitsFormValues(WicketTesterTest.java:532) As far as I can tell, the request just gets reinitialised in executeAjaxEvent, so all values fed in with FormTester get lost. Rolling back the changes of WICKET-1910 makes the test pass. For the moment I didn't even find a workaround, and even if it would be simple, it might not be so simple to apply it in all the necessary places in all affected projects. Just in the projects that I know first hand, there are hundreds of tests failing because of this. And if there's anyone else testing ajax forms with WicketTester, they're bound to have more. In a couple of projects, I confirmed that fully rolling WICKET-1910 back fixes the problem. That's why I think that the WicketTester changes should be postponed to 1.5 as well. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oy <URL: http://www.ri.fi/ >
