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.i...@geosdi.org
skype:  neofx8080

web:     http://www.geosdi.org

Reply via email to