]> source.dussan.org Git - vaadin-framework.git/commitdiff
Expect Chrome 41
authorArtur Signell <artur@vaadin.com>
Mon, 23 Mar 2015 20:15:51 +0000 (22:15 +0200)
committerVaadin Code Review <review@vaadin.com>
Tue, 24 Mar 2015 08:06:15 +0000 (08:06 +0000)
Change-Id: I64c8788c0ae6160c565dfc0cfb4a87a7ed86bc81

uitest/src/com/vaadin/tests/VerifyBrowserVersionTest.java

index 5b4f4df78831aae0aedd61b9e1fde86895e01cd9..8d0530204a82332a2d60e20c6f60df04b3478463 100644 (file)
@@ -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"));