hi,
it seems like BaseWicketTester#clickLink does not generate an ajax request.
excerpt:
if (linkComponent instanceof AjaxLink)
{
// If it's not ajax we fail
[0] if (isAjax == false)
{
fail("Link " + path + "is an AjaxLink and will " +
"not be invoked when AJAX (javascript) is disabled.");
}
AjaxLink link = (AjaxLink)linkComponent;
setupRequestAndResponse();
[1] // getServletRequest().addHeader("Wicket-Ajax", "Yes");
[2] RequestCycle requestCycle = createRequestCycle();
if (requestCycle.getRequest() instanceof WebRequest &&
!((WebRequest)requestCycle.getRequest()).isAjax())
{
fail("this is no ajax request");
}
[0] only uses the parameter for the check, not the actual request
if [1] is uncommented, several other tests fail, due to assuming that there
is an ajax request, when actually there is none
[2] checks whether the current WebRequest is an ajax request. with [1] being
commented, the test fails with "this is no ajax request".
note: [1] and [2] were added by me and cannot be found in the code in trunk
either i'm missing something, or a lot of tests involving ajax are seriously
broken.
in any case, this should be clarified before releasing RC2.
any comments?
Gerolf