diff options
author | Henri Sara <hesara@vaadin.com> | 2016-04-28 14:27:19 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-04-28 12:30:27 +0000 |
commit | 3f150daeeed28444cf4bca114d6544f7c2387b2b (patch) | |
tree | 95300904da5a45fc9fe839b5f3b850d40b623c4d /uitest | |
parent | d773a870312d5371563b33ed5cdb10d65c4f6e76 (diff) | |
download | vaadin-framework-3f150daeeed28444cf4bca114d6544f7c2387b2b.tar.gz vaadin-framework-3f150daeeed28444cf4bca114d6544f7c2387b2b.zip |
Do not throw an exception for PhantomJS
Change-Id: Ief7ae278c8c120c40cd73bc93f982db912ef6648
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/tb3/BrowserStackBrowserFactory.java | 17 | ||||
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/tb3/SauceLabsBrowserFactory.java | 9 |
2 files changed, 19 insertions, 7 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/BrowserStackBrowserFactory.java b/uitest/src/test/java/com/vaadin/tests/tb3/BrowserStackBrowserFactory.java index 326bcfdb3f..ab9f7018eb 100644 --- a/uitest/src/test/java/com/vaadin/tests/tb3/BrowserStackBrowserFactory.java +++ b/uitest/src/test/java/com/vaadin/tests/tb3/BrowserStackBrowserFactory.java @@ -41,8 +41,13 @@ public class BrowserStackBrowserFactory extends DefaultBrowserFactory { caps.setVersion(version); break; case PHANTOMJS: - throw new IllegalArgumentException( - "PhantomJS is not supported by BrowserStack"); + // This will not work on BrowserStack - should be filtered with + // browsers.exclude. However, we cannot throw an exception here as + // filtering only takes place if there is no exception. + caps = DesiredCapabilities.phantomjs(); + caps.setVersion("1"); + caps.setPlatform(Platform.LINUX); + break; case SAFARI: caps = DesiredCapabilities.safari(); caps.setVersion(version); @@ -96,9 +101,11 @@ public class BrowserStackBrowserFactory extends DefaultBrowserFactory { // BrowserStack specific parts // for now, run all tests on Windows 7 - caps.setCapability("os", "Windows"); - caps.setCapability("os_version", "7"); - caps.setPlatform(Platform.WINDOWS); + if (!Browser.PHANTOMJS.equals(browser)) { + caps.setCapability("os", "Windows"); + caps.setCapability("os_version", "7"); + caps.setPlatform(Platform.WINDOWS); + } // enable logging on BrowserStack caps.setCapability("browserstack.debug", "true"); diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/SauceLabsBrowserFactory.java b/uitest/src/test/java/com/vaadin/tests/tb3/SauceLabsBrowserFactory.java index 59ef94c5ad..8eae64d0b8 100644 --- a/uitest/src/test/java/com/vaadin/tests/tb3/SauceLabsBrowserFactory.java +++ b/uitest/src/test/java/com/vaadin/tests/tb3/SauceLabsBrowserFactory.java @@ -48,8 +48,13 @@ public class SauceLabsBrowserFactory extends DefaultBrowserFactory { caps.setVersion(version); break; case PHANTOMJS: - throw new IllegalArgumentException( - "PhantomJS is not supported by SauceLabs"); + // This will not work on SauceLabs - should be filtered with + // browsers.exclude. However, we cannot throw an exception here as + // filtering only takes place if there is no exception. + caps = DesiredCapabilities.phantomjs(); + caps.setVersion("1"); + caps.setPlatform(Platform.LINUX); + break; case SAFARI: caps = DesiredCapabilities.safari(); caps.setVersion(version); |