summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tooltip/StationaryTooltipTest.java
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2016-04-15 11:06:18 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2016-04-15 14:00:58 +0300
commit6b8412033e680ce6e5c7827ac504adf132305726 (patch)
tree0df05d16c324b285610af8910c126b58f4c490c5 /uitest/src/com/vaadin/tests/tooltip/StationaryTooltipTest.java
parent9192b0bb5e5e699b506b3d3e7df4cf295fbea44a (diff)
downloadvaadin-framework-6b8412033e680ce6e5c7827ac504adf132305726.tar.gz
vaadin-framework-6b8412033e680ce6e5c7827ac504adf132305726.zip
Build uitest war with maven
Change-Id: I32625901ca27a282253df44c6e776cf9632bacda
Diffstat (limited to 'uitest/src/com/vaadin/tests/tooltip/StationaryTooltipTest.java')
-rw-r--r--uitest/src/com/vaadin/tests/tooltip/StationaryTooltipTest.java77
1 files changed, 0 insertions, 77 deletions
diff --git a/uitest/src/com/vaadin/tests/tooltip/StationaryTooltipTest.java b/uitest/src/com/vaadin/tests/tooltip/StationaryTooltipTest.java
deleted file mode 100644
index 6b751e7a6b..0000000000
--- a/uitest/src/com/vaadin/tests/tooltip/StationaryTooltipTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.vaadin.tests.tooltip;
-
-import static org.hamcrest.Matchers.greaterThan;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Test;
-import org.openqa.selenium.Dimension;
-import org.openqa.selenium.interactions.Mouse;
-import org.openqa.selenium.interactions.internal.Coordinates;
-import org.openqa.selenium.remote.DesiredCapabilities;
-
-import com.vaadin.testbench.elements.ButtonElement;
-import com.vaadin.tests.tb3.MultiBrowserTest;
-
-public class StationaryTooltipTest extends MultiBrowserTest {
-
- @Override
- public List<DesiredCapabilities> getBrowsersToTest() {
- // With IEDriver, the cursor seems to jump to default position after the
- // mouse move,
- // so we are not able to test the tooltip behaviour properly.
- return getBrowsersExcludingIE();
- }
-
- @Test
- public void tooltipShouldBeStationary() throws InterruptedException {
- openTestURL();
-
- Mouse mouse = getMouse();
-
- moveMouseToButtonUpperLeftCorner(mouse);
- sleep(3000); // wait for the tooltip to become visible
- int originalTooltipLocationX = getTooltipLocationX();
-
- moveMouseToButtonBottomRightCorner(mouse);
- int actualTooltipLocationX = getTooltipLocationX();
-
- assertThat(actualTooltipLocationX, is(greaterThan(0)));
- assertThat(actualTooltipLocationX, is(originalTooltipLocationX));
- }
-
- private Coordinates getButtonCoordinates() {
- return getCoordinates(getButtonElement());
- }
-
- private ButtonElement getButtonElement() {
- return $(ButtonElement.class).first();
- }
-
- private void moveMouseToButtonBottomRightCorner(Mouse mouse) {
- Coordinates buttonCoordinates = getButtonCoordinates();
- Dimension buttonDimensions = getButtonDimensions();
-
- mouse.mouseMove(buttonCoordinates, buttonDimensions.getWidth() - 1,
- buttonDimensions.getHeight() - 1);
- }
-
- private void moveMouseToButtonUpperLeftCorner(Mouse mouse) {
- Coordinates buttonCoordinates = getButtonCoordinates();
-
- mouse.mouseMove(buttonCoordinates, 0, 0);
- }
-
- private org.openqa.selenium.Dimension getButtonDimensions() {
- ButtonElement buttonElement = getButtonElement();
-
- return buttonElement.getWrappedElement().getSize();
- }
-
- private int getTooltipLocationX() {
- return getTooltipElement().getLocation().getX();
- }
-
-} \ No newline at end of file