[ 
https://issues.apache.org/jira/browse/WICKET-6420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16098036#comment-16098036
 ] 

Martin Grigorov commented on WICKET-6420:
-----------------------------------------

Unless you provide a test case demonstrating the problem this ticket will be 
closed as "Cannot reproduce".

You are welcome to join us...@wicket.apache.org to discuss anything Wicket 
related!
Less people are subscribed to JIRA notifications so more people will be able to 
help you and to learn from your use case at users@.

> WicketTester asserts passes even though page not renders
> --------------------------------------------------------
>
>                 Key: WICKET-6420
>                 URL: https://issues.apache.org/jira/browse/WICKET-6420
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 8.0.0-M6
>            Reporter: Kamil
>
> I have a page
> {code}
> public class MyPage extends WebPage {
>     @Override
>     protected void onInitialize() {
>         super.onInitialize();
>         add(new AjaxLink<Void>("myButton") {
>             @Override
>             public void onClick(final AjaxRequestTarget target) {
>             }
>         });
>     }
> }
> {code}
> markup:
> {code}
> <!DOCTYPE html>
> <html lang="en-us" xmlns:wicket="http://wicket.apache.org";>
> <head>
> </head>
> <body>
> </body>
> </html>
> {code}
> although when I enter the page in the browser, I get:
> {code}
> Last cause: The component(s) below failed to render. Possible reasons could 
> be that:
>       1) you have added a component in code but forgot to reference it in the 
> markup (thus the component will never be rendered)
> {code}
> these tests are passing:
> {code}
>     @Test
>     public void hasMyButton() throws Exception {
>         //when
>       wicketTester.startPage(MyPage.class);
>         //then
>       wicketTester.assertComponent("myButton", AjaxLink.class);
>       wicketTester.assertVisible("myButton");
>         wicketTester.assertContains("myButton");
>         wicketTester.assertNoErrorMessage();
>         wicketTester.assertRenderedPage(MyPage.class);
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to