summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-11-05 16:12:00 +0200
committerTeemu Suo-Anttila <teemusa@vaadin.com>2015-11-24 12:39:27 +0000
commit6e4ce712ecebe0c8f012a119db07de0e5ff3c740 (patch)
treebb556780a5dace4ac41f72e9cd223828f8a9e162 /uitest/src/com/vaadin
parent90e3121453e23c00648942eb21f7354d9f198065 (diff)
downloadvaadin-framework-6e4ce712ecebe0c8f012a119db07de0e5ff3c740.tar.gz
vaadin-framework-6e4ce712ecebe0c8f012a119db07de0e5ff3c740.zip
Move capability handling from MultiBrowserTest to super class
Capabilities should be set the same way in SingleBrowserTests as well, not just MultiBrowserTests. Change-Id: Ifed8534b87bbe45fd90fe0e7110e26a5344c5540
Diffstat (limited to 'uitest/src/com/vaadin')
-rw-r--r--uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java32
-rw-r--r--uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java32
2 files changed, 32 insertions, 32 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
index d1af903cee..9bb146b8e4 100644
--- a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
+++ b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
@@ -17,14 +17,11 @@
package com.vaadin.tests.tb3;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.List;
-import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import com.vaadin.testbench.parallel.Browser;
-import com.vaadin.testbench.parallel.BrowserUtil;
/**
* Base class for tests which should be run on all supported browsers. The test
@@ -83,35 +80,6 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration {
}
@Override
- public void setDesiredCapabilities(DesiredCapabilities desiredCapabilities) {
- super.setDesiredCapabilities(desiredCapabilities);
-
- if (BrowserUtil.isIE(desiredCapabilities)) {
- if (requireWindowFocusForIE()) {
- desiredCapabilities.setCapability(
- InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);
- }
- if (!usePersistentHoverForIE()) {
- desiredCapabilities.setCapability(
- InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING,
- false);
- }
- if (!useNativeEventsForIE()) {
- desiredCapabilities.setCapability(
- InternetExplorerDriver.NATIVE_EVENTS, false);
- }
- }
-
- desiredCapabilities.setCapability("project", "Vaadin Framework");
- desiredCapabilities.setCapability("build", String.format("%s / %s",
- getDeploymentHostname(), Calendar.getInstance().getTime()));
- desiredCapabilities.setCapability(
- "name",
- String.format("%s.%s", getClass().getCanonicalName(),
- testName.getMethodName()));
- }
-
- @Override
public List<DesiredCapabilities> getBrowsersToTest() {
// Uncomment Safari and Opera if those become tested browsers again.
return getBrowserCapabilities(Browser.IE8, Browser.IE9, Browser.IE10,
diff --git a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
index 7df65829ae..227ef4a84f 100644
--- a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
+++ b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
@@ -22,16 +22,19 @@ import java.io.IOException;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
+import java.util.Calendar;
import java.util.Enumeration;
import java.util.Properties;
import org.junit.Assert;
+import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import com.vaadin.testbench.annotations.BrowserFactory;
import com.vaadin.testbench.annotations.RunLocally;
import com.vaadin.testbench.annotations.RunOnHub;
import com.vaadin.testbench.parallel.Browser;
+import com.vaadin.testbench.parallel.BrowserUtil;
/**
* Provides values for parameters which depend on where the test is run.
@@ -97,6 +100,35 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
super.setup();
}
+ @Override
+ public void setDesiredCapabilities(DesiredCapabilities desiredCapabilities) {
+ super.setDesiredCapabilities(desiredCapabilities);
+
+ if (BrowserUtil.isIE(desiredCapabilities)) {
+ if (requireWindowFocusForIE()) {
+ desiredCapabilities.setCapability(
+ InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);
+ }
+ if (!usePersistentHoverForIE()) {
+ desiredCapabilities.setCapability(
+ InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING,
+ false);
+ }
+ if (!useNativeEventsForIE()) {
+ desiredCapabilities.setCapability(
+ InternetExplorerDriver.NATIVE_EVENTS, false);
+ }
+ }
+
+ desiredCapabilities.setCapability("project", "Vaadin Framework");
+ desiredCapabilities.setCapability("build", String.format("%s / %s",
+ getDeploymentHostname(), Calendar.getInstance().getTime()));
+ desiredCapabilities.setCapability(
+ "name",
+ String.format("%s.%s", getClass().getCanonicalName(),
+ testName.getMethodName()));
+ }
+
protected static DesiredCapabilities getRunLocallyCapabilities() {
VaadinBrowserFactory factory = new VaadinBrowserFactory();
try {