//
// Ensure visible
//
////////////////////////////////////////////////////////////////////////////
public void test_ensureVisible() throws Exception {
TabPanelInfo panel =
parseJavaInfo(
"public class Test extends TabPanel {",
" public Test() {",
" {",
" Panel panel_1 = new Panel('A');",
" add(panel_1);",
" }",
" {",
" Panel panel_2 = new Panel('B');",
" add(panel_2);",
" }",
" }",
"}");
panel.refresh();
List<WidgetInfo> panels = panel.getChildrenWidgets();
// initially "panel_1" is expanded
assertActiveIndex(panel, 0);
// notify about "panel_2"
{
boolean shouldRefresh = notifySelecting(panels.get(1));
assertTrue(shouldRefresh);
panel.refresh();
// now "panel_2" is expanded
assertActiveIndex(panel, 1);
}
// second notification about "panel_2" does not cause refresh()
{