You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Maksim Atanasov (JIRA)" <ji...@apache.org> on 2018/10/12 14:21:00 UTC
[jira] [Comment Edited] (WICKET-6475) clickLink() from tester
should have option without rendering page
[ https://issues.apache.org/jira/browse/WICKET-6475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16647947#comment-16647947 ]
Maksim Atanasov edited comment on WICKET-6475 at 10/12/18 2:20 PM:
-------------------------------------------------------------------
It seems to me that this would only work with BookmarkablePageLink where we are guranteed to change pages.
(clickLink in the WicketTester basically just calls startPage() for the pageClass in the BookmarkablePageLink)
How would one test that the onClick() methods in Link and AjaxLink? Calling setResponsePage() will also try to render the page nad throw an Exception as far as I understand.
was (Author: maximatanasov):
It seems to me that this would only work with BookmarkablePageLink where we are guranteed to change pages.
(clickLink in the WicketTester basically just calls startPage() for the pageClass in the BookmarkablePageLink)
How would one test that the onClick() methods in Link and AjaxLink? Calling setResponsePage() will also try to render the page as far as I understand.
> clickLink() from tester should have option without rendering page
> -----------------------------------------------------------------
>
> Key: WICKET-6475
> URL: https://issues.apache.org/jira/browse/WICKET-6475
> Project: Wicket
> Issue Type: Improvement
> Affects Versions: 8.0.0-M6
> Reporter: Ćukasz Ludwa
> Priority: Major
>
> In my wicket tests I often use:
> {code:java}
> wicketTester.clickLink(pageLink);
> wicketTester.assertRenderedPage(Page.class);
> {code}
> I would like to have possibility to check if transition to page given in link was successfull, but without rendering all elements. I just want to test the transition, because proper rendering of page components should be tested in separate test.
> In my opinion adding additional method, which will be checking such transition without rendering whole page would be very helpful:
> {code:java}
> wicketTester.assertTransition(Link, Page.class);
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)