You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Francesco Izzi <fr...@nsdi.it> on 2009/09/14 11:18:45 UTC
WicketTester executeAjaxEvent onclick generating non-AJAX response
Hi all,
i have problem testing executeAjaxEvent (onclick).
My test code is:
public void testRemove() throws Exception {
tester.setupRequestAndResponse(true);
final Component component =
tester.getComponentFromLastRenderedPage("table:listContainer:items:2:itemProperties:2:component:link");
assertNotNull(component);
assertTrue(dao.getRules().contains(rule));
tester.executeAjaxEvent("table:listContainer:items:2:itemProperties:2:component:link","onclick");
tester.assertComponentOnAjaxResponse(component);
tester.assertRenderedPage(DataAccessRulePage.class);
assertFalse(dao.getRules().contains(rule));
}
but the test fail with non-Ajax response component exceptions.
can have a complete sample code for this issue?
Cheers,
--
Francesco Izzi
CNR - IMAA
geoSDI - NSDI
Responsabile Sviluppo Software
C.da S. Loja
85050 Tito Scalo - POTENZA (PZ)
Italia
phone: +39 0971427305
fax: +39 0971 427271
mob: +39 3402640314
mail: francesco.izzi@geosdi.org
skype: neofx8080
web: http://www.geosdi.org