summaryrefslogtreecommitdiffstats
path: root/tests/testbench
diff options
context:
space:
mode:
authorAutomerge <automerge@vaadin.com>2012-03-14 14:07:51 +0000
committerAutomerge <automerge@vaadin.com>2012-03-14 14:07:51 +0000
commit77a4f28b7e59895946e6335fe43af3c72cd77796 (patch)
tree63798488c146b346f6d5460d730bbae9b3a127e2 /tests/testbench
parent608bac4d2d3f8ddf7e72fe01de3a76070015fab3 (diff)
downloadvaadin-framework-77a4f28b7e59895946e6335fe43af3c72cd77796.tar.gz
vaadin-framework-77a4f28b7e59895946e6335fe43af3c72cd77796.zip
[merge from 6.7] Test for #7607
svn changeset:23243/svn branch:6.8
Diffstat (limited to 'tests/testbench')
-rw-r--r--tests/testbench/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.html62
-rw-r--r--tests/testbench/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.java55
2 files changed, 117 insertions, 0 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.html b/tests/testbench/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.html
new file mode 100644
index 0000000000..8881c0d2f5
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.html
@@ -0,0 +1,62 @@
+<?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="http://localhost:8067/" />
+<title>SetCurrentPageFirstItemId</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SetCurrentPageFirstItemId</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/SetCurrentPageFirstItemId?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runSetCurrentPageFirstItemId::/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runSetCurrentPageFirstItemId::/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runSetCurrentPageFirstItemId::/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runSetCurrentPageFirstItemId::/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runSetCurrentPageFirstItemId::/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>pause</td>
+ <td>300</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runSetCurrentPageFirstItemId::/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[24]/domChild[0]/domChild[0]</td>
+ <td>24</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>scrolled-to-bottom</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/testbench/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.java b/tests/testbench/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.java
new file mode 100644
index 0000000000..536348a393
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/table/SetCurrentPageFirstItemId.java
@@ -0,0 +1,55 @@
+package com.vaadin.tests.components.table;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Button.ClickListener;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
+
+public class SetCurrentPageFirstItemId extends TestBase {
+ int index = 0;
+
+ private final Table table = new Table();
+
+ @Override
+ public void setup() {
+
+ VerticalLayout mainLayout = new VerticalLayout();
+ mainLayout.setHeight("100%");
+ mainLayout.setMargin(true);
+
+ getMainWindow().setContent(mainLayout);
+
+ mainLayout.addComponent(table);
+ table.setSizeFull();
+ table.addContainerProperty("rowID", Integer.class, null);
+ for (int i = 0; i < 20; i++) {
+ addRow();
+ }
+
+ Button addrowButton = new Button("Add row");
+ addrowButton.addListener(new ClickListener() {
+ public void buttonClick(ClickEvent pEvent) {
+ Object id = addRow();
+ table.setCurrentPageFirstItemId(id);
+ }
+ });
+
+ mainLayout.addComponent(addrowButton);
+ }
+
+ private Object addRow() {
+ return table.addItem(new Object[] { index++ }, null);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Table.setCurrentPageFirstItemId doesn't always work with full sized Table";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 7607;
+ }
+} \ No newline at end of file