]> source.dussan.org Git - vaadin-framework.git/commitdiff
Essential test case that should never fail. Related to #6588
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 6 Oct 2011 20:48:20 +0000 (20:48 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 6 Oct 2011 20:48:20 +0000 (20:48 +0000)
svn changeset:21620/svn branch:6.7

tests/testbench/com/vaadin/tests/components/textfield/TextFieldWithProperty.java [new file with mode: 0644]

diff --git a/tests/testbench/com/vaadin/tests/components/textfield/TextFieldWithProperty.java b/tests/testbench/com/vaadin/tests/components/textfield/TextFieldWithProperty.java
new file mode 100644 (file)
index 0000000..7d0bd12
--- /dev/null
@@ -0,0 +1,44 @@
+package com.vaadin.tests.components.textfield;
+
+import com.vaadin.data.util.ObjectProperty;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Button.ClickListener;
+import com.vaadin.ui.TextField;
+
+@SuppressWarnings("unchecked")
+public class TextFieldWithProperty extends TestBase {
+
+    @Override
+    protected void setup() {
+        
+        final TextField tf1 = new TextField();
+        
+        final ObjectProperty<String> op = new ObjectProperty<String>("FOO");
+        
+        tf1.setPropertyDataSource(op);
+
+        addComponent(tf1);
+
+        Button b = new Button("Set BAR to underlaying property (should propagate to UI)");
+        b.addListener(new ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                op.setValue("BAR");
+            }
+        });
+        addComponent(b );
+        
+    }
+
+    @Override
+    protected String getDescription() {
+        return "Should work";
+    }
+
+    @Override
+    protected Integer getTicketNumber() {
+        return 6588;
+    }
+
+}