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 {
assertEquals("Tooltip text", "Row tooltip for row 5", tooltipText);
}
+ @Override
+ public List<DesiredCapabilities> getBrowsersToTest() {
+ return getBrowsersExcludingFirefox();
+ }
+
}
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;
/* Visual comparison */
compareScreen("tooltipVisible");
}
+
+ @Override
+ public List<DesiredCapabilities> getBrowsersToTest() {
+ // this test also works on IEs, but Firefox has problems with tooltips
+ return getBrowsersExcludingFirefox();
+ }
+
}
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
// Test with the same browsers as in the other tooltip tests
- return getBrowsersExcludingIE();
+ return getBrowsersSupportingTooltip();
}
}
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 {
"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();
+ }
+
}
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);
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.
@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();
}
}
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;
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
- return getBrowsersExcludingIE();
+ return getBrowsersSupportingTooltip();
}
@Test
@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
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;
return true;
}
+ @Override
+ public List<DesiredCapabilities> getBrowsersToTest() {
+ // Firefox causes extra mouseOut events breaking tooltips.
+ return getBrowsersExcludingFirefox();
+ }
+
@Test
public void requiredErrorMessage() throws Exception {
openTestURL();