]> source.dussan.org Git - vaadin-framework.git/commitdiff
Testcase for #9596
authorJohn Ahlroos <john@vaadin.com>
Thu, 13 Sep 2012 07:38:58 +0000 (10:38 +0300)
committerJohn Ahlroos <john@vaadin.com>
Thu, 13 Sep 2012 07:39:12 +0000 (10:39 +0300)
uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.html [new file with mode: 0644]
uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.java [new file with mode: 0644]

diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.html b/uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.html
new file mode 100644 (file)
index 0000000..1957637
--- /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.orderedlayout.HorizontalRelativeChildren?restartApplication</td>
+       <td></td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.java b/uitest/src/com/vaadin/tests/components/orderedlayout/HorizontalRelativeChildren.java
new file mode 100644 (file)
index 0000000..dbec701
--- /dev/null
@@ -0,0 +1,56 @@
+package com.vaadin.tests.components.orderedlayout;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Alignment;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.TextArea;
+
+public class HorizontalRelativeChildren extends TestBase {
+
+    @Override
+    protected void setup() {
+
+        HorizontalLayout hl = new HorizontalLayout();
+
+        TextArea areaUndefined = new TextArea();
+        areaUndefined.setSizeUndefined();
+        areaUndefined.setValue("Undefined height");
+        hl.addComponent(areaUndefined);
+
+        TextArea areaDefined = new TextArea();
+        areaDefined.setHeight("200px");
+        areaDefined.setValue("200px height");
+        hl.addComponent(areaDefined);
+
+        TextArea areaRelativeBottom = new TextArea();
+        areaRelativeBottom.setHeight("50%");
+        areaRelativeBottom.setValue("50% height, bottom align");
+        hl.addComponent(areaRelativeBottom);
+        hl.setComponentAlignment(areaRelativeBottom, Alignment.BOTTOM_LEFT);
+
+        TextArea areaRelativeCenter = new TextArea();
+        areaRelativeCenter.setHeight("50%");
+        areaRelativeCenter.setValue("50% height, center align");
+        hl.addComponent(areaRelativeCenter);
+        hl.setComponentAlignment(areaRelativeCenter, Alignment.MIDDLE_LEFT);
+
+        TextArea areaRelativeTop = new TextArea();
+        areaRelativeTop.setHeight("50%");
+        areaRelativeTop.setValue("50% height, top align");
+        hl.addComponent(areaRelativeTop);
+        hl.setComponentAlignment(areaRelativeTop, Alignment.TOP_LEFT);
+
+        addComponent(hl);
+    }
+
+    @Override
+    protected String getDescription() {
+        return null;
+    }
+
+    @Override
+    protected Integer getTicketNumber() {
+        return null;
+    }
+
+}