hi,

here my "hack" to test tables:

override: newChildId() in your dataview - class.


and build a common assert method...

private static final String PATH_CELLS = ":cells:";
private static final String PATH_ROWS = ":rows:";       
        
protected final void assertTable(String pTablePath, int pRow, int pColumn, 
String pText) {
        assertComponent(pTablePath, YourDataView.class);
        long lRowIndex = getRowIndex(pTablePath, pRow);
        assertText(pTablePath + PATH_ROWS + (lRowIndex) + PATH_CELLS + 
(pColumn + 1) + ":cell:"...........", pText);
}
private long getRowIndex(String pTablePath, int pRow) {
        YourDataView lTable = (YourDataView) 
baseWicketTester.getComponentFromLastRenderedPage(pTablePath);
        long lChildID = lTable.getCurrentChildID();
        int lSizeOfTable = lTable.getDataProvider().size();
        long lRowIndex = lChildID - lSizeOfTable + pRow + 1;
        return lRowIndex;
}

insert your cell stuff to path and the most important thing:

vote for better wickettestersupport in 1.5;-)

alex


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to