summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuuso Valli <juuso@vaadin.com>2014-07-21 09:14:06 +0300
committerVaadin Code Review <review@vaadin.com>2014-07-21 13:11:36 +0000
commit1b218a1f9f4713d23b8563acd6257fb912afcc15 (patch)
tree5dfb164fcebbef250b3b1613e5f1b0c7726cb81b
parent4fafa9dbbccc387e0bd3c1a0d44f74b3a111b06c (diff)
downloadvaadin-framework-1b218a1f9f4713d23b8563acd6257fb912afcc15.tar.gz
vaadin-framework-1b218a1f9f4713d23b8563acd6257fb912afcc15.zip
Remove obsolete TB2 tooltip test, update TB4 test (#14019)
Change-Id: I02b68886b888ee0a0d99b41138755f0ea6e2a53d
-rw-r--r--uitest/src/com/vaadin/tests/components/button/ButtonTooltips.html37
-rw-r--r--uitest/src/com/vaadin/tests/tooltip/ButtonTooltips.java16
-rw-r--r--uitest/src/com/vaadin/tests/tooltip/ButtonTooltipsTest.java12
3 files changed, 16 insertions, 49 deletions
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonTooltips.html b/uitest/src/com/vaadin/tests/components/button/ButtonTooltips.html
deleted file mode 100644
index 13fdf52c76..0000000000
--- a/uitest/src/com/vaadin/tests/components/button/ButtonTooltips.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<?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://192.168.2.168:8888/" />
-<title>New Test</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<thead>
-<tr><td rowspan="1" colspan="3">New Test</td></tr>
-</thead><tbody>
-<tr>
- <td>open</td>
- <td>/run/com.vaadin.tests.components.button.ButtonTooltips?restartApplication</td>
- <td></td>
-</tr>
-<tr>
- <td>showTooltip</td>
- <td>vaadin=runcomvaadintestscomponentsbuttonButtonTooltips::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
- <td>0,0</td>
-</tr>
-<tr>
- <td>showTooltip</td>
- <td>vaadin=runcomvaadintestscomponentsbuttonButtonTooltips::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
- <td>0,0</td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td></td>
-</tr>
-
-</tbody></table>
-</body>
-</html>
diff --git a/uitest/src/com/vaadin/tests/tooltip/ButtonTooltips.java b/uitest/src/com/vaadin/tests/tooltip/ButtonTooltips.java
index d212a13058..c341aa689b 100644
--- a/uitest/src/com/vaadin/tests/tooltip/ButtonTooltips.java
+++ b/uitest/src/com/vaadin/tests/tooltip/ButtonTooltips.java
@@ -1,14 +1,18 @@
package com.vaadin.tests.tooltip;
-import com.vaadin.tests.components.TestBase;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.VerticalLayout;
-public class ButtonTooltips extends TestBase {
+public class ButtonTooltips extends AbstractTestUI {
+
+ public static final String shortDescription = "Another";
+ public static final String longDescription = "long descidescidescpription";
@Override
- protected String getDescription() {
+ protected String getTestDescription() {
return "Button tooltip's size gets messed up if moving from one tooltip to another before a timer expires.";
}
@@ -18,12 +22,12 @@ public class ButtonTooltips extends TestBase {
}
@Override
- protected void setup() {
+ protected void setup(VaadinRequest request) {
VerticalLayout vl = new VerticalLayout();
Button button = new Button("One");
- button.setDescription("long descidescidescpription");
+ button.setDescription(longDescription);
Button button2 = new Button("Two");
- button2.setDescription("Another");
+ button2.setDescription(shortDescription);
vl.addComponent(button);
vl.addComponent(button2);
vl.setComponentAlignment(button, Alignment.TOP_RIGHT);
diff --git a/uitest/src/com/vaadin/tests/tooltip/ButtonTooltipsTest.java b/uitest/src/com/vaadin/tests/tooltip/ButtonTooltipsTest.java
index d64dd900a7..08436b1332 100644
--- a/uitest/src/com/vaadin/tests/tooltip/ButtonTooltipsTest.java
+++ b/uitest/src/com/vaadin/tests/tooltip/ButtonTooltipsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.TooltipTest;
/**
* Tests that tooltip sizes do not change when moving between adjacent elements
- *
+ *
* @author Vaadin Ltd
*/
public class ButtonTooltipsTest extends TooltipTest {
@@ -38,12 +38,12 @@ public class ButtonTooltipsTest extends TooltipTest {
WebElement buttonOne = $(ButtonElement.class).caption("One").first();
WebElement buttonTwo = $(ButtonElement.class).caption("Two").first();
- checkTooltip(buttonOne, "long descidescidescpription");
+ checkTooltip(buttonOne, ButtonTooltips.longDescription);
int originalWidth = getTooltipElement().getSize().getWidth();
int originalHeight = getTooltipElement().getSize().getHeight();
clearTooltip();
- checkTooltip(buttonTwo, "Another");
+ checkTooltip(buttonTwo, ButtonTooltips.shortDescription);
moveMouseTo(buttonOne, 5, 5);
sleep(100);
assertThat(getTooltipElement().getSize().getWidth(), is(originalWidth));