From d0e524428add4a5685a67ddcdccb6260e9b330f6 Mon Sep 17 00:00:00 2001 From: Automerge Date: Tue, 15 May 2012 17:11:42 +0000 Subject: [PATCH] [merge from 6.7] Test case for #7387 svn changeset:23750/svn branch:6.8 --- .../treetable/ComponentsInTreeTable.java | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/testbench/com/vaadin/tests/components/treetable/ComponentsInTreeTable.java diff --git a/tests/testbench/com/vaadin/tests/components/treetable/ComponentsInTreeTable.java b/tests/testbench/com/vaadin/tests/components/treetable/ComponentsInTreeTable.java new file mode 100644 index 0000000000..5b7700bc6e --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/treetable/ComponentsInTreeTable.java @@ -0,0 +1,50 @@ +package com.vaadin.tests.components.treetable; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Component; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.Layout; +import com.vaadin.ui.TreeTable; + +public class ComponentsInTreeTable extends TestBase { + + @Override + protected void setup() { + TreeTable tt = new TreeTable(); + tt.setWidth("300px"); + addComponent(tt); + + Object id, id2; + + tt.addContainerProperty("foo", Component.class, ""); + tt.addContainerProperty("bar", String.class, "bar"); + tt.addContainerProperty("baz", String.class, "baz"); + + id = tt.addItem(); + Layout l = new HorizontalLayout(); + l.addComponent(new Label("bar")); + l.addComponent(new Label("bar")); + tt.getContainerProperty(id, "foo").setValue(l); + + id = tt.addItem(); + Label lbl = new Label("foo
bar"); + lbl.setContentMode(Label.CONTENT_XHTML); + tt.getContainerProperty(id, "foo").setValue(lbl); + + id2 = tt.addItem(); + tt.setParent(id2, id); + tt.getContainerProperty(id2, "foo").setValue(new Button("Test")); + } + + @Override + protected String getDescription() { + return "Components in TreeTable cells should be rendered inline with the expand/collapse arrow"; + } + + @Override + protected Integer getTicketNumber() { + return 7387; + } +} -- 2.39.5