From 4f3397df74dc737a9c5592d5418e741433e20dee Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 23 Mar 2015 22:15:51 +0200 Subject: Expect Chrome 41 Change-Id: I64c8788c0ae6160c565dfc0cfb4a87a7ed86bc81 --- .../src/com/vaadin/tests/VerifyBrowserVersionTest.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/uitest/src/com/vaadin/tests/VerifyBrowserVersionTest.java b/uitest/src/com/vaadin/tests/VerifyBrowserVersionTest.java index 5b4f4df788..8d0530204a 100644 --- a/uitest/src/com/vaadin/tests/VerifyBrowserVersionTest.java +++ b/uitest/src/com/vaadin/tests/VerifyBrowserVersionTest.java @@ -33,9 +33,20 @@ public class VerifyBrowserVersionTest extends MultiBrowserTest { DesiredCapabilities desiredCapabilities = getDesiredCapabilities(); - assertThat(vaadinElementById("userAgent").getText(), - containsString(getExpectedUserAgentString(desiredCapabilities) - + desiredCapabilities.getVersion())); + String userAgent = vaadinElementById("userAgent").getText(); + String browserIdentifier; + + if (BrowserUtil.isChrome(getDesiredCapabilities())) { + // Chrome version does not necessarily match the desired version + // because of auto updates... + browserIdentifier = getExpectedUserAgentString(getDesiredCapabilities()) + + "41"; + } else { + browserIdentifier = getExpectedUserAgentString(desiredCapabilities) + + desiredCapabilities.getVersion(); + } + + assertThat(userAgent, containsString(browserIdentifier)); assertThat(vaadinElementById("touchDevice").getText(), is("Touch device? No")); -- cgit v1.2.3