diff options
author | Henri Sara <hesara@vaadin.com> | 2016-07-13 09:37:48 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-07-13 07:20:11 +0000 |
commit | 3b30b65e9401a7aee6604c0d0dd5eebe62ba508b (patch) | |
tree | b54ee545a6d722f9d091e6a13b2e2dfc1c063751 /uitest | |
parent | d5c2320ef0d1ef279f41f9f3925048c882b4a730 (diff) | |
download | vaadin-framework-3b30b65e9401a7aee6604c0d0dd5eebe62ba508b.tar.gz vaadin-framework-3b30b65e9401a7aee6604c0d0dd5eebe62ba508b.zip |
Disable tooltip tests for Firefox.
Since the fix for #13370 which causes tooltips to react to mouseOut,
TB tests for tooltips fail on Firefox because of an extraneous
mouseOut event from FirefoxDriver.
Tooltips do work in manual tests also on Firefox.
Change-Id: Ic6d73bb4487749618bbc5c7e3a8416107adb4856
Diffstat (limited to 'uitest')
9 files changed, 58 insertions, 11 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java index ed712361a6..ac494efc2c 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java @@ -18,8 +18,11 @@ package com.vaadin.tests.components.grid.basicfeatures; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import java.util.List; + import org.junit.Test; import org.openqa.selenium.By; +import org.openqa.selenium.remote.DesiredCapabilities; public class GridDescriptionGeneratorTest extends GridBasicFeaturesTest { @@ -71,4 +74,9 @@ public class GridDescriptionGeneratorTest extends GridBasicFeaturesTest { assertEquals("Tooltip text", "Row tooltip for row 5", tooltipText); } + @Override + public List<DesiredCapabilities> getBrowsersToTest() { + return getBrowsersExcludingFirefox(); + } + } diff --git a/uitest/src/test/java/com/vaadin/tests/components/label/LabelTooltipTest.java b/uitest/src/test/java/com/vaadin/tests/components/label/LabelTooltipTest.java index 600cc4231a..36606b9972 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/label/LabelTooltipTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/label/LabelTooltipTest.java @@ -16,10 +16,12 @@ package com.vaadin.tests.components.label; import java.io.IOException; +import java.util.List; import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.interactions.Actions; +import org.openqa.selenium.remote.DesiredCapabilities; import com.vaadin.testbench.elements.LabelElement; import com.vaadin.tests.tb3.MultiBrowserTest; @@ -69,4 +71,11 @@ public class LabelTooltipTest extends MultiBrowserTest { /* Visual comparison */ compareScreen("tooltipVisible"); } + + @Override + public List<DesiredCapabilities> getBrowsersToTest() { + // this test also works on IEs, but Firefox has problems with tooltips + return getBrowsersExcludingFirefox(); + } + } diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/ToolTipInWindowTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/ToolTipInWindowTest.java index 40332e7730..abe2bcbe36 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/window/ToolTipInWindowTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/window/ToolTipInWindowTest.java @@ -71,7 +71,7 @@ public class ToolTipInWindowTest extends MultiBrowserTest { @Override public List<DesiredCapabilities> getBrowsersToTest() { // Test with the same browsers as in the other tooltip tests - return getBrowsersExcludingIE(); + return getBrowsersSupportingTooltip(); } } diff --git a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BooleanTextFieldTest.java b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BooleanTextFieldTest.java index 7a74deb2e0..abbe4128dd 100644 --- a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BooleanTextFieldTest.java +++ b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BooleanTextFieldTest.java @@ -1,9 +1,12 @@ package com.vaadin.tests.fieldgroup; +import java.util.List; + import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.Keys; +import org.openqa.selenium.remote.DesiredCapabilities; public class BooleanTextFieldTest extends BasicPersonFormTest { @@ -57,4 +60,11 @@ public class BooleanTextFieldTest extends BasicPersonFormTest { "4. Person [firstName=John, lastName=Dover, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=true, salary=null, salaryDouble=null, rent=null]", getLogRow(0)); } + + @Override + public List<DesiredCapabilities> getBrowsersToTest() { + // this test also works on IEs, but Firefox has problems with tooltips + return getBrowsersExcludingFirefox(); + } + } diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java index 9bb146b8e4..ec40510d96 100644 --- a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java +++ b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java @@ -57,6 +57,13 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration { Browser.PHANTOMJS); } + protected List<DesiredCapabilities> getBrowsersExcludingFirefox() { + // this is sometimes needed as the Firefox driver causes extra mouseOut + // events that make tooltips disappear etc. + return getBrowserCapabilities(Browser.IE8, Browser.IE9, Browser.IE10, + Browser.IE11, Browser.CHROME, Browser.PHANTOMJS); + } + protected List<DesiredCapabilities> getBrowsersExcludingIE8() { return getBrowserCapabilities(Browser.IE9, Browser.IE10, Browser.IE11, Browser.FIREFOX, Browser.CHROME, Browser.PHANTOMJS); @@ -79,6 +86,17 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration { Browser.FIREFOX, Browser.CHROME); } + protected List<DesiredCapabilities> getBrowsersSupportingTooltip() { + // 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 + // unless using requireWindowFocusForIE() { return true; } . + // See #13854. + // On Firefox, the driver causes additional mouseOut events causing the + // tooltip to disappear immediately. Tooltips may work in some + // particular cases, but not in general. + return getBrowserCapabilities(Browser.CHROME, Browser.PHANTOMJS); + } + @Override public List<DesiredCapabilities> getBrowsersToTest() { // Uncomment Safari and Opera if those become tested browsers again. diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/TooltipTest.java b/uitest/src/test/java/com/vaadin/tests/tb3/TooltipTest.java index 86ea44287a..e455abc9f0 100644 --- a/uitest/src/test/java/com/vaadin/tests/tb3/TooltipTest.java +++ b/uitest/src/test/java/com/vaadin/tests/tb3/TooltipTest.java @@ -110,8 +110,6 @@ public abstract class TooltipTest extends MultiBrowserTest { @Override public List<DesiredCapabilities> getBrowsersToTest() { - // TODO Once we figure out how to get mouse hovering work with the IE - // webdriver, exclude them from these tests (#13854) - return getBrowsersExcludingIE(); + return getBrowsersSupportingTooltip(); } } diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltipsTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltipsTest.java index af7a303629..555168f155 100644 --- a/uitest/src/test/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltipsTest.java +++ b/uitest/src/test/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltipsTest.java @@ -23,10 +23,8 @@ import static org.junit.Assert.assertThat; import java.util.List; import org.junit.Test; -import org.openqa.selenium.interactions.HasInputDevices; import org.openqa.selenium.interactions.Mouse; import org.openqa.selenium.interactions.internal.Coordinates; -import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.remote.DesiredCapabilities; import com.vaadin.testbench.elements.ButtonElement; @@ -42,7 +40,7 @@ public class AdjacentElementsWithTooltipsTest extends MultiBrowserTest { @Override public List<DesiredCapabilities> getBrowsersToTest() { - return getBrowsersExcludingIE(); + return getBrowsersSupportingTooltip(); } @Test diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/StationaryTooltipTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/StationaryTooltipTest.java index 6b751e7a6b..b4ce5ff903 100644 --- a/uitest/src/test/java/com/vaadin/tests/tooltip/StationaryTooltipTest.java +++ b/uitest/src/test/java/com/vaadin/tests/tooltip/StationaryTooltipTest.java @@ -19,10 +19,7 @@ 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(); + return getBrowsersSupportingTooltip(); } @Test diff --git a/uitest/src/test/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFieldsTest.java b/uitest/src/test/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFieldsTest.java index ab77ba6b26..f8c1025975 100644 --- a/uitest/src/test/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFieldsTest.java +++ b/uitest/src/test/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFieldsTest.java @@ -1,10 +1,13 @@ package com.vaadin.tests.validation; +import java.util.List; + import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.support.ui.ExpectedCondition; import com.vaadin.testbench.elements.CheckBoxElement; @@ -19,6 +22,12 @@ public class ValidationOfRequiredEmptyFieldsTest extends MultiBrowserTest { return true; } + @Override + public List<DesiredCapabilities> getBrowsersToTest() { + // Firefox causes extra mouseOut events breaking tooltips. + return getBrowsersExcludingFirefox(); + } + @Test public void requiredErrorMessage() throws Exception { openTestURL(); |