summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-01-02 14:16:06 +0000
committerVaadin Code Review <review@vaadin.com>2013-01-02 14:16:07 +0000
commit93b35b7895748db6074480a9a19a00073b520a63 (patch)
tree3c93b6aae95ec25f86380bd67b190e30f8e6ab52 /uitest
parentc26049ddd233f32f705cd8769a127facba66aa8c (diff)
parentc8cd986880196cad2d0be08a292d89ec8de8cc03 (diff)
downloadvaadin-framework-93b35b7895748db6074480a9a19a00073b520a63.tar.gz
vaadin-framework-93b35b7895748db6074480a9a19a00073b520a63.zip
Merge "Merge of (#9862) to Vaadin 7."
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/TooltipsOnScrollingWindow.html40
-rw-r--r--uitest/src/com/vaadin/tests/components/TooltipsOnScrollingWindow.java55
2 files changed, 95 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/TooltipsOnScrollingWindow.html b/uitest/src/com/vaadin/tests/components/TooltipsOnScrollingWindow.html
new file mode 100644
index 0000000000..b251cdf03b
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/TooltipsOnScrollingWindow.html
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8888/" />
+<title>TooltipsOnScrollingWindow</title>
+</head>
+<body>
+ <table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">TooltipsOnScrollingWindow</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.TooltipsOnScrollingWindow?restartApplication</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>showTooltip</td>
+ <td>vaadin=runcomvaadintestscomponentsTooltipsOnScrollingWindow::PID_Shoverable-label</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForVisible</td>
+ <td>vaadin=runcomvaadintestscomponentsTooltipsOnScrollingWindow::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>tooltip-is-positioned-correctly</td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/TooltipsOnScrollingWindow.java b/uitest/src/com/vaadin/tests/components/TooltipsOnScrollingWindow.java
new file mode 100644
index 0000000000..a38f9c274e
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/TooltipsOnScrollingWindow.java
@@ -0,0 +1,55 @@
+package com.vaadin.tests.components;
+
+import com.vaadin.tests.util.TestUtils;
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.Label;
+
+public class TooltipsOnScrollingWindow extends TestBase {
+
+ @Override
+ protected void setup() {
+
+ TestUtils
+ .injectCSS(
+ getMainWindow(),
+ ".v-generated-body { overflow: auto; } "
+ + ".v-app, .v-ui { overflow: visible !important;}"
+ + ".hoverable-label { position: fixed; bottom: 10px; right: 10px; }"
+ + ".hidden-label { position: absolute; top: 2000px; left: 2000px;}");
+
+ getLayout().getParent().setHeight("4000px");
+ getLayout().getParent().setWidth("4000px");
+ getLayout().setHeight("4000px");
+ getLayout().setWidth("4000px");
+
+ CssLayout layout = new CssLayout();
+ layout.setHeight("4000px");
+ layout.setWidth("4000px");
+ addComponent(layout);
+
+ Label hoverableLabel = new Label("Hover me");
+ hoverableLabel.setId("hoverable-label");
+ hoverableLabel.setStyleName("hoverable-label");
+ hoverableLabel.setWidth("-1px");
+ hoverableLabel.setDescription("Tooltip");
+ layout.addComponent(hoverableLabel);
+
+ Label hiddenLabel = new Label("Hidden");
+ hiddenLabel.setStyleName("hidden-label");
+ hiddenLabel.setWidth("-1px");
+ layout.addComponent(hiddenLabel);
+
+ getMainWindow().scrollIntoView(hiddenLabel);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Tooltip is displayed in the wrong place when component is at lower edge of the screen and application with following the css is scrolled vertically.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 9862;
+ }
+
+}