]> source.dussan.org Git - vaadin-framework.git/commitdiff
Test for #7481. Seems impossible to create a TestBench test for it as the problem...
authorArtur Signell <artur.signell@itmill.com>
Fri, 26 Aug 2011 05:45:28 +0000 (05:45 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 26 Aug 2011 05:45:28 +0000 (05:45 +0000)
svn changeset:20668/svn branch:6.7

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

diff --git a/tests/src/com/vaadin/tests/components/combobox/ComboBoxTextFieldEventOrder.java b/tests/src/com/vaadin/tests/components/combobox/ComboBoxTextFieldEventOrder.java
new file mode 100644 (file)
index 0000000..31979a6
--- /dev/null
@@ -0,0 +1,38 @@
+package com.vaadin.tests.components.combobox;\r
+import java.util.Arrays;\r
+\r
+import com.vaadin.data.Property.ValueChangeEvent;\r
+import com.vaadin.data.Property.ValueChangeListener;\r
+import com.vaadin.tests.components.TestBase;\r
+import com.vaadin.ui.Select;\r
+import com.vaadin.ui.TextField;\r
+\r
+public class ComboBoxTextFieldEventOrder extends TestBase {\r
+\r
+    @Override\r
+    protected void setup() {\r
+        TextField textField = new TextField("text field");\r
+        textField.setImmediate(true);\r
+        final Select select = new Select("select", Arrays.asList("1", "2", "3",\r
+                "4"));\r
+        textField.addListener(new ValueChangeListener() {\r
+            public void valueChange(ValueChangeEvent event) {\r
+                select.addItem(Long.valueOf(select.size() + 1).toString()); // or\r
+                                                                            // just\r
+                                                                            // select.requestRepaint();\r
+            }\r
+        });\r
+        addComponent(textField);\r
+        addComponent(select);\r
+    }\r
+\r
+    @Override\r
+    protected String getDescription() {\r
+        return "Entering a text in a TextField and then clicking on the button in a ComboBox should cause the TextField value change to be sent first and the ComboBox filtering afterwards. Failure to do so will cause errors if the value change listener modifies the ComboBox";\r
+    }\r
+\r
+    @Override\r
+    protected Integer getTicketNumber() {\r
+        return 7481;\r
+    }\r
+}\r