summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java')
-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);