From 279d0158fbf8a38d67aab8044d26b30b3be1d802 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 22 Jul 2011 17:29:44 +0000 Subject: [PATCH] Test for #7309 svn changeset:19911/svn branch:6.6 --- .../TableInFormLayoutCausesScrolling.html | 32 +++++++++++++ .../TableInFormLayoutCausesScrolling.java | 45 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 tests/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.html create mode 100644 tests/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrolling.java 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 @@ + + + + + + +New Test + + + + + + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.components.formlayout.TableInFormLayoutCausesScrolling?restartApplication
mouseClickvaadin=runcomvaadintestscomponentsformlayoutTableInFormLayoutCausesScrolling::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]/domChild[0]/domChild[0]12,13
screenCaptureshould-be-scrolled-up
+ + 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 -- 2.39.5