[
https://issues.apache.org/jira/browse/WICKET-2379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801396#action_12801396
]
Martin Grigorov commented on WICKET-2379:
-----------------------------------------
Yes, I see it should work now as it is.
Currently if it is a Ajax request WebResponse#redirect(String) doesn't call
#sendRedirect() of the underlying HttpServletResponse and thus
MockHttpServletResponse doesn't have the information you are trying to validate
in the test.
If WebResponse#redirect(String) is changed to call
HttpServletResponse#sendRedirect() for Ajax requests too then wicket-ajax.js
should be changed as well to process response's 'status == 302' and header
'Location'. This sounds like the normal way to process it but who knows maybe
there were problems with some browsers ...
> Redirect fails wicketTest in rc7
> --------------------------------
>
> Key: WICKET-2379
> URL: https://issues.apache.org/jira/browse/WICKET-2379
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC7
> Reporter: Martin Makundi
> Attachments: Wicket-Quickstart.zip
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> 1. click ajaxButton
> 2. redirect in button onSubmit
> 3. verify redirect in test <FAILS>
> See attached quickstart
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.