]> source.dussan.org Git - vaadin-framework.git/commitdiff
Test case for #3814
authorArtur Signell <artur.signell@itmill.com>
Mon, 21 Dec 2009 10:03:04 +0000 (10:03 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 21 Dec 2009 10:03:04 +0000 (10:03 +0000)
svn changeset:10474/svn branch:6.2

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

diff --git a/tests/src/com/vaadin/tests/components/table/FixedHeightTable.html b/tests/src/com/vaadin/tests/components/table/FixedHeightTable.html
new file mode 100644 (file)
index 0000000..fb8f7c8
--- /dev/null
@@ -0,0 +1,32 @@
+<?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>FixedHeighTable</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.table.FixedHeightTable</td>
+       <td></td>
+</tr>
+<tr>
+       <td>waitForVaadin</td>
+       <td></td>
+       <td></td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>initial</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/src/com/vaadin/tests/components/table/FixedHeightTable.java b/tests/src/com/vaadin/tests/components/table/FixedHeightTable.java
new file mode 100644 (file)
index 0000000..f8e5c0d
--- /dev/null
@@ -0,0 +1,46 @@
+package com.vaadin.tests.components.table;\r
+\r
+import com.vaadin.tests.components.TestBase;\r
+import com.vaadin.ui.Table;\r
+import com.vaadin.ui.TextField;\r
+import com.vaadin.ui.VerticalLayout;\r
+\r
+public class FixedHeightTable extends TestBase {\r
+\r
+    private static final long serialVersionUID = -929892889178757852L;\r
+    Table table;\r
+    VerticalLayout layout;\r
+\r
+    @Override\r
+    public void setup() {\r
+\r
+        table = new Table();\r
+        table.addContainerProperty("test", TextField.class, null);\r
+        table.setSizeFull();\r
+        // bug: settings rows to 16 or more => last line is not rendered at all\r
+        // on the client-side.\r
+        final int maxRows = 16;\r
+        for (int i = 1; i <= maxRows; i++) {\r
+            final TextField tf = new TextField();\r
+            tf.setValue(i);\r
+            table.addItem(new Object[] { tf }, i);\r
+        }\r
+\r
+        VerticalLayout vl = new VerticalLayout();\r
+        vl.setHeight("400px");\r
+        vl.setWidth("300px");\r
+        vl.addComponent(table);\r
+\r
+        addComponent(vl);\r
+    }\r
+\r
+    @Override\r
+    protected String getDescription() {\r
+        return "The table contains 16 (1-16) rows which all should be visible";\r
+    }\r
+\r
+    @Override\r
+    protected Integer getTicketNumber() {\r
+        return 3814;\r
+    }\r
+}
\ No newline at end of file