aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com
diff options
context:
space:
mode:
authorAlexey Fansky <alexey.fansky@effective-soft.com>2015-02-06 16:25:44 -0800
committerVaadin Code Review <review@vaadin.com>2015-03-03 08:19:26 +0000
commit05fc5806e7946223e057ad7458a18dadceb0566f (patch)
tree9914df7dd6fb8ab3283157e012c4c9cb6c927bac /uitest/src/com
parent0d59ce144c6d6e97e45004da849ca4a55fac4883 (diff)
downloadvaadin-framework-05fc5806e7946223e057ad7458a18dadceb0566f.tar.gz
vaadin-framework-05fc5806e7946223e057ad7458a18dadceb0566f.zip
Displaying tooltip in slot for touch devices (#15353)
Change-Id: Ia2fce4dbfc205b44622557017afff19c4a2ef7df
Diffstat (limited to 'uitest/src/com')
-rw-r--r--uitest/src/com/vaadin/tests/components/TouchDevicesTooltip.java57
1 files changed, 57 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/TouchDevicesTooltip.java b/uitest/src/com/vaadin/tests/components/TouchDevicesTooltip.java
new file mode 100644
index 0000000000..1a3b4cdda5
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/TouchDevicesTooltip.java
@@ -0,0 +1,57 @@
+package com.vaadin.tests.components;
+
+import com.vaadin.data.util.converter.StringToIntegerConverter;
+import com.vaadin.data.validator.IntegerRangeValidator;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.TextField;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+public class TouchDevicesTooltip extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ final Label errorLabel = new Label("No error");
+ addComponent(errorLabel);
+
+ TextField textField = new TextField("Value");
+ textField.setConverter(new StringToIntegerConverter());
+ textField.addValidator(new IntegerRangeValidator("incorrect value", 0, 100));
+ textField.setImmediate(true);
+ textField.setValue("-5");
+ addComponent(textField);
+
+ TextField textField2 = new TextField("Value2");
+ textField2.setConverter(new StringToIntegerConverter());
+ textField2.addValidator(new IntegerRangeValidator("incorrect value2", 0, 100));
+ textField2.setImmediate(true);
+ textField2.setValue("-5");
+ addComponent(textField2);
+ }
+
+ public static class Bean {
+ @NotNull
+ @Min(0)
+ private Integer value;
+
+ public Integer getValue() {
+ return value;
+ }
+
+ public void setValue(Integer value) {
+ this.value = value;
+ }
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 15353;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Displaying error message in slot for touch devices";
+ }
+}