]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added more hierarchy levels to the hierarchical container in ValoThemeUI test
authorJouni Koivuviita <jouni@vaadin.com>
Thu, 7 Aug 2014 07:35:59 +0000 (10:35 +0300)
committerArtur Signell <artur@vaadin.com>
Mon, 11 Aug 2014 18:30:58 +0000 (18:30 +0000)
Change-Id: Ic35c2f77a5acb0221792ad0a0195e4566dbece00

uitest/src/com/vaadin/tests/themes/valo/ValoThemeUI.java

index 1f92265d9d84467780bb6373526bfddf834c39d3..5f286989a0cd7d16ba26e843b811408f124c219b 100644 (file)
@@ -395,8 +395,34 @@ public class ValoThemeUI extends UI {
                             sg.nextString(true) + " " + sg.nextString(false));
                     child.getItemProperty(ICON_PROPERTY).setValue(
                             testIcon.get());
-                    ((Hierarchical) container).setChildrenAllowed(id, false);
+                    // ((Hierarchical) container).setChildrenAllowed(id, false);
                     ((Hierarchical) container).setParent(id, i);
+
+                    for (int k = 1; k < 5; k++) {
+                        String id2 = id + " -> " + k;
+                        child = container.addItem(id2);
+                        child.getItemProperty(CAPTION_PROPERTY).setValue(
+                                sg.nextString(true) + " "
+                                        + sg.nextString(false));
+                        child.getItemProperty(ICON_PROPERTY).setValue(
+                                testIcon.get());
+                        // ((Hierarchical) container)
+                        // .setChildrenAllowed(id, false);
+                        ((Hierarchical) container).setParent(id2, id);
+
+                        for (int l = 1; l < 5; l++) {
+                            String id3 = id2 + " -> " + l;
+                            child = container.addItem(id3);
+                            child.getItemProperty(CAPTION_PROPERTY).setValue(
+                                    sg.nextString(true) + " "
+                                            + sg.nextString(false));
+                            child.getItemProperty(ICON_PROPERTY).setValue(
+                                    testIcon.get());
+                            // ((Hierarchical) container)
+                            // .setChildrenAllowed(id, false);
+                            ((Hierarchical) container).setParent(id3, id2);
+                        }
+                    }
                 }
             }
         }