]> source.dussan.org Git - vaadin-framework.git/commitdiff
Test for #7309
authorArtur Signell <artur.signell@itmill.com>
Fri, 22 Jul 2011 17:29:44 +0000 (17:29 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 22 Jul 2011 17:29:44 +0000 (17:29 +0000)
svn changeset:19911/svn branch:6.6

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

diff --git a/tests/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.html b/tests/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.html
new file mode 100644 (file)
index 0000000..8795ad1
--- /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>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.formlayout.TableInFormLayoutCausesScrolling?restartApplication</td>
+       <td></td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentsformlayoutTableInFormLayoutCausesScrolling::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]/domChild[0]/domChild[0]</td>
+       <td>12,13</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>should-be-scrolled-up</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.java b/tests/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.java
new file mode 100644 (file)
index 0000000..157772f
--- /dev/null
@@ -0,0 +1,45 @@
+package com.vaadin.tests.components.formlayout;\r
+\r
+import com.vaadin.tests.components.AbstractTestCase;\r
+import com.vaadin.ui.FormLayout;\r
+import com.vaadin.ui.Table;\r
+import com.vaadin.ui.TextField;\r
+import com.vaadin.ui.Window;\r
+\r
+public class TableInFormLayoutCausesScrolling extends AbstractTestCase {\r
+\r
+    @Override\r
+    public void init() {\r
+        // Window Initialization.\r
+        final Window window = new Window("Main Window");\r
+        setMainWindow(window);\r
+\r
+        // FormLayout creation\r
+        final FormLayout fl = new FormLayout();\r
+        window.setContent(fl);\r
+\r
+        // Add 20 TextField\r
+        for (int i = 20; i-- > 0;) {\r
+            fl.addComponent(new TextField());\r
+        }\r
+\r
+        // Add 1 selectable table with some items\r
+        final Table table = new Table();\r
+        table.setSelectable(true);\r
+        table.addContainerProperty("item", String.class, "");\r
+        for (int i = 50; i-- > 0;) {\r
+            table.addItem(new String[] { "item" + i }, i);\r
+        }\r
+        window.addComponent(table);\r
+    }\r
+\r
+    @Override\r
+    protected String getDescription() {\r
+        return "Clicking in the Table should not cause the page to scroll";\r
+    }\r
+\r
+    @Override\r
+    protected Integer getTicketNumber() {\r
+        return 7309;\r
+    }\r
+}
\ No newline at end of file