diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/layouts/CssLayoutRemoveComponent.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/layouts/CssLayoutRemoveComponent.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/layouts/CssLayoutRemoveComponent.java b/uitest/src/com/vaadin/tests/layouts/CssLayoutRemoveComponent.java new file mode 100644 index 0000000000..093dc782fb --- /dev/null +++ b/uitest/src/com/vaadin/tests/layouts/CssLayoutRemoveComponent.java @@ -0,0 +1,43 @@ +package com.vaadin.tests.layouts; + +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.CssLayout; +import com.vaadin.ui.TextField; + +@SuppressWarnings("serial") +public class CssLayoutRemoveComponent extends TestBase { + + @Override + protected void setup() { + final CssLayout layout = new CssLayout(); + final TextField tf = new TextField("Caption1"); + Button b = new Button("Remove field ", new ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + layout.removeComponent(tf); + } + + }); + layout.addComponent(tf); + layout.addComponent(b); + layout.addComponent(new TextField("Caption2")); + layout.addComponent(new TextField("Caption3")); + + addComponent(layout); + } + + @Override + protected String getDescription() { + return "Clicking on the button should remove one text field but other textfields and their captions should stay intact."; + } + + @Override + protected Integer getTicketNumber() { + return 5778; + } + +} |