summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-01-23 12:18:14 +0000
committerVaadin Code Review <review@vaadin.com>2013-01-23 12:18:15 +0000
commitf2c16b9c76d840f932c664261270a3ad49a9473a (patch)
tree91ab94802b704268eaef50f7a1c533465c8ab6ba
parentc62a76f02d0587aa9bf6c1a95d2c308dbea0093b (diff)
parentec563bab32daf28e7b1329975a001b1701c117a3 (diff)
downloadvaadin-framework-f2c16b9c76d840f932c664261270a3ad49a9473a.tar.gz
vaadin-framework-f2c16b9c76d840f932c664261270a3ad49a9473a.zip
Merge "Disable Form tooltips, as Form shows both description and component error as a part of the layout (#10784)"
-rw-r--r--client/src/com/vaadin/client/ui/form/FormConnector.java11
-rw-r--r--uitest/src/com/vaadin/tests/components/form/FormTooltips.html91
2 files changed, 18 insertions, 84 deletions
diff --git a/client/src/com/vaadin/client/ui/form/FormConnector.java b/client/src/com/vaadin/client/ui/form/FormConnector.java
index b87faf7b30..22277b6974 100644
--- a/client/src/com/vaadin/client/ui/form/FormConnector.java
+++ b/client/src/com/vaadin/client/ui/form/FormConnector.java
@@ -26,7 +26,6 @@ import com.vaadin.client.LayoutManager;
import com.vaadin.client.Paintable;
import com.vaadin.client.TooltipInfo;
import com.vaadin.client.UIDL;
-import com.vaadin.client.Util;
import com.vaadin.client.ui.AbstractComponentContainerConnector;
import com.vaadin.client.ui.Icon;
import com.vaadin.client.ui.ShortcutActionHandler;
@@ -228,12 +227,8 @@ public class FormConnector extends AbstractComponentContainerConnector
@Override
public TooltipInfo getTooltipInfo(Element element) {
- if (Util.getConnectorForElement(getConnection(), getWidget()
- .getParent(), (com.google.gwt.user.client.Element) element
- .cast()) != this) {
- // Do not show tooltips when hovering over child fields
- return null;
- }
- return super.getTooltipInfo(element);
+ // Form shows its description and error message
+ // as a part of the actual layout
+ return null;
}
}
diff --git a/uitest/src/com/vaadin/tests/components/form/FormTooltips.html b/uitest/src/com/vaadin/tests/components/form/FormTooltips.html
index 0d069efb0b..ee693fd4be 100644
--- a/uitest/src/com/vaadin/tests/components/form/FormTooltips.html
+++ b/uitest/src/com/vaadin/tests/components/form/FormTooltips.html
@@ -3,13 +3,13 @@
<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>New Test</title>
+<link rel="selenium.base" href="http://localhost:8070" />
+<title>FormTooltips</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">New Test</td></tr>
+<tr><td rowspan="1" colspan="3">FormTooltips</td></tr>
</thead><tbody>
<tr>
<td>open</td>
@@ -68,97 +68,36 @@
<td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
<td></td>
</tr>
-<!--Form description tooltip-->
+<!--Form should not have a description tooltip-->
<tr>
<td>showTooltip</td>
<td>vaadin=runcomvaadintestscomponentsformFormTooltips::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VForm[0]/domChild[0]/domChild[1]</td>
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
- <td></td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/VErrorMessage[0]/HTML[0]/domChild[0]</td>
- <td>Form error</td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
- <td>Some description</td>
-</tr>
-<tr>
- <td>mouseMove</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::</td>
+ <td>pause</td>
+ <td>1000</td>
<td></td>
</tr>
<tr>
- <td>waitForElementNotPresent</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]</td>
<td></td>
</tr>
-<!--Form error message tooltip-->
+<!--Form error message should not have a tooltip-->
<tr>
<td>showTooltip</td>
<td>vaadin=runcomvaadintestscomponentsformFormTooltips::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VForm[0]/domChild[0]/domChild[3]/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
- <td></td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/VErrorMessage[0]/HTML[0]/domChild[0]</td>
- <td>Form error</td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
- <td>Some description</td>
-</tr>
-<tr>
- <td>mouseMove</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForElementNotPresent</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
- <td></td>
-</tr>
-<!--last name parent should have error tooltip-->
-<tr>
- <td>showTooltip</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VForm[0]/domChild[0]/domChild[3]</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForElementPresent</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
- <td></td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/VErrorMessage[0]/HTML[0]/domChild[0]</td>
- <td>Form error</td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
- <td>Some description</td>
-</tr>
-<tr>
- <td>mouseMove</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::</td>
+ <td>pause</td>
+ <td>1000</td>
<td></td>
</tr>
<tr>
- <td>waitForElementNotPresent</td>
- <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]</td>
<td></td>
</tr>
<!--last name should have no tooltip-->
@@ -169,7 +108,7 @@
</tr>
<tr>
<td>pause</td>
- <td>300</td>
+ <td>1000</td>
<td></td>
</tr>
<tr>
@@ -185,7 +124,7 @@
</tr>
<tr>
<td>pause</td>
- <td>300</td>
+ <td>1000</td>
<td></td>
</tr>
<tr>