]> source.dussan.org Git - vaadin-framework.git/commitdiff
Make vanilla SingleBrowserTest work with the runLocally property
authorLeif Åstrand <leif@vaadin.com>
Fri, 12 Jun 2015 10:09:46 +0000 (13:09 +0300)
committerHenri Sara <hesara@vaadin.com>
Sat, 4 Jul 2015 07:44:34 +0000 (10:44 +0300)
Change-Id: I4173dbdb7bb83376177fc680562eca1725d48e36

uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
uitest/src/com/vaadin/tests/tb3/SingleBrowserTest.java

index 1c0542b2097f7376ded050b0e8be144450cdb93d..7df65829aea7d4e4c1507ad22698ff951990224a 100644 (file)
@@ -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;
         }
index 960d6b8777fb2cc184ff638b819ae275de1e2ae6..b5389d3eec30ca5cfa8a1f04c4a5d522239ef744 100644 (file)
@@ -25,6 +25,9 @@ import com.vaadin.testbench.parallel.Browser;
 public abstract class SingleBrowserTest extends PrivateTB3Configuration {
     @Override
     public List<DesiredCapabilities> getBrowsersToTest() {
+        if (isRunLocally()) {
+            return Collections.singletonList(getRunLocallyCapabilities());
+        }
         return Collections.singletonList(Browser.PHANTOMJS
                 .getDesiredCapabilities());
     }