summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tooltip/LongTooltip.java
diff options
context:
space:
mode:
authorJuuso Valli <juuso@vaadin.com>2014-06-13 15:22:29 +0300
committerVaadin Code Review <review@vaadin.com>2014-06-23 12:49:48 +0000
commitd2b0e97c9fb43c1cf84947b42a6de6d58b2368ca (patch)
treec9cd159ef6511dfdd576c723bde58691b621b37d /uitest/src/com/vaadin/tests/tooltip/LongTooltip.java
parent5fe5f05576c166600f6912345f4580b5d0bfa8a1 (diff)
downloadvaadin-framework-d2b0e97c9fb43c1cf84947b42a6de6d58b2368ca.tar.gz
vaadin-framework-d2b0e97c9fb43c1cf84947b42a6de6d58b2368ca.zip
Upgrade tooltip tests from TB2 to TB4 (#14019)
Change-Id: I57fcffc5e9fb463759639c95a6b47fe09bfa268f
Diffstat (limited to 'uitest/src/com/vaadin/tests/tooltip/LongTooltip.java')
-rw-r--r--uitest/src/com/vaadin/tests/tooltip/LongTooltip.java52
1 files changed, 52 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/tooltip/LongTooltip.java b/uitest/src/com/vaadin/tests/tooltip/LongTooltip.java
new file mode 100644
index 0000000000..0eee9d4976
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/tooltip/LongTooltip.java
@@ -0,0 +1,52 @@
+package com.vaadin.tests.tooltip;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.tests.util.LoremIpsum;
+import com.vaadin.ui.Alignment;
+import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.TextField;
+
+public class LongTooltip extends TestBase {
+ private int tooltipCount = 0;
+
+ @Override
+ public void setup() {
+
+ GridLayout gl = new GridLayout(2, 2);
+ gl.setSizeFull();
+ TextField f1 = createField();
+ TextField f2 = createField();
+ TextField f3 = createField();
+ TextField f4 = createField();
+ gl.addComponent(f1);
+ gl.addComponent(f2);
+ gl.addComponent(f3);
+ gl.addComponent(f4);
+
+ gl.setComponentAlignment(f1, Alignment.TOP_LEFT);
+ gl.setComponentAlignment(f2, Alignment.TOP_RIGHT);
+ gl.setComponentAlignment(f3, Alignment.BOTTOM_LEFT);
+ gl.setComponentAlignment(f4, Alignment.BOTTOM_RIGHT);
+
+ getLayout().setSizeFull();
+ getLayout().addComponent(gl);
+
+ }
+
+ private TextField createField() {
+ final TextField field = new TextField();
+ field.setDescription("Tooltip " + Integer.toString(tooltipCount++)
+ + ": " + LoremIpsum.get(1000));
+ return field;
+ }
+
+ @Override
+ protected String getDescription() {
+ return "For a given cursor position the tooltip should always appear with the same size in the same position. The tooltip should also always be completely on screen and not cause any scrollbars to appear.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 7100;
+ }
+}