]> source.dussan.org Git - vaadin-framework.git/commitdiff
Test case for #6878
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>
Mon, 2 May 2011 09:20:31 +0000 (09:20 +0000)
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>
Mon, 2 May 2011 09:20:31 +0000 (09:20 +0000)
svn changeset:18574/svn branch:6.6

tests/src/com/vaadin/tests/components/tree/TreeWithPreselectedItemNotShown.java [new file with mode: 0644]

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 (file)
index 0000000..92c82a6
--- /dev/null
@@ -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;
+    }
+
+}