diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-07-26 09:48:27 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-07-26 09:48:27 +0300 |
commit | bcbb2c10efec9e27515e474f78d7371082042884 (patch) | |
tree | 2984e252dfdb46dd568d9d79bf3326ef1e0f8072 | |
parent | 39c516f3b96a0a9bfe987d0f6710bdc1376c1d67 (diff) | |
download | vaadin-framework-bcbb2c10efec9e27515e474f78d7371082042884.tar.gz vaadin-framework-bcbb2c10efec9e27515e474f78d7371082042884.zip |
Test case for #9172
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/TooltipInWindow.html | 69 | ||||
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/TooltipInWindow.java | 40 |
2 files changed, 109 insertions, 0 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/TooltipInWindow.html b/tests/testbench/com/vaadin/tests/components/TooltipInWindow.html new file mode 100644 index 0000000000..2915bb057b --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/TooltipInWindow.html @@ -0,0 +1,69 @@ +<?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="" /> +<title>integration-test-liferay-5.2.3-portlet2</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">integration-test-liferay-5.2.3-portlet2</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.TooltipInWindow?restartApplication</td> + <td></td> +</tr> +<!--Show tooltip in Root--> +<tr> + <td>showTooltip</td> + <td>vaadin=runcomvaadintestscomponentsTooltipInWindow::/VVerticalLayout[0]/VVerticalLayout[0]/VTextField[0]</td> + <td>5,5</td> +</tr> +<tr> + <td>pause</td> + <td>1000</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentsTooltipInWindow::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td> + <td>My tooltip</td> +</tr> +<!--Hide the tooltip--> +<tr> + <td>showTooltip</td> + <td>vaadin=runcomvaadintestscomponentsTooltipInWindow::/VVerticalLayout[0]</td> + <td>0,0</td> +</tr> +<tr> + <td>pause</td> + <td>1000</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestscomponentsTooltipInWindow::Root/VTooltip[0]</td> + <td></td> +</tr> +<!--Show tooltip in Window--> +<tr> + <td>showTooltip</td> + <td>vaadin=runcomvaadintestscomponentsTooltipInWindow::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/VTextField[0]</td> + <td>5,5</td> +</tr> +<tr> + <td>pause</td> + <td>1000</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentsTooltipInWindow::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td> + <td>My tooltip</td> +</tr> +</tbody></table> +</body> +</html> diff --git a/tests/testbench/com/vaadin/tests/components/TooltipInWindow.java b/tests/testbench/com/vaadin/tests/components/TooltipInWindow.java new file mode 100644 index 0000000000..9d0b7bcf42 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/TooltipInWindow.java @@ -0,0 +1,40 @@ +/* +@VaadinApache2LicenseForJavaFiles@ + */ + +package com.vaadin.tests.components; + +import com.vaadin.terminal.WrappedRequest; +import com.vaadin.ui.TextField; +import com.vaadin.ui.Window; + +public class TooltipInWindow extends AbstractTestRoot { + + @Override + protected void setup(WrappedRequest request) { + Window window = new Window("Window"); + window.getContent().setSizeUndefined(); + window.center(); + window.addComponent(createTextField()); + + addWindow(window); + addComponent(createTextField()); + } + + private TextField createTextField() { + TextField tf = new TextField("TextField with a tooltip"); + tf.setDescription("My tooltip"); + return tf; + } + + @Override + protected String getTestDescription() { + return "Tooltips should also work in a Window (as well as in other overlays)"; + } + + @Override + protected Integer getTicketNumber() { + return Integer.valueOf(9172); + } + +} |