From 7d3f0caf08e4f75dbdb4e5dc0dd16b1352681ab1 Mon Sep 17 00:00:00 2001 From: Jonatan Kronqvist Date: Mon, 2 May 2011 09:20:31 +0000 Subject: [PATCH] Test case for #6878 svn changeset:18574/svn branch:6.6 --- .../tree/TreeWithPreselectedItemNotShown.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/src/com/vaadin/tests/components/tree/TreeWithPreselectedItemNotShown.java diff --git a/tests/src/com/vaadin/tests/components/tree/TreeWithPreselectedItemNotShown.java b/tests/src/com/vaadin/tests/components/tree/TreeWithPreselectedItemNotShown.java new file mode 100644 index 0000000000..92c82a6ccf --- /dev/null +++ b/tests/src/com/vaadin/tests/components/tree/TreeWithPreselectedItemNotShown.java @@ -0,0 +1,52 @@ +package com.vaadin.tests.components.tree; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Tree; +import com.vaadin.ui.Window; + +public class TreeWithPreselectedItemNotShown extends TestBase { + + @Override + protected void setup() { + Button open = new Button("Open modal window with tree", + new Button.ClickListener() { + public void buttonClick(Button.ClickEvent event) { + getMainWindow().addWindow(new SubwindowWithTree()); + } + }); + + addComponent(open); + } + + private class SubwindowWithTree extends Window { + + private SubwindowWithTree() { + super("Tree here"); + + String itemId1 = "Item 1"; + String itemId2 = "Item 2"; + + Tree tree = new Tree(); + + tree.addItem(itemId1); + tree.addItem(itemId2); + + // todo error here + tree.select(itemId1); + + addComponent(tree); + } + } + + @Override + protected String getDescription() { + return "IE8 doesn't display a tree if an item has been selected before the tree becomes visible"; + } + + @Override + protected Integer getTicketNumber() { + return 6878; + } + +} -- 2.39.5