use of org.eclipse.scout.rt.client.ui.desktop.IDesktop in project scout.rt by eclipse.
the class PageWithTable7Test method testExecPageDataLoaded.
@Test
public void testExecPageDataLoaded() {
IDesktop desktop = TestEnvironmentClientSession.get().getDesktop();
desktop.setAvailableOutlines(Collections.singletonList(new PageWithTableOutline()));
desktop.setOutline(PageWithTableOutline.class);
desktop.activateFirstPage();
IOutline outline = desktop.getOutline();
PageWithTable page = (PageWithTable) outline.getActivePage();
page.m_counter = 1;
page.reloadPage();
page.m_counter = 2;
page.reloadPage();
page.m_counter = 3;
page.reloadPage();
ScoutAssert.assertListEquals(new String[] { "counter: 0 value: first", "counter: 1 value: second", "counter: 2 value: third", "counter: 3 value: fourth" }, page.m_protocol);
}
use of org.eclipse.scout.rt.client.ui.desktop.IDesktop in project scout.rt by eclipse.
the class PageWithTableAndPageBeanTest method prepareTest.
private PageWithTable prepareTest() {
IDesktop desktop = TestEnvironmentClientSession.get().getDesktop();
assertNotNull(desktop);
desktop.setAvailableOutlines(Collections.singletonList(new PageWithTableOutline()));
desktop.setOutline(PageWithTableOutline.class);
desktop.activateFirstPage();
IOutline outline = desktop.getOutline();
assertNotNull(outline);
assertSame(PageWithTableOutline.class, outline.getClass());
IPage<?> page = outline.getActivePage();
assertNotNull(page);
assertSame(PageWithTable.class, page.getClass());
return (PageWithTable) page;
}
use of org.eclipse.scout.rt.client.ui.desktop.IDesktop in project scout.rt by eclipse.
the class PageWithTableAndTableCustomizerWhenEditingThenMissingSelectionTest method setUp.
@Before
public void setUp() {
IDesktop desktop = TestEnvironmentClientSession.get().getDesktop();
Outline outline = new Outline();
desktop.setAvailableOutlines(Collections.singletonList(outline));
desktop.activateOutline(outline);
}
use of org.eclipse.scout.rt.client.ui.desktop.IDesktop in project scout.rt by eclipse.
the class PageWithTableAndTableCustomizerWhenEditingThenMissingSelectionTest method testWithUnchangedTableCustomizer.
@Test
public void testWithUnchangedTableCustomizer() throws Exception {
tableCustomizerSerialDataIsRandom = false;
IDesktop desktop = TestEnvironmentClientSession.get().getDesktop();
desktop.activateFirstPage();
PageWithTable page = (PageWithTable) desktop.getOutline().getActivePage();
PageWithTable.Table table = page.getTable();
//
table.selectRow(0);
assertSelection(table, CollectionUtility.arrayList(1));
//
table.selectRow(1);
assertSelection(table, CollectionUtility.arrayList(2));
//
table.getMenuByClass(PageWithTable.Table.EditAccountMenu.class).doAction();
assertSelection(table, CollectionUtility.arrayList(2));
}
use of org.eclipse.scout.rt.client.ui.desktop.IDesktop in project scout.rt by eclipse.
the class PageWithTableAndTableCustomizerWhenEditingThenMissingSelectionTest method testWithChangedTableCustomizer.
@Test
public void testWithChangedTableCustomizer() throws Exception {
tableCustomizerSerialDataIsRandom = true;
IDesktop desktop = TestEnvironmentClientSession.get().getDesktop();
desktop.activateFirstPage();
PageWithTable page = (PageWithTable) desktop.getOutline().getActivePage();
PageWithTable.Table table = page.getTable();
//
table.selectRow(0);
assertSelection(table, CollectionUtility.arrayList(1));
//
table.selectRow(1);
assertSelection(table, CollectionUtility.arrayList(2));
//
table.getMenuByClass(PageWithTable.Table.EditAccountMenu.class).doAction();
assertSelection(table, CollectionUtility.arrayList(2));
}
Aggregations