diff options
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/VerifyBrowserVersionTest.java | 17 |
1 files 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")); |