aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testbench/com/vaadin
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2011-12-08 13:04:01 +0000
committerLeif Åstrand <leif@vaadin.com>2011-12-08 13:04:01 +0000
commit946ea244388af573fb8cb7b7d0523046b7ceb863 (patch)
tree893846e231dc7e4141f8864f9df4863645741ab8 /tests/testbench/com/vaadin
parent3b0da56451c49a1a1ecc7af7db97cc04339c7c20 (diff)
downloadvaadin-framework-946ea244388af573fb8cb7b7d0523046b7ceb863.tar.gz
vaadin-framework-946ea244388af573fb8cb7b7d0523046b7ceb863.zip
Test case for #8077
svn changeset:22319/svn branch:6.7
Diffstat (limited to 'tests/testbench/com/vaadin')
-rw-r--r--tests/testbench/com/vaadin/tests/components/table/AddNonRenderedRow.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/table/AddNonRenderedRow.java b/tests/testbench/com/vaadin/tests/components/table/AddNonRenderedRow.java
new file mode 100644
index 0000000000..5486d6248d
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/table/AddNonRenderedRow.java
@@ -0,0 +1,48 @@
+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;
+
+public class AddNonRenderedRow extends TestBase {
+ int index = 0;
+
+ private final Table table = new Table();
+
+ @Override
+ public void setup() {
+
+ table.setPageLength(5);
+ table.addContainerProperty("rowID", Integer.class, null);
+ for (int i = 0; i < 4; i++) {
+ addRow();
+ }
+
+ Button addrowButton = new Button("Add row");
+ addrowButton.addListener(new ClickListener() {
+ public void buttonClick(ClickEvent pEvent) {
+ addRow();
+ }
+ });
+
+ addComponent(table);
+ addComponent(addrowButton);
+ }
+
+ private void addRow() {
+ table.addItem(new Object[] { Integer.valueOf(++index) }, null);
+ // table.refreshRowCache();
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Adding a row to the table should work even when the added rows are not visible.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return Integer.valueOf(8077);
+ }
+} \ No newline at end of file