[
https://issues.apache.org/jira/browse/WICKET-6420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kamil updated WICKET-6420:
--------------------------
Comment: was deleted
(was: Ok, I changed mode to DEVELOPMENT:
{code}
public class WicketTestApplication extends WicketApplication {
@Override
public RuntimeConfigurationType getConfigurationType() {
return RuntimeConfigurationType.DEVELOPMENT;
}
}
{code}
but the tests still passed)
> 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)