From d139dfe35042dfb2d891c3a62d4c575e703361e8 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 1 Feb 2011 08:19:26 +0000 Subject: Test for sorting a tall Table svn changeset:17101/svn branch:6.5 --- .../tests/components/table/SortLongTable.html | 42 +++++++++++++++++++++ .../tests/components/table/SortLongTable.java | 43 ++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 tests/src/com/vaadin/tests/components/table/SortLongTable.html create mode 100644 tests/src/com/vaadin/tests/components/table/SortLongTable.java (limited to 'tests') diff --git a/tests/src/com/vaadin/tests/components/table/SortLongTable.html b/tests/src/com/vaadin/tests/components/table/SortLongTable.html new file mode 100644 index 0000000000..96513509e1 --- /dev/null +++ b/tests/src/com/vaadin/tests/components/table/SortLongTable.html @@ -0,0 +1,42 @@ + + + + + + +New Test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.components.table.SortLongTable?restartApplication
mouseClickvaadin=runcomvaadintestscomponentstableSortLongTable::/VVerticalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]120,10
screenCapturesorted-asc
mouseClickvaadin=runcomvaadintestscomponentstableSortLongTable::/VVerticalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]120,10
screenCapturesorted-desc
+ + diff --git a/tests/src/com/vaadin/tests/components/table/SortLongTable.java b/tests/src/com/vaadin/tests/components/table/SortLongTable.java new file mode 100644 index 0000000000..cc9dec0965 --- /dev/null +++ b/tests/src/com/vaadin/tests/components/table/SortLongTable.java @@ -0,0 +1,43 @@ +package com.vaadin.tests.components.table; + +import com.vaadin.tests.components.AbstractTestCase; +import com.vaadin.ui.Table; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.Window; + +public class SortLongTable extends AbstractTestCase { + + @Override + public void init() { + final int NUMBER_OF_ROWS = 100; // Works with 10 + + Window mainWindow = new Window("Table Sort Test"); + mainWindow.setSizeFull(); + setMainWindow(mainWindow); + + Table ptable = new Table(); + ptable.addContainerProperty("Sort_me_please", String.class, "--"); + for (int i = NUMBER_OF_ROWS - 1; i >= 0; i--) { + ptable.addItem("" + i).getItemProperty("Sort_me_please") + .setValue("Value " + String.format("%02d", i)); + } + + ptable.setWidth("100%"); + ptable.setPageLength(NUMBER_OF_ROWS); + + VerticalLayout vl = new VerticalLayout(); + vl.addComponent(ptable); + mainWindow.addComponent(vl); + } + + @Override + protected String getDescription() { + return "Clicking on the header should sort the column. It should not cause the headers to be scrolled out of view."; + } + + @Override + protected Integer getTicketNumber() { + return 6367; + } + +} -- cgit v1.2.3