use of org.eclipse.scout.rt.client.ui.desktop.outline.pages.AbstractPageWithTable in project scout.rt by eclipse.
the class ColumnAutoResizeTest method testReloadPage_multipleSummaryColumns.
@Test
public void testReloadPage_multipleSummaryColumns() throws Exception {
IDesktop desktop = TestEnvironmentClientSession.get().getDesktop();
desktop.setAvailableOutlines(Collections.singletonList(new PageWithTableOutline()));
desktop.setOutline(PageWithTableOutline.class);
desktop.activateFirstPage();
IOutline outline = desktop.getOutline();
IPage<?> page = outline.getActivePage();
assertNotNull(page);
assertTrue(page instanceof AbstractPageWithTable);
ITable table = ((AbstractPageWithTable) page).getTable();
assertTrue(table instanceof ColumnAutoResizeTest.PageWithTable.TestTable);
ColumnAutoResizeTest.PageWithTable.TestTable testTable = (ColumnAutoResizeTest.PageWithTable.TestTable) table;
IColumn col1 = CollectionUtility.firstElement(testTable.getColumns());
int width1 = col1.getWidth();
// when page is reloaded, the column width shall not be different afterwards
page.reloadPage();
int width2 = col1.getWidth();
assertTrue(width1 == width2);
}
Aggregations