aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-02-19 09:44:52 +0000
committerArtur Signell <artur.signell@itmill.com>2010-02-19 09:44:52 +0000
commitb1a0c7b4032931cab3d53ca6389ae27624c8d76f (patch)
treea1e550f1784170f018bd58c71567d6137dd61111
parent53e3bc30d45bee3b2e238621f247d9b12c216318 (diff)
downloadvaadin-framework-b1a0c7b4032931cab3d53ca6389ae27624c8d76f.tar.gz
vaadin-framework-b1a0c7b4032931cab3d53ca6389ae27624c8d76f.zip
Test case for #4204
svn changeset:11394/svn branch:6.3
-rw-r--r--tests/src/com/vaadin/tests/layouts/CssLayoutRemoveComponentWithCaption.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/layouts/CssLayoutRemoveComponentWithCaption.java b/tests/src/com/vaadin/tests/layouts/CssLayoutRemoveComponentWithCaption.java
new file mode 100644
index 0000000000..00579380d1
--- /dev/null
+++ b/tests/src/com/vaadin/tests/layouts/CssLayoutRemoveComponentWithCaption.java
@@ -0,0 +1,42 @@
+package com.vaadin.tests.layouts;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Button.ClickListener;
+
+public class CssLayoutRemoveComponentWithCaption extends TestBase {
+
+ @Override
+ protected void setup() {
+ final CssLayout layout = new CssLayout();
+ final TextField tf = new TextField("Caption");
+ Button b = new Button("Remove field and add new", new ClickListener() {
+
+ @Override
+ public void buttonClick(ClickEvent event) {
+ layout.removeComponent(tf);
+ addComponent(new TextField("new field"));
+
+ }
+
+ });
+ layout.addComponent(tf);
+ layout.addComponent(b);
+
+ addComponent(layout);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Clicking on the button should remove the text field and add a new 'new field' text field";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 4204;
+ }
+
+}