]> source.dussan.org Git - vaadin-framework.git/commitdiff
Tests for #4997
authorJohn Alhroos <john.ahlroos@itmill.com>
Mon, 28 Jun 2010 13:23:56 +0000 (13:23 +0000)
committerJohn Alhroos <john.ahlroos@itmill.com>
Mon, 28 Jun 2010 13:23:56 +0000 (13:23 +0000)
svn changeset:13947/svn branch:6.4

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

diff --git a/tests/src/com/vaadin/tests/components/form/FormFieldCaptionsStyles.html b/tests/src/com/vaadin/tests/components/form/FormFieldCaptionsStyles.html
new file mode 100644 (file)
index 0000000..10ebb37
--- /dev/null
@@ -0,0 +1,27 @@
+<?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="" />
+<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/com.vaadin.tests.components.form.FormFieldCaptionsStyles</td>
+       <td></td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>FirstFieldRedRestBlue</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/src/com/vaadin/tests/components/form/FormFieldCaptionsStyles.java b/tests/src/com/vaadin/tests/components/form/FormFieldCaptionsStyles.java
new file mode 100644 (file)
index 0000000..c92e31b
--- /dev/null
@@ -0,0 +1,46 @@
+package com.vaadin.tests.components.form;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.FormLayout;
+import com.vaadin.ui.TextField;
+
+public class FormFieldCaptionsStyles extends TestBase {
+
+    @Override
+    protected void setup() {
+
+        setTheme("tests-tickets");
+
+        FormLayout layout = new FormLayout();
+
+        TextField field1 = new TextField("Red style");
+        field1.setStyleName("ticket4997-red");
+        layout.addComponent(field1);
+
+        TextField field2 = new TextField("Blue style");
+        field2.setStyleName("ticket4997-blue");
+        layout.addComponent(field2);
+
+        TextField field3 = new TextField("Red-Blue style");
+        field3.addStyleName("ticket4997-red");
+        field3.addStyleName("ticket4997-blue");
+        layout.addComponent(field3);
+
+        TextField field4 = new TextField("Disabled");
+        field4.setEnabled(false);
+        layout.addComponent(field4);
+
+        addComponent(layout);
+    }
+
+    @Override
+    protected String getDescription() {
+        return "The field captions should have the same style names as the field";
+    }
+
+    @Override
+    protected Integer getTicketNumber() {
+        return 4997;
+    }
+
+}