summaryrefslogtreecommitdiffstats
path: root/uitest-common
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-08-18 09:27:03 +0300
committerArtur Signell <artur@vaadin.com>2016-08-18 09:27:03 +0300
commit6d54d78944f6c3278eed3bb5e7ee19687ee5714e (patch)
tree8142f622e644e98bb3f8d19a7021fd125f9fed40 /uitest-common
parent7b899665d07be33f86015f71695868c70bc5a589 (diff)
downloadvaadin-framework-6d54d78944f6c3278eed3bb5e7ee19687ee5714e.tar.gz
vaadin-framework-6d54d78944f6c3278eed3bb5e7ee19687ee5714e.zip
Format using Eclipse Neon
Change-Id: I33f1cc33969ff74a95b1b8cc0f2add589be5aae0
Diffstat (limited to 'uitest-common')
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java89
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/CustomTestBenchCommandExecutor.java23
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java28
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/PrivateTB3Configuration.java26
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/RetryOnFail.java8
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java28
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/SingleBrowserTest.java4
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/SingleBrowserTestPhantomJS2.java4
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/TB3Runner.java3
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestLocator.java11
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestSuite.java5
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/VaadinBrowserFactory.java5
12 files changed, 119 insertions, 115 deletions
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java
index 9c617ab128..c2a0bc8793 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -87,7 +87,8 @@ import elemental.json.impl.JsonUtil;
* <li>Hub connection setup and teardown</li>
* <li>Automatic generation of URL for a given test on the development server
* using {@link #getUIClass()} or by automatically finding an enclosing UI class
- * and based on requested features, e.g. {@link #isDebug()}, {@link #isPush()}</li>
+ * and based on requested features, e.g. {@link #isDebug()},
+ * {@link #isPush()}</li>
* <li>Generic helpers for creating TB3+ tests</li>
* </ul>
*
@@ -118,11 +119,11 @@ public abstract class AbstractTB3Test extends ParallelTest {
private static final int BROWSER_TIMEOUT_IN_MS = 30 * 1000;
protected static DesiredCapabilities PHANTOMJS2() {
- DesiredCapabilities phantomjs2 = new VaadinBrowserFactory().create(
- Browser.PHANTOMJS, "2");
+ DesiredCapabilities phantomjs2 = new VaadinBrowserFactory()
+ .create(Browser.PHANTOMJS, "2");
// Hack for the test cluster
- phantomjs2
- .setCapability("phantomjs.binary.path", "/usr/bin/phantomjs2");
+ phantomjs2.setCapability("phantomjs.binary.path",
+ "/usr/bin/phantomjs2");
return phantomjs2;
}
@@ -174,8 +175,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
}
protected WebElement getTooltipErrorElement() {
- WebElement tooltip = getDriver().findElement(
- com.vaadin.testbench.By.className("v-tooltip"));
+ WebElement tooltip = getDriver()
+ .findElement(com.vaadin.testbench.By.className("v-tooltip"));
return tooltip.findElement(By.className("v-errormessage"));
}
@@ -202,7 +203,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
waitForDebugMessage(expectedMessage, 30);
}
- protected void waitForDebugMessage(final String expectedMessage, int timeout) {
+ protected void waitForDebugMessage(final String expectedMessage,
+ int timeout) {
waitUntil(new ExpectedCondition<Boolean>() {
@Override
@@ -213,12 +215,13 @@ public abstract class AbstractTB3Test extends ParallelTest {
}
protected void clearDebugMessages() {
- driver.findElement(
- By.xpath("//button[@class='v-debugwindow-button' and @title='Clear log']"))
+ driver.findElement(By
+ .xpath("//button[@class='v-debugwindow-button' and @title='Clear log']"))
.click();
}
- protected void waitUntilRowIsVisible(final TableElement table, final int row) {
+ protected void waitUntilRowIsVisible(final TableElement table,
+ final int row) {
waitUntil(new ExpectedCondition<Object>() {
@Override
public Object apply(WebDriver input) {
@@ -331,8 +334,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
*/
@BrowserConfiguration
public List<DesiredCapabilities> getBrowsersToTest() {
- return Collections.singletonList(Browser.FIREFOX
- .getDesiredCapabilities());
+ return Collections
+ .singletonList(Browser.FIREFOX.getDesiredCapabilities());
}
/**
@@ -427,8 +430,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Waits the given number of seconds for the given condition to become true.
- * Use e.g. as {@link
- * #waitUntil(ExpectedConditions.textToBePresentInElement(by, text))}
+ * Use e.g. as
+ * {@link #waitUntil(ExpectedConditions.textToBePresentInElement(by, text))}
*
* @param condition
* the condition to wait for to become true
@@ -452,8 +455,9 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Waits the given number of seconds for the given condition to become
- * false. Use e.g. as {@link
- * #waitUntilNot(ExpectedConditions.textToBePresentInElement(by, text))}
+ * false. Use e.g. as
+ * {@link #waitUntilNot(ExpectedConditions.textToBePresentInElement(by,
+ * text))}
*
* @param condition
* the condition to wait for to become false
@@ -506,8 +510,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
}
/**
- * For tests extending AbstractTestUIWithLog, returns the element
- * for the Nth log row
+ * For tests extending AbstractTestUIWithLog, returns the element for the
+ * Nth log row
*
* @param rowNr
* The log row to retrieve
@@ -518,8 +522,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
}
/**
- * For tests extending AbstractTestUIWithLog, returns the text in
- * the Nth log row
+ * For tests extending AbstractTestUIWithLog, returns the text in the Nth
+ * log row
*
* @param rowNr
* The log row to retrieve text for
@@ -595,8 +599,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
* @throws AssertionError
* If comparison fails
*/
- public static final <T> void assertLessThan(String message,
- Comparable<T> a, T b) throws AssertionError {
+ public static final <T> void assertLessThan(String message, Comparable<T> a,
+ T b) throws AssertionError {
if (a.compareTo(b) < 0) {
return;
}
@@ -771,8 +775,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
*/
private String getApplicationId(String pathWithQueryParameters) {
// Remove any possible URL parameters
- String pathWithoutQueryParameters = pathWithQueryParameters.replaceAll(
- "\\?.*", "");
+ String pathWithoutQueryParameters = pathWithQueryParameters
+ .replaceAll("\\?.*", "");
if ("".equals(pathWithoutQueryParameters)) {
return "ROOT";
}
@@ -859,10 +863,9 @@ public abstract class AbstractTB3Test extends ParallelTest {
protected void assertNoDebugMessage(Level level) {
// class="v-debugwindow-row Level.getName()"
- List<WebElement> logElements = driver
- .findElements(By.xpath(String
- .format("//div[@class='v-debugwindow-row %s']/span[@class='v-debugwindow-message']",
- level.getName())));
+ List<WebElement> logElements = driver.findElements(By.xpath(String
+ .format("//div[@class='v-debugwindow-row %s']/span[@class='v-debugwindow-message']",
+ level.getName())));
if (!logElements.isEmpty()) {
String logRows = "";
for (WebElement e : logElements) {
@@ -1008,8 +1011,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
}
protected boolean isLoadingIndicatorVisible() {
- WebElement loadingIndicator = findElement(By
- .className("v-loading-indicator"));
+ WebElement loadingIndicator = findElement(
+ By.className("v-loading-indicator"));
return loadingIndicator.isDisplayed();
}
@@ -1019,8 +1022,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
@Override
public Boolean apply(WebDriver input) {
- WebElement loadingIndicator = input.findElement(By
- .className("v-loading-indicator"));
+ WebElement loadingIndicator = input
+ .findElement(By.className("v-loading-indicator"));
return !loadingIndicator.isDisplayed();
}
@@ -1049,8 +1052,9 @@ public abstract class AbstractTB3Test extends ParallelTest {
protected void selectMenu(String menuCaption, boolean click) {
WebElement menuElement = getMenuElement(menuCaption);
Dimension size = menuElement.getSize();
- new Actions(getDriver()).moveToElement(menuElement, size.width - 10,
- size.height / 2).perform();
+ new Actions(getDriver())
+ .moveToElement(menuElement, size.width - 10, size.height / 2)
+ .perform();
if (click) {
new Actions(getDriver()).click().perform();
}
@@ -1082,8 +1086,9 @@ public abstract class AbstractTB3Test extends ParallelTest {
selectMenu(menuCaptions[0], true);
// Move to the menu item opened below the menu bar.
- new Actions(getDriver()).moveByOffset(0,
- getMenuElement(menuCaptions[0]).getSize().getHeight())
+ new Actions(getDriver())
+ .moveByOffset(0,
+ getMenuElement(menuCaptions[0]).getSize().getHeight())
.perform();
for (int i = 1; i < menuCaptions.length - 1; i++) {
@@ -1166,7 +1171,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
Assert.assertFalse(
"The element should not have a horizontal scrollbar (scrollWidth: "
+ scrollWidth + ", clientWidth: " + clientWidth + "): "
- + errorMessage, hasScrollbar);
+ + errorMessage,
+ hasScrollbar);
}
protected void assertNoVerticalScrollbar(WebElement element,
@@ -1181,7 +1187,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
Assert.assertFalse(
"The element should not have a vertical scrollbar (scrollHeight: "
+ scrollHeight + ", clientHeight: " + clientHeight
- + "): " + errorMessage, hasScrollbar);
+ + "): " + errorMessage,
+ hasScrollbar);
}
protected int getScrollHeight(WebElement element) {
@@ -1246,8 +1253,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
protected void waitForThemeToChange(final String theme) {
- final WebElement rootDiv = findElement(By
- .xpath("//div[contains(@class,'v-app')]"));
+ final WebElement rootDiv = findElement(
+ By.xpath("//div[contains(@class,'v-app')]"));
waitUntil(new ExpectedCondition<Boolean>() {
@Override
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/CustomTestBenchCommandExecutor.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/CustomTestBenchCommandExecutor.java
index 00d7788f8b..5c9830c769 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/CustomTestBenchCommandExecutor.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/CustomTestBenchCommandExecutor.java
@@ -76,23 +76,22 @@ public class CustomTestBenchCommandExecutor {
*/
public boolean compareScreen(WebElement element, BufferedImage reference,
String referenceName, boolean isIE8) throws IOException {
- for (int times = 0; times < Parameters.getMaxScreenshotRetries(); times++) {
+ for (int times = 0; times < Parameters
+ .getMaxScreenshotRetries(); times++) {
BufferedImage screenshotImage = cropToElement(element,
ImageIO.read(new ByteArrayInputStream(
((TakesScreenshot) actualDriver)
- .getScreenshotAs(OutputType.BYTES))), isIE8);
+ .getScreenshotAs(OutputType.BYTES))),
+ isIE8);
if (reference == null) {
// Store the screenshot in the errors directory and fail the
// test
ImageFileUtil.createScreenshotDirectoriesIfNeeded();
ImageIO.write(screenshotImage, "png",
ImageFileUtil.getErrorScreenshotFile(referenceName));
- getLogger().severe(
- "No reference found for "
- + referenceName
- + " in "
- + ImageFileUtil
- .getScreenshotReferenceDirectory());
+ getLogger().severe("No reference found for " + referenceName
+ + " in "
+ + ImageFileUtil.getScreenshotReferenceDirectory());
return false;
}
if (imageComparison.imageEqualToReference(screenshotImage,
@@ -136,8 +135,8 @@ public class CustomTestBenchCommandExecutor {
// Get the part of the element which is on screen
w = Math.min(fullScreen.getWidth() - x, w);
} else {
- throw new IOException("Element x is outside the screenshot (x: "
- + x + ", y: " + y + ")");
+ throw new IOException("Element x is outside the screenshot (x: " + x
+ + ", y: " + y + ")");
}
if (y >= 0 && y < fullScreen.getHeight()) {
@@ -145,8 +144,8 @@ public class CustomTestBenchCommandExecutor {
// Get the part of the element which is on screen
h = Math.min(fullScreen.getHeight() - y, h);
} else {
- throw new IOException("Element y is outside the screenshot (x: "
- + x + ", y: " + y + ")");
+ throw new IOException("Element y is outside the screenshot (x: " + x
+ + ", y: " + y + ")");
}
return fullScreen.getSubimage(x, y, w, h);
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java
index 06e1ea9df9..695f2a404a 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java
@@ -59,17 +59,13 @@ public class ParameterizedTB3Runner extends TB3Runner {
}
if (!m.getName().startsWith("get") || !m.getName().endsWith("s")) {
- throw new IllegalStateException(
- "Method "
- + m.getName()
- + " is annotated with @Parameter but is not named getSomeThings() as it should");
+ throw new IllegalStateException("Method " + m.getName()
+ + " is annotated with @Parameter but is not named getSomeThings() as it should");
}
if (m.getParameterTypes().length != 0) {
- throw new IllegalStateException(
- "Method "
- + m.getName()
- + " annotated with @Parameter should not have any arguments");
+ throw new IllegalStateException("Method " + m.getName()
+ + " annotated with @Parameter should not have any arguments");
}
if (!Modifier.isStatic(m.getModifiers())) {
@@ -88,9 +84,10 @@ public class ParameterizedTB3Runner extends TB3Runner {
setterMethod = getTestClass().getJavaClass().getMethod(setter,
String.class);
} catch (Exception e) {
- throw new IllegalStateException("No setter " + setter
- + " found in "
- + getTestClass().getJavaClass().getName(), e);
+ throw new IllegalStateException(
+ "No setter " + setter + " found in "
+ + getTestClass().getJavaClass().getName(),
+ e);
}
Collection<String> values;
@@ -103,8 +100,9 @@ public class ParameterizedTB3Runner extends TB3Runner {
parameters.put(setterMethod, values);
}
} catch (Exception e) {
- throw new IllegalStateException("The setter " + m.getName()
- + " could not be invoked", e);
+ throw new IllegalStateException(
+ "The setter " + m.getName() + " could not be invoked",
+ e);
}
}
@@ -114,8 +112,8 @@ public class ParameterizedTB3Runner extends TB3Runner {
for (FrameworkMethod m : methods) {
if (!(m instanceof TBMethod)) {
- System.err.println("Unknown method type: "
- + m.getClass().getName());
+ System.err.println(
+ "Unknown method type: " + m.getClass().getName());
newMethods.add(m);
continue;
}
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/PrivateTB3Configuration.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/PrivateTB3Configuration.java
index 85104c784b..b44f3582ec 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/PrivateTB3Configuration.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/PrivateTB3Configuration.java
@@ -69,8 +69,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
if (properties.containsKey(RUN_LOCALLY_PROPERTY)) {
System.setProperty("useLocalWebDriver", "true");
DesiredCapabilities localBrowser = getRunLocallyCapabilities();
- System.setProperty(
- "browsers.include",
+ System.setProperty("browsers.include",
localBrowser.getBrowserName()
+ localBrowser.getVersion());
}
@@ -93,15 +92,17 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
String allowRunLocally = getProperty(ALLOW_RUN_LOCALLY_PROPERTY);
if ((allowRunLocally == null || !allowRunLocally.equals("" + true))
&& getClass().getAnnotation(RunLocally.class) != null) {
- Assert.fail("@RunLocally annotation is not allowed by default in framework tests. "
- + "See file uitest/eclipse-run-selected-test.properties for more information.");
+ Assert.fail(
+ "@RunLocally annotation is not allowed by default in framework tests. "
+ + "See file uitest/eclipse-run-selected-test.properties for more information.");
}
super.setup();
}
@Override
- public void setDesiredCapabilities(DesiredCapabilities desiredCapabilities) {
+ public void setDesiredCapabilities(
+ DesiredCapabilities desiredCapabilities) {
super.setDesiredCapabilities(desiredCapabilities);
if (BrowserUtil.isIE(desiredCapabilities)) {
@@ -123,17 +124,15 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
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()));
+ desiredCapabilities.setCapability("name", String.format("%s.%s",
+ getClass().getCanonicalName(), testName.getMethodName()));
}
protected static DesiredCapabilities getRunLocallyCapabilities() {
VaadinBrowserFactory factory = new VaadinBrowserFactory();
try {
- return factory.create(Browser.valueOf(properties.getProperty(
- RUN_LOCALLY_PROPERTY).toUpperCase()));
+ return factory.create(Browser.valueOf(properties
+ .getProperty(RUN_LOCALLY_PROPERTY).toUpperCase()));
} catch (Exception e) {
System.err.println(e.getMessage());
System.err.println("Falling back to FireFox");
@@ -154,9 +153,8 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
protected String getScreenshotDirectory() {
String screenshotDirectory = getProperty(SCREENSHOT_DIRECTORY);
if (screenshotDirectory == null) {
- throw new RuntimeException(
- "No screenshot directory defined. Use -D"
- + SCREENSHOT_DIRECTORY + "=<path>");
+ throw new RuntimeException("No screenshot directory defined. Use -D"
+ + SCREENSHOT_DIRECTORY + "=<path>");
}
return screenshotDirectory;
}
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/RetryOnFail.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/RetryOnFail.java
index 7a1656a0d2..78ae12043c 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/RetryOnFail.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/RetryOnFail.java
@@ -39,10 +39,10 @@ public class RetryOnFail implements TestRule {
return;
} catch (Throwable t) {
caughtThrowable = t;
- System.err.println(String.format(
- "%s: run %s/%s failed.",
- description.getDisplayName(), i + 1,
- retryCount + 1));
+ System.err
+ .println(String.format("%s: run %s/%s failed.",
+ description.getDisplayName(), i + 1,
+ retryCount + 1));
System.err.println(t.getMessage());
}
}
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java
index d94e05efdb..1ced470637 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java
@@ -102,8 +102,8 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
screenshotFailures = new ArrayList<String>();
Parameters.setScreenshotErrorDirectory(getScreenshotErrorDirectory());
- Parameters
- .setScreenshotReferenceDirectory(getScreenshotReferenceDirectory());
+ Parameters.setScreenshotReferenceDirectory(
+ getScreenshotReferenceDirectory());
}
/**
@@ -127,7 +127,8 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
protected void compareScreen(WebElement element, String identifier)
throws IOException {
if (identifier == null || identifier.isEmpty()) {
- throw new IllegalArgumentException("Empty identifier not supported");
+ throw new IllegalArgumentException(
+ "Empty identifier not supported");
}
File mainReference = getScreenshotReferenceFile(identifier);
@@ -207,8 +208,8 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
return customTestBench;
}
- private void enableAutoswitch(File htmlFile) throws FileNotFoundException,
- IOException {
+ private void enableAutoswitch(File htmlFile)
+ throws FileNotFoundException, IOException {
if (htmlFile == null || !htmlFile.exists()) {
return;
}
@@ -238,8 +239,8 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
* @return
*/
private static File htmlFromPng(File png) {
- return new File(png.getParentFile(), png.getName().replaceAll(
- "\\.png$", ".png.html"));
+ return new File(png.getParentFile(),
+ png.getName().replaceAll("\\.png$", ".png.html"));
}
/**
@@ -444,9 +445,9 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
if (versionOverride != null) {
// Windows_Firefox_17_bufferingdemo_valo
- parameters = parameters.replaceFirst("_"
- + getDesiredCapabilities().getVersion(), "_"
- + versionOverride);
+ parameters = parameters.replaceFirst(
+ "_" + getDesiredCapabilities().getVersion(),
+ "_" + versionOverride);
}
return parameters;
}
@@ -459,9 +460,10 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
* running this test.
*/
private String getScreenshotErrorBaseName() {
- return getScreenshotReferenceName("dummy", null).replace(
- getScreenshotReferenceDirectory(),
- getScreenshotErrorDirectory()).replace("_dummy.png", "");
+ return getScreenshotReferenceName("dummy", null)
+ .replace(getScreenshotReferenceDirectory(),
+ getScreenshotErrorDirectory())
+ .replace("_dummy.png", "");
}
/**
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/SingleBrowserTest.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/SingleBrowserTest.java
index b5389d3eec..e8e8089edf 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/SingleBrowserTest.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/SingleBrowserTest.java
@@ -28,7 +28,7 @@ public abstract class SingleBrowserTest extends PrivateTB3Configuration {
if (isRunLocally()) {
return Collections.singletonList(getRunLocallyCapabilities());
}
- return Collections.singletonList(Browser.PHANTOMJS
- .getDesiredCapabilities());
+ return Collections
+ .singletonList(Browser.PHANTOMJS.getDesiredCapabilities());
}
}
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/SingleBrowserTestPhantomJS2.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/SingleBrowserTestPhantomJS2.java
index 7447a3c056..b785865790 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/SingleBrowserTestPhantomJS2.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/SingleBrowserTestPhantomJS2.java
@@ -20,8 +20,8 @@ import java.util.List;
import org.openqa.selenium.remote.DesiredCapabilities;
-public abstract class SingleBrowserTestPhantomJS2 extends
- PrivateTB3Configuration {
+public abstract class SingleBrowserTestPhantomJS2
+ extends PrivateTB3Configuration {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
return Collections.singletonList(PHANTOMJS2());
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3Runner.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3Runner.java
index 4917e398cf..9437bab3df 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3Runner.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3Runner.java
@@ -57,7 +57,8 @@ public class TB3Runner extends ParallelRunner {
public HttpClient getGridHttpClient(int connection_timeout,
int socket_timeout) {
- if (socket_timeout == 0 || socket_timeout > SOCKET_TIMEOUT) {
+ if (socket_timeout == 0
+ || socket_timeout > SOCKET_TIMEOUT) {
return super.getGridHttpClient(connection_timeout,
SOCKET_TIMEOUT);
}
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestLocator.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestLocator.java
index eb0861757e..f48ea59e4d 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestLocator.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestLocator.java
@@ -74,8 +74,8 @@ public class TB3TestLocator {
try {
File f = new File(location.toURI());
if (!f.exists()) {
- throw new IOException("Directory " + f.toString()
- + " does not exist");
+ throw new IOException(
+ "Directory " + f.toString() + " does not exist");
}
findPackages(f, basePackage, baseClass, classes,
ignoredPackages);
@@ -193,7 +193,8 @@ public class TB3TestLocator {
return;
}
- if (!Modifier.isAbstract(c.getModifiers()) && !c.isAnonymousClass()) {
+ if (!Modifier.isAbstract(c.getModifiers())
+ && !c.isAnonymousClass()) {
result.add((Class<? extends T>) c);
}
} catch (Exception e) {
@@ -217,8 +218,8 @@ public class TB3TestLocator {
.getAnnotation(IncludeIfProperty.class);
if (includeIfProperty != null) {
String includeValue = includeIfProperty.value();
- String systemPropertyValue = System.getProperty(includeIfProperty
- .property());
+ String systemPropertyValue = System
+ .getProperty(includeIfProperty.property());
if (!includeValue.equals(systemPropertyValue)) {
return false;
}
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestSuite.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestSuite.java
index c68d59a4eb..385e5bc4f8 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestSuite.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestSuite.java
@@ -41,8 +41,7 @@ public class TB3TestSuite extends ParallelTestSuite {
Class<? extends AbstractTB3Test> baseClass, String basePackage,
String[] ignorePackages, TB3TestLocator locator)
throws InitializationError, IOException {
- super(klass, locator
- .findClasses(baseClass, basePackage, ignorePackages).toArray(
- new Class<?>[] {}));
+ super(klass, locator.findClasses(baseClass, basePackage, ignorePackages)
+ .toArray(new Class<?>[] {}));
}
}
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/VaadinBrowserFactory.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/VaadinBrowserFactory.java
index 2389811ff0..fa35526f4d 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/VaadinBrowserFactory.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/VaadinBrowserFactory.java
@@ -42,9 +42,8 @@ public class VaadinBrowserFactory extends DefaultBrowserFactory {
.getClassLoader().loadClass(browserFactoryClass)
.newInstance();
} catch (Exception e) {
- getLogger().warning(
- "Failed to instantiate browser factory "
- + browserFactoryClass);
+ getLogger().warning("Failed to instantiate browser factory "
+ + browserFactoryClass);
throw new RuntimeException(e);
}
}