diff options
author | Artur Signell <artur.signell@itmill.com> | 2011-02-01 08:19:26 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2011-02-01 08:19:26 +0000 |
commit | d139dfe35042dfb2d891c3a62d4c575e703361e8 (patch) | |
tree | 68bedbfda513a02c7090dc3189a8b469930a2d81 /tests | |
parent | 50c02591dc10bebe899f9ddbe300ddfe24defcc5 (diff) | |
download | vaadin-framework-d139dfe35042dfb2d891c3a62d4c575e703361e8.tar.gz vaadin-framework-d139dfe35042dfb2d891c3a62d4c575e703361e8.zip |
Test for sorting a tall Table
svn changeset:17101/svn branch:6.5
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/vaadin/tests/components/table/SortLongTable.html | 42 | ||||
-rw-r--r-- | tests/src/com/vaadin/tests/components/table/SortLongTable.java | 43 |
2 files changed, 85 insertions, 0 deletions
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 @@ +<?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.table.SortLongTable?restartApplication</td> + <td></td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=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]</td> + <td>120,10</td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>sorted-asc</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=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]</td> + <td>120,10</td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>sorted-desc</td> +</tr> + +</tbody></table> +</body> +</html> 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; + } + +} |