From: Artur Signell Date: Mon, 23 Mar 2015 20:15:51 +0000 (+0200) Subject: Expect Chrome 41 X-Git-Tag: 7.5.0.beta1~164 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4f3397df74dc737a9c5592d5418e741433e20dee;p=vaadin-framework.git Expect Chrome 41 Change-Id: I64c8788c0ae6160c565dfc0cfb4a87a7ed86bc81 --- 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"));