summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2011-07-22 17:29:44 +0000
committerArtur Signell <artur.signell@itmill.com>2011-07-22 17:29:44 +0000
commit279d0158fbf8a38d67aab8044d26b30b3be1d802 (patch)
tree84f658f2921517006eb50098389ade6ff28e2a0d
parent7fd7c15b7f849781671ea8ded1afa703cbdddd67 (diff)
downloadvaadin-framework-279d0158fbf8a38d67aab8044d26b30b3be1d802.tar.gz
vaadin-framework-279d0158fbf8a38d67aab8044d26b30b3be1d802.zip
Test for #7309
svn changeset:19911/svn branch:6.6
-rw-r--r--tests/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.html32
-rw-r--r--tests/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.java45
2 files changed, 77 insertions, 0 deletions
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
index 0000000000..8795ad12dc
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.html
@@ -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
index 0000000000..157772f8cd
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.java
@@ -0,0 +1,45 @@
+package com.vaadin.tests.components.formlayout;
+
+import com.vaadin.tests.components.AbstractTestCase;
+import com.vaadin.ui.FormLayout;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.Window;
+
+public class TableInFormLayoutCausesScrolling extends AbstractTestCase {
+
+ @Override
+ public void init() {
+ // Window Initialization.
+ final Window window = new Window("Main Window");
+ setMainWindow(window);
+
+ // FormLayout creation
+ final FormLayout fl = new FormLayout();
+ window.setContent(fl);
+
+ // Add 20 TextField
+ for (int i = 20; i-- > 0;) {
+ fl.addComponent(new TextField());
+ }
+
+ // Add 1 selectable table with some items
+ final Table table = new Table();
+ table.setSelectable(true);
+ table.addContainerProperty("item", String.class, "");
+ for (int i = 50; i-- > 0;) {
+ table.addItem(new String[] { "item" + i }, i);
+ }
+ window.addComponent(table);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Clicking in the Table should not cause the page to scroll";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 7309;
+ }
+} \ No newline at end of file