]> source.dussan.org Git - vaadin-framework.git/commitdiff
Make test stable in IE11
authorArtur Signell <artur@vaadin.com>
Mon, 7 Sep 2015 16:47:18 +0000 (19:47 +0300)
committerVaadin Code Review <review@vaadin.com>
Tue, 8 Sep 2015 09:22:50 +0000 (09:22 +0000)
Change-Id: Iac16310af8bde98caa78bec4763b78919ef8371d

uitest/src/com/vaadin/tests/application/CriticalNotificationsTest.java
uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java

index 03564cbaf710e12a42473c9269ca1a4756a08561..61159370545844613bd8550bce87e081c0706775 100644 (file)
@@ -24,6 +24,11 @@ import com.vaadin.tests.tb3.MultiBrowserThemeTest;
 
 public class CriticalNotificationsTest extends MultiBrowserThemeTest {
 
+    @Override
+    protected boolean useNativeEventsForIE11() {
+        return false;
+    }
+
     @Test
     public void internalError() throws Exception {
         testCriticalNotification("Internal error");
index 5ca945c8604f1566311069d1c6bba64a2728ebe0..00b861f705762adb0b89ad1111ea685e90ece7db 100644 (file)
@@ -904,6 +904,19 @@ public abstract class AbstractTB3Test extends ParallelTest {
         return true;
     }
 
+    /**
+     * Should the "native events" be enabled for Internet Explorer 11.
+     * <p>
+     * Native events sometimes cause failure in clicking on buttons/checkboxes
+     * but are possibly needed for some operations.
+     * 
+     * @return true, to use "native events", false to use generated Javascript
+     *         events
+     */
+    protected boolean useNativeEventsForIE11() {
+        return true;
+    }
+
     // FIXME: Remove this once TB4 getRemoteControlName works properly
     private RemoteWebDriver getRemoteDriver() {
         WebDriver d = getDriver();
index 23ead80fcec3ce275aa3a3df129ea7452058d2bd..fe2c12e8af3bc16225c7ad4993a5116d3e9c7deb 100644 (file)
@@ -96,6 +96,14 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration {
                         InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING,
                         false);
             }
+            if (BrowserUtil.isIE(desiredCapabilities, 11)) {
+                // Only for IE 11 for now, can be expanded to other versions if
+                // they have the same problems
+                if (!useNativeEventsForIE11()) {
+                    desiredCapabilities.setCapability(
+                            InternetExplorerDriver.NATIVE_EVENTS, false);
+                }
+            }
         }
 
         desiredCapabilities.setCapability("project", "Vaadin Framework");