summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authormichaelvogt <michael@vaadin.com>2013-04-03 14:12:42 +0300
committerVaadin Code Review <review@vaadin.com>2013-04-03 11:39:17 +0000
commitad290f8c65057bdef33ec73cb49a8c6d10b9e356 (patch)
tree412d33a55ba9bf108802e6165514558f413e125c /uitest
parentd94f2cc6c3a1af73077ff902856da03c41a6e824 (diff)
downloadvaadin-framework-ad290f8c65057bdef33ec73cb49a8c6d10b9e356.tar.gz
vaadin-framework-ad290f8c65057bdef33ec73cb49a8c6d10b9e356.zip
Fix for CheckBox and Layout (#11407)
Change in CheckBoxConnector led to wrong enabled behaviour and addition to top coordinate to prevent scrollbars with VPopupCalendar Change-Id: I381ab7c8a605535280ae58716181ef4c346997f7
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java b/uitest/src/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
index 4ffe7f806e..ec323f2db2 100644
--- a/uitest/src/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
+++ b/uitest/src/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
@@ -55,6 +55,7 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
addComponent(toggleIcon());
addComponent(toggleReadOnly());
addComponent(toggleInvalid());
+ addComponent(toggleEnabled());
addComponent(addCaptionText());
// layoutParent.addComponent(new
// NativeButton("Button right of layout"));
@@ -125,6 +126,21 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
return readOnlyToggle;
}
+ private Component toggleEnabled() {
+ CheckBox enabledToggle = new CheckBox();
+ enabledToggle.setImmediate(true);
+ enabledToggle.setValue(true);
+ enabledToggle.setCaption("Enabled");
+ enabledToggle.addValueChangeListener(new ValueChangeListener() {
+ @Override
+ public void valueChange(ValueChangeEvent event) {
+ setEnabled((Boolean) event.getProperty().getValue());
+ }
+ });
+
+ return enabledToggle;
+ }
+
private Component toggleInvalid() {
CheckBox invalid = new CheckBox("Invalid");
invalid.setImmediate(true);
@@ -174,6 +190,12 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
}
}
+ protected void setEnabled(boolean value) {
+ for (AbstractField<?> c : components) {
+ c.setEnabled(value);
+ }
+ }
+
private Component toggleError() {
CheckBox errorToggle = new CheckBox();
errorToggle.setImmediate(true);