* Test
*/
@Test
public void test()
{
AjaxLazyLoadPanel panel = new AjaxLazyLoadPanel("panel")
{
private static final long serialVersionUID = 1L;
@Override
public Component getLazyLoadComponent(final String markupId)
{
return new Label(markupId, "lazy panel test").setRenderBodyOnly(true);
}
};
tester.startComponentInPage(panel);
tester.assertLabel(
"panel:content",
"<img alt=\"Loading...\" src=\"./resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator.gif\"/>");
AjaxLazyLoadPanelTester.executeAjaxLazyLoadPanel(tester, panel.getParent());
tester.debugComponentTrees();
tester.assertLabel("panel:content", "lazy panel test");
String doc = tester.getLastResponseAsString();
assertNotNull(doc);
}