aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components/table/TableModifcationsWhenScrolledRight.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/table/TableModifcationsWhenScrolledRight.java')
-rw-r--r--uitest/src/com/vaadin/tests/components/table/TableModifcationsWhenScrolledRight.java52
1 files changed, 52 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/table/TableModifcationsWhenScrolledRight.java b/uitest/src/com/vaadin/tests/components/table/TableModifcationsWhenScrolledRight.java
new file mode 100644
index 0000000000..74a5089a84
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/table/TableModifcationsWhenScrolledRight.java
@@ -0,0 +1,52 @@
+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 TableModifcationsWhenScrolledRight extends TestBase {
+
+ @Override
+ protected void setup() {
+ final Table t = new Table();
+ Button btn = new Button("Add row");
+ Integer row = 1;
+
+ t.setPageLength(5);
+ t.setWidth("400px");
+ t.addContainerProperty("name", String.class, "NA");
+ t.setColumnCollapsingAllowed(true);
+
+ for (Integer col = 0; col < 10; col++) {
+ t.addContainerProperty(col, Integer.class, col);
+ t.setColumnWidth(col, 50);
+ }
+ t.addItem(row).getItemProperty("name").setValue("Row" + row);
+
+ btn.addListener(new ClickListener() {
+ Integer row = 2;
+
+ @Override
+ public void buttonClick(ClickEvent event) {
+ t.addItem(row).getItemProperty("name").setValue("Row" + row);
+ row++;
+ }
+ });
+
+ addComponent(t);
+ addComponent(btn);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Scroll right and then click \"Add row\". The table will scroll back left and the headers should also.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 5382;
+ }
+
+}