]> source.dussan.org Git - vaadin-framework.git/commitdiff
Test for #7013
authorArtur Signell <artur.signell@itmill.com>
Tue, 24 May 2011 11:18:47 +0000 (11:18 +0000)
committerArtur Signell <artur.signell@itmill.com>
Tue, 24 May 2011 11:18:47 +0000 (11:18 +0000)
svn changeset:19030/svn branch:6.6

tests/src/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.html [new file with mode: 0644]
tests/src/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.java [new file with mode: 0644]

diff --git a/tests/src/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.html b/tests/src/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.html
new file mode 100644 (file)
index 0000000..ae0dfec
--- /dev/null
@@ -0,0 +1,85 @@
+<tr>
+       <td>open</td>
+       <td>/run/com.vaadin.tests.components.combobox.ComboBoxUndefinedWidthAndIcon?restartApplication</td>
+       <td></td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[1]</td>
+       <td>13,14</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
+       <td>32,5</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>item1-selected</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[2]</td>
+       <td>12,5</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td>
+       <td>81,6</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>page2</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td>
+       <td>78,6</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>page3</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td>
+       <td>78,6</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>page4</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item3</td>
+       <td>68,8</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>item33-selected</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[2]</td>
+       <td>8,7</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td>
+       <td>116,3</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::</td>
+       <td>338,241</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>item33-selected-after-popup-opened-and-closed</td>
+</tr>
diff --git a/tests/src/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.java b/tests/src/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.java
new file mode 100644 (file)
index 0000000..fd5f7d4
--- /dev/null
@@ -0,0 +1,36 @@
+package com.vaadin.tests.components.combobox;\r
+\r
+import com.vaadin.data.Item;\r
+import com.vaadin.terminal.Resource;\r
+import com.vaadin.terminal.ThemeResource;\r
+import com.vaadin.tests.components.TestBase;\r
+import com.vaadin.ui.ComboBox;\r
+\r
+public class ComboBoxUndefinedWidthAndIcon extends TestBase {\r
+    @Override\r
+    protected void setup() {\r
+        ComboBox cb = new ComboBox();\r
+        cb.addContainerProperty("caption", String.class, null);\r
+        cb.addContainerProperty("icon", Resource.class, null);\r
+        for (int i = 1; i < 200 + 1; i++) {\r
+            Item item = cb.addItem(i);\r
+            item.getItemProperty("caption").setValue("Item " + i);\r
+            item.getItemProperty("icon").setValue(\r
+                    new ThemeResource("../runo/icons/16/users.png"));\r
+        }\r
+        cb.setItemIconPropertyId("icon");\r
+        cb.setItemCaptionPropertyId("caption");\r
+\r
+        addComponent(cb);\r
+    }\r
+\r
+    @Override\r
+    protected String getDescription() {\r
+        return "The width of the ComboBox should be fixed even though it is set to undefined width. The width should not change when changing pages in the dropdown.";\r
+    }\r
+\r
+    @Override\r
+    protected Integer getTicketNumber() {\r
+        return 7013;\r
+    }\r
+}\r