diff options
author | Automerge <automerge@vaadin.com> | 2012-05-15 17:11:42 +0000 |
---|---|---|
committer | Automerge <automerge@vaadin.com> | 2012-05-15 17:11:42 +0000 |
commit | d0e524428add4a5685a67ddcdccb6260e9b330f6 (patch) | |
tree | 5aca5d01aa90312b6f7431be3ba6da02ef58c809 /tests | |
parent | 41f5328ef5600ce61bb323814f605cc6e77cbca2 (diff) | |
download | vaadin-framework-d0e524428add4a5685a67ddcdccb6260e9b330f6.tar.gz vaadin-framework-d0e524428add4a5685a67ddcdccb6260e9b330f6.zip |
[merge from 6.7] Test case for #7387
svn changeset:23750/svn branch:6.8
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/treetable/ComponentsInTreeTable.java | 50 |
1 files changed, 50 insertions, 0 deletions
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("<b>foo</b><br/><i>bar</i>"); + 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; + } +} |