summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-09-18 16:14:21 +0300
committerArtur Signell <artur@vaadin.com>2012-09-18 16:14:43 +0300
commit84449d07b0e637ce16cc3d6cde2ec7113130f281 (patch)
treede5b04b5bbe0d274e84f7096b50512879148530d /uitest/src/com/vaadin/tests/components
parentc93035c9812b33718195c829a7231347e095b549 (diff)
downloadvaadin-framework-84449d07b0e637ce16cc3d6cde2ec7113130f281.tar.gz
vaadin-framework-84449d07b0e637ce16cc3d6cde2ec7113130f281.zip
Label.setPropertyDataSource now updates the state value (#9618)
Diffstat (limited to 'uitest/src/com/vaadin/tests/components')
-rw-r--r--uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.html37
-rw-r--r--uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.java42
2 files changed, 79 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.html b/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.html
new file mode 100644
index 0000000000..bda4403b2b
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.html
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8888/" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/LabelPropertySourceValue?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//div[@id='runLabelPropertySourceValue-596713704']/div/div[2]/div[2]/div/div/div</td>
+ <td>Hello Vaadin user</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runLabelPropertySourceValue::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VButton[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runLabelPropertySourceValue::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VLabel[0]</td>
+ <td>This text should appear on the label after clicking the button.</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.java b/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.java
new file mode 100644
index 0000000000..fdbb3caddb
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.java
@@ -0,0 +1,42 @@
+package com.vaadin.tests.components.label;
+
+import com.vaadin.data.util.ObjectProperty;
+import com.vaadin.server.WrappedRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Label;
+
+public class LabelPropertySourceValue extends AbstractTestUI implements
+ Button.ClickListener {
+ private Label label;
+
+ @Override
+ public void setup(WrappedRequest request) {
+ label = new Label("Hello Vaadin user");
+ Button button = new Button("Give label a new property data source...");
+ button.addClickListener(this);
+
+ addComponent(label);
+ addComponent(button);
+ }
+
+ public void buttonClick(ClickEvent event) {
+ ObjectProperty<String> p = new ObjectProperty<String>(
+ "This text should appear on the label after clicking the button.");
+
+ label.setPropertyDataSource(p);
+ //
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "The value should change by clicking the button";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 9618;
+ }
+
+} \ No newline at end of file