]> source.dussan.org Git - vaadin-framework.git/commitdiff
Testcase for #5385
authorJohn Alhroos <john.ahlroos@itmill.com>
Fri, 6 Aug 2010 13:21:45 +0000 (13:21 +0000)
committerJohn Alhroos <john.ahlroos@itmill.com>
Fri, 6 Aug 2010 13:21:45 +0000 (13:21 +0000)
svn changeset:14427/svn branch:6.4

tests/src/com/vaadin/tests/components/table/SelectingItemScrollsRight.java [new file with mode: 0644]

diff --git a/tests/src/com/vaadin/tests/components/table/SelectingItemScrollsRight.java b/tests/src/com/vaadin/tests/components/table/SelectingItemScrollsRight.java
new file mode 100644 (file)
index 0000000..5284fa7
--- /dev/null
@@ -0,0 +1,40 @@
+package com.vaadin.tests.components.table;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Table;
+
+public class SelectingItemScrollsRight extends TestBase {
+
+    @Override
+    protected void setup() {
+        Table table = new Table();
+        table.setSelectable(true);
+        table.setWidth("300px");
+        table.setColumnWidth("Column", 500);
+        table.addGeneratedColumn("Column", new Table.ColumnGenerator() {
+            public Component generateCell(Table source, Object itemId,
+                    Object columnId) {
+                return new Label(
+                        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+            }
+        });
+
+        for (int i = 0; i < 50; i++)
+            table.addItem();
+
+        addComponent(table);
+    }
+
+    @Override
+    protected String getDescription() {
+        return "Clicking on an item that is longer than the table width should not scroll the table right";
+    }
+
+    @Override
+    protected Integer getTicketNumber() {
+        return 5385;
+    }
+
+}