Hi Francesco,
This was a bug in Wicket, a security related one.
You will need to fix your code.
The change should look something like this:
- tester.getRequest().setParameter("select",
page.option1.getValue());
- tester.getRequest().setParameter("text", "text is required");
- tester.submitForm(page.form);
+ final FormTester formTester2 = tester.newFormTester("form");
+ formTester2.setValue("select", "option1");
+ formTester2.setValue("text", "text is required");
+ formTester2.submit();
from
https://gitbox.apache.org/repos/asf?p=wicket.git;a=commitdiff;h=0c19cf8;hp=3d8f8b306a92cee71020a633be1d347177d7b7fc
On Fri, Jan 10, 2020 at 9:31 AM Francesco Chicchiriccò <[email protected]>
wrote:
> Hi there,
> it seems we have some issues with Wicket Tester, after upgrading to 8.7.0
> from 8.6.1.
>
> In particular, due to the change [1] for WICKET-6708, we have found that
> MockWebRequest is not behaving as expected; no troubles occur instead
> during normal operations with HttpServletRequest.
>
> The test failures occur because MockWebRequest's method is (correctly) set
> to POST but parameters are submitted with URL, when using DropDownChoice
> with onChange behavior [2].
>
> Of course, such situation was fine with code prior to [1] but not working
> anymore: I have verified that expected submit parameters are part of URL,
> hence are available as getQueryParameters() but getPostParameters() is
> invoked instead.
>
> FYI, one of failing test cases in [3].
>
> Please let me know if this is a bug with MockWebRequest or whether we have
> to update our test code, thanks.
>
> Regards.
>
> [1]
> https://github.com/apache/wicket/commit/9c3129517a15c37cc90fb27a697868a825940aa0#diff-51cf2faf6078497df77cc6d995dd1b98R763
> [2]
> https://github.com/apache/syncope/blob/2_1_X/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractLogsPanel.java#L71
> [3]
> https://github.com/apache/syncope/blob/2_1_X/fit/core-reference/src/test/java/org/apache/syncope/fit/console/LogsITCase.java#L57
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>