From 02524b63ff9169cbe36509909630c971a9efeb1f Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Wed, 1 Jul 2015 14:04:54 +0300 Subject: [PATCH] Make checkboxes immediate in tests. AudioTest was broken by the fix for #18102 as CheckBox is no longer immediate by default. Change-Id: I2022bae6445320d205fd8b419a28bffb64e70bd5 --- .../com/vaadin/tests/components/media/AudioTest.java | 4 ++++ uitest/src/com/vaadin/tests/tickets/Ticket1710.java | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/uitest/src/com/vaadin/tests/components/media/AudioTest.java b/uitest/src/com/vaadin/tests/components/media/AudioTest.java index c77583096d..1e1e26346c 100644 --- a/uitest/src/com/vaadin/tests/components/media/AudioTest.java +++ b/uitest/src/com/vaadin/tests/components/media/AudioTest.java @@ -50,15 +50,19 @@ public class AudioTest extends TestBase { CheckBox checkBox = new CheckBox("Show controls", new MethodProperty(audio, "showControls")); + checkBox.setImmediate(true); addComponent(checkBox); checkBox = new CheckBox("HtmlContentAllowed", new MethodProperty(audio, "htmlContentAllowed")); + checkBox.setImmediate(true); addComponent(checkBox); checkBox = new CheckBox("muted", new MethodProperty(audio, "muted")); + checkBox.setImmediate(true); addComponent(checkBox); checkBox = new CheckBox("autoplay", new MethodProperty(audio, "autoplay")); + checkBox.setImmediate(true); addComponent(checkBox); Button b = new Button("Change", new Button.ClickListener() { diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1710.java b/uitest/src/com/vaadin/tests/tickets/Ticket1710.java index e4687b6e37..3dda830607 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1710.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1710.java @@ -270,13 +270,17 @@ public class Ticket1710 extends com.vaadin.server.LegacyApplication { controls.addComponent(new Label("width")); controls.addComponent(new TextField(new MethodProperty( testedLayout, "width"))); - controls.addComponent(new CheckBox("%", - new MethodProperty(this, "widthPercents"))); + CheckBox widthPercentsCheckBox = new CheckBox("%", + new MethodProperty(this, "widthPercents")); + widthPercentsCheckBox.setImmediate(true); + controls.addComponent(widthPercentsCheckBox); controls.addComponent(new Label("height")); controls.addComponent(new TextField(new MethodProperty( testedLayout, "height"))); - controls.addComponent(new CheckBox("%", - new MethodProperty(this, "heightPercents"))); + CheckBox heightPercentsCheckBox = new CheckBox("%", + new MethodProperty(this, "heightPercents")); + heightPercentsCheckBox.setImmediate(true); + controls.addComponent(heightPercentsCheckBox); controls.addComponent(marginLeft); controls.addComponent(marginRight); controls.addComponent(marginTop); -- 2.39.5