From 6c759028b2e4edf5280fb66517c8fe1c7660ecf8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Fri, 12 Jun 2015 13:09:46 +0300 Subject: [PATCH] Make vanilla SingleBrowserTest work with the runLocally property Change-Id: I15c9cf94be71a74229ee32f711f187b1ebc8a993 --- uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java | 4 ++-- uitest/src/com/vaadin/tests/tb3/SingleBrowserTest.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java index 1c0542b209..7df65829ae 100644 --- a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java +++ b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java @@ -97,7 +97,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test { super.setup(); } - private static DesiredCapabilities getRunLocallyCapabilities() { + protected static DesiredCapabilities getRunLocallyCapabilities() { VaadinBrowserFactory factory = new VaadinBrowserFactory(); try { return factory.create(Browser.valueOf(properties.getProperty( @@ -159,7 +159,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test { return getConfiguredDeploymentHostname(); } - private boolean isRunLocally() { + protected boolean isRunLocally() { if (properties.containsKey(RUN_LOCALLY_PROPERTY)) { return true; } diff --git a/uitest/src/com/vaadin/tests/tb3/SingleBrowserTest.java b/uitest/src/com/vaadin/tests/tb3/SingleBrowserTest.java index 960d6b8777..b5389d3eec 100644 --- a/uitest/src/com/vaadin/tests/tb3/SingleBrowserTest.java +++ b/uitest/src/com/vaadin/tests/tb3/SingleBrowserTest.java @@ -25,6 +25,9 @@ import com.vaadin.testbench.parallel.Browser; public abstract class SingleBrowserTest extends PrivateTB3Configuration { @Override public List getBrowsersToTest() { + if (isRunLocally()) { + return Collections.singletonList(getRunLocallyCapabilities()); + } return Collections.singletonList(Browser.PHANTOMJS .getDesiredCapabilities()); } -- 2.39.5