]> source.dussan.org Git - vaadin-framework.git/commitdiff
Updated test case to catch all #2974 problems
authorArtur Signell <artur.signell@itmill.com>
Thu, 24 Jun 2010 09:07:12 +0000 (09:07 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 24 Jun 2010 09:07:12 +0000 (09:07 +0000)
svn changeset:13898/svn branch:6.4

tests/src/com/vaadin/tests/components/combobox/ComboBoxItemIcon.html
tests/src/com/vaadin/tests/components/combobox/ComboBoxItemIcon.java

index 447000d6d76bb6979c59aedd915c61f38ef572bb..6e6e87bc7ebba5f68ca632deeec199092045799a 100644 (file)
@@ -13,7 +13,7 @@
 </thead><tbody>
 <tr>
        <td>open</td>
-       <td>/run/com.vaadin.tests.components.combobox.ComboBoxItemIcon</td>
+       <td>/run/com.vaadin.tests.components.combobox.ComboBoxItemIcon?restartApplication</td>
        <td></td>
 </tr>
 <tr>
@@ -34,7 +34,7 @@
 <tr>
        <td>screenCapture</td>
        <td></td>
-       <td></td>
+       <td>first-combobox-open</td>
 </tr>
 <tr>
        <td>click</td>
 <tr>
        <td>screenCapture</td>
        <td></td>
+       <td>fi-hu-selected</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxItemIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[2]</td>
+       <td>12,17</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>second-combobox-open</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxItemIcon::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item2</td>
+       <td>32,10</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
        <td></td>
+       <td>fi-au-selected</td>
 </tr>
-
 </tbody></table>
 </body>
 </html>
index 4800316a5a50f32e8c6b737a0ada43f73e454a7d..69c19946a231a8c0dc3397373ced38f524bcdd62 100644 (file)
@@ -15,23 +15,43 @@ public class ComboBoxItemIcon extends TestBase {
 
     @Override
     protected String getDescription() {
-        return "The items in the ComboBox should have icons - also when selected.";
+        return "All items in the ComboBoxes should have icons.";
     }
 
     @Override
     protected void setup() {
-        ComboBox cb = new ComboBox();
-        cb.addContainerProperty("icon", Resource.class, null);
-        cb.setItemIconPropertyId("icon");
-        getLayout().addComponent(cb);
-
-        Item item = cb.addItem("FI");
-        item.getItemProperty("icon").setValue(
-                new ThemeResource("../sampler/flags/fi.gif"));
-        item = cb.addItem("SE");
-        item.getItemProperty("icon").setValue(
-                new ThemeResource("../sampler/flags/se.gif"));
-
+        {
+            ComboBox cb = new ComboBox();
+            cb.addContainerProperty("icon", Resource.class, null);
+            cb.setItemIconPropertyId("icon");
+
+            Item item = cb.addItem("FI");
+            item.getItemProperty("icon").setValue(
+                    new ThemeResource("../sampler/flags/fi.gif"));
+            item = cb.addItem("SE");
+            item.getItemProperty("icon").setValue(
+                    new ThemeResource("../sampler/flags/se.gif"));
+
+            addComponent(cb);
+        }
+        {
+            ComboBox cb = new ComboBox();
+            cb.addContainerProperty("icon", Resource.class, null);
+            cb.setItemIconPropertyId("icon");
+
+            Item item = cb.addItem("Finland");
+            item.getItemProperty("icon").setValue(
+                    new ThemeResource("../sampler/flags/fi.gif"));
+            item = cb.addItem("Australia");
+            item.getItemProperty("icon").setValue(
+                    new ThemeResource("../sampler/flags/au.gif"));
+            item = cb.addItem("Hungary");
+            item.getItemProperty("icon").setValue(
+                    new ThemeResource("../sampler/flags/hu.gif"));
+
+            cb.setValue("Hungary");
+            addComponent(cb);
+        }
     }
 
 }