]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix modern browsers test failures for 7.7.
authorDenis Anisimov <denis@vaadin.com>
Tue, 8 Nov 2016 11:11:42 +0000 (13:11 +0200)
committerHenri Sara <hesara@vaadin.com>
Wed, 9 Nov 2016 11:48:56 +0000 (11:48 +0000)
Change-Id: Ibef57aa4f8838f3bbc5f5c5500f3f4f7fc6eb438

19 files changed:
uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListenerTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemStyleGeneratorTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreenTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentageTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixelsTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopenTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/CustomComboBoxElement.java
uitest/src/test/java/com/vaadin/tests/components/flash/FlashIsVisibleTest.java
uitest/src/test/java/com/vaadin/tests/components/select/EnumSelectTest.java
uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java
uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java
uitest/src/test/java/com/vaadin/tests/tb3/newelements/ComboBoxElement.java
uitest/src/test/java/com/vaadin/tests/themes/LegacyComponentThemeChangeTest.java

index 22c8b6b39fa96f01d094b3e6ee72e9a9fda353b5..2aa66f82c5c2b9c24dc02144ef821a694bc6a262 100644 (file)
@@ -40,7 +40,7 @@ public class VerifyBrowserVersionTest extends MultiBrowserTest {
             // Chrome version does not necessarily match the desired version
             // because of auto updates...
             browserIdentifier = getExpectedUserAgentString(
-                    getDesiredCapabilities()) + "53";
+                    getDesiredCapabilities()) + "54";
         } else {
             browserIdentifier = getExpectedUserAgentString(desiredCapabilities)
                     + desiredCapabilities.getVersion();
index 29b58705e5988d05a985842bb099ccb13941f415..bf1070f6672d679b61eb5322f88d4be31e47070c 100644 (file)
@@ -19,8 +19,8 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.openqa.selenium.By;
 
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 /**
  * Test to check whether combobox is expanded when icon is clicked.
index a5efb44ec8f06cfe485a68baf0ad5230ea763d95..04caa3cb50ee3be085475659eccc98acb74b4bdb 100644 (file)
@@ -21,8 +21,8 @@ import org.junit.Test;
 import org.openqa.selenium.WebElement;
 
 import com.vaadin.testbench.By;
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 public class ComboBoxClosePopupRetainTextTest extends MultiBrowserTest {
     @Override
@@ -57,4 +57,5 @@ public class ComboBoxClosePopupRetainTextTest extends MultiBrowserTest {
         assertEquals("I", textbox.getAttribute("value"));
 
     }
+
 }
index 76758eecdd658be793d2dac1ae59b5a1005f3c5d..8912cc5dcad60040f50e99835142d21bc232a63e 100644 (file)
@@ -22,8 +22,8 @@ import org.junit.Test;
 import com.vaadin.testbench.By;
 import com.vaadin.testbench.TestBenchElement;
 import com.vaadin.testbench.elements.ButtonElement;
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 public class ComboBoxItemAddingWithFocusListenerTest extends MultiBrowserTest {
 
index 8faedffedda7deace345b51b5772aeb33e5ab287..aca0dfa5be6c8624309ec9d9741341052eee0d2a 100644 (file)
@@ -22,8 +22,8 @@ import org.junit.Test;
 import org.openqa.selenium.By;
 import org.openqa.selenium.WebElement;
 
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.tests.tb3.SingleBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 public class ComboBoxItemStyleGeneratorTest extends SingleBrowserTest {
     @Test
index ce7dbd5a4832366483a57d798bc804384353fbbf..c4f988f4cad99698a7c994790e4d53e1e4954484 100644 (file)
@@ -25,8 +25,8 @@ import org.openqa.selenium.WebDriver.Window;
 import org.openqa.selenium.WebElement;
 
 import com.vaadin.client.ui.VFilterSelect;
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 /**
  * ComboBox suggestion popup should not obscure the text input box.
index 12e0e4640ae24ded757f8a0a5cc34576d6130b6d..c9542c8682080b7a0a05e8754a292da845eec80a 100644 (file)
  */
 package com.vaadin.tests.components.combobox;
 
-import com.vaadin.testbench.By;
-import com.vaadin.testbench.elements.ComboBoxElement;
-import com.vaadin.tests.tb3.MultiBrowserTest;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+
+import java.util.List;
+
 import org.junit.Test;
 import org.openqa.selenium.Keys;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.WebElement;
 import org.openqa.selenium.support.ui.ExpectedCondition;
 
-import java.util.List;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
+import com.vaadin.testbench.By;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 /**
  * When pressed down key, while positioned on the last item - should show next
index edc4ad489a606ad105c18f54ab46f462bf4b8485..251f730d6b620ce37ccd4e01cc8439352063f73a 100644 (file)
@@ -21,8 +21,8 @@ import org.junit.Test;
 import org.openqa.selenium.WebElement;
 
 import com.vaadin.testbench.By;
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 /**
  * @author Vaadin Ltd
index f5a0d9dc52f0679199cd842b736def57324db795..49c7202ed3b938575c0ae6705c38dcc7a1759049 100644 (file)
@@ -21,8 +21,8 @@ import org.junit.Test;
 import org.openqa.selenium.WebElement;
 
 import com.vaadin.testbench.By;
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 /**
  * @author Vaadin Ltd
index b2502a720c85fc88e3dfb1f84078d3969a028846..cc0f242c1548c62be46800d2a5cafa2fe9ea38cc 100644 (file)
@@ -21,8 +21,8 @@ import org.junit.Test;
 import org.openqa.selenium.WebElement;
 
 import com.vaadin.testbench.By;
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 /**
  * @author Vaadin Ltd
index 8fd2e0676528d1e1fb2e2398d064dadb5982181b..1340ba72dc7dd8e9787eb7125b71a02626c54587 100644 (file)
  */
 package com.vaadin.tests.components.combobox;
 
-import com.vaadin.testbench.By;
-import com.vaadin.testbench.elements.ComboBoxElement;
-import com.vaadin.testbench.elements.VerticalLayoutElement;
-import com.vaadin.tests.tb3.MultiBrowserTest;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.util.List;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.openqa.selenium.WebElement;
 
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
+import com.vaadin.testbench.By;
+import com.vaadin.testbench.elements.VerticalLayoutElement;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 /**
  * Tests ComboBox inputs and selections.
index 2b82acf505e246c966973945beb0c5f4e764b02b..054ef46998c94dfe53895b1ab6ac8a5bb92b2acb 100644 (file)
@@ -21,9 +21,9 @@ import org.openqa.selenium.By;
 import org.openqa.selenium.WebElement;
 import org.openqa.selenium.interactions.Actions;
 
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.testbench.elements.MenuBarElement;
 import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 /**
  * Test that checks whether Combobox popup is closed on click to autoopen
index bdcf92fd56246605b4cfc2a322fa5a6f3846ff29..d72745edb3d060e925da748009ae963c74309d52 100644 (file)
@@ -18,14 +18,15 @@ package com.vaadin.tests.components.combobox;
 import org.openqa.selenium.WebElement;
 
 import com.vaadin.testbench.By;
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.testbench.elementsbase.ServerClass;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 @ServerClass("com.vaadin.ui.ComboBox")
 public class CustomComboBoxElement extends ComboBoxElement {
     private static org.openqa.selenium.By bySuggestionPopup = By
             .vaadin("#popup");
 
+    @Override
     public WebElement getSuggestionPopup() {
         ensurePopupOpen();
         return findElement(bySuggestionPopup);
index 4a18d4d8a21e6502988048445a7401770e82322e..4f8d6602fecae95c115e80dc1bce2fcef676a197 100644 (file)
@@ -5,6 +5,7 @@ import java.util.List;
 import org.junit.Test;
 import org.openqa.selenium.remote.DesiredCapabilities;
 
+import com.vaadin.testbench.parallel.Browser;
 import com.vaadin.tests.tb3.MultiBrowserTest;
 
 public class FlashIsVisibleTest extends MultiBrowserTest {
@@ -12,7 +13,10 @@ public class FlashIsVisibleTest extends MultiBrowserTest {
     @Override
     public List<DesiredCapabilities> getBrowsersToTest() {
         // FF and PhantomJS fail at Flash and ShiftClick
-        return getBrowsersSupportingShiftClick();
+        List<DesiredCapabilities> capabilities = getBrowsersSupportingShiftClick();
+        // Flash support in Chrome is disabled
+        capabilities.remove(Browser.CHROME);
+        return capabilities;
     }
 
     @Test
index 9669f82ae2f4dc006fb044b005ec657609644f6f..49da95766c66f8ebf0e8bc49e63859c870623d04 100644 (file)
@@ -22,9 +22,9 @@ import org.junit.Test;
 
 import com.vaadin.testbench.By;
 import com.vaadin.testbench.TestBenchElement;
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.testbench.elements.NativeSelectElement;
 import com.vaadin.tests.tb3.SingleBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 public class EnumSelectTest extends SingleBrowserTest {
 
index b29933232464f747b3d4dd45c63d2679a8f5e6d8..ad6bc240d4a6e058821b8b1ae005fd6677f79b73 100644 (file)
@@ -9,11 +9,11 @@ import org.openqa.selenium.interactions.Actions;
 
 import com.vaadin.testbench.By;
 import com.vaadin.testbench.elements.ButtonElement;
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.testbench.elements.TableElement;
 import com.vaadin.testbench.elementsbase.ServerClass;
 import com.vaadin.testbench.parallel.BrowserUtil;
 import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 import com.vaadin.tests.tb3.newelements.FixedNotificationElement;
 import com.vaadin.tests.tb3.newelements.WindowElement;
 
index 3de3b517a64014f250b71f09fa4c70ed137a8f52..bdffca69a91c3fd30112b6a2459d09063ab160e3 100644 (file)
@@ -1006,6 +1006,9 @@ public abstract class AbstractTB3Test extends ParallelTest {
         WebElement cb = checkbox.findElement(By.xpath("input"));
         if (BrowserUtil.isChrome(getDesiredCapabilities())) {
             testBenchElement(cb).click(0, 0);
+        } else if (BrowserUtil.isFirefox(getDesiredCapabilities())) {
+            getTestBenchCommandExecutor().executeScript("arguments[0].click();",
+                    cb);
         } else {
             cb.click();
         }
index f1f16d3e008c893826b7b5de464dd20f6345a1c7..f518d3e362fdb3ab74e04a205fb7ba6bd58fa178 100644 (file)
@@ -2,6 +2,7 @@ package com.vaadin.tests.tb3.newelements;
 
 import org.junit.Assert;
 import org.openqa.selenium.WebElement;
+import org.openqa.selenium.remote.BrowserType;
 
 import com.vaadin.testbench.By;
 import com.vaadin.testbench.elementsbase.ServerClass;
@@ -36,6 +37,16 @@ public class ComboBoxElement
         sendKeys(50, keysToSend);
     }
 
+    @Override
+    public void openPopup() {
+        if (isFirefox()) {
+            getTestBenchCommandExecutor().executeScript("arguments[0].click();",
+                    findElement(By.vaadin("#button")));
+        } else {
+            super.openPopup();
+        }
+    }
+
     /**
      * Use this method to simulate typing into an element, which may set its
      * value.
@@ -58,4 +69,8 @@ public class ComboBoxElement
             }
         }
     }
+
+    public boolean isFirefox() {
+        return BrowserType.FIREFOX.equals(getCapabilities().getBrowserName());
+    }
 }
index b10c51573ff0b3481112552d62dacb26191bc064..de55664242db481cdae67b74303fd8977d8ffd1b 100644 (file)
@@ -24,13 +24,13 @@ import org.openqa.selenium.WebElement;
 import org.openqa.selenium.remote.DesiredCapabilities;
 
 import com.vaadin.testbench.elements.ButtonElement;
-import com.vaadin.testbench.elements.ComboBoxElement;
 import com.vaadin.testbench.elements.EmbeddedElement;
 import com.vaadin.testbench.elements.MenuBarElement;
 import com.vaadin.testbench.elements.TableElement;
 import com.vaadin.testbench.parallel.Browser;
 import com.vaadin.testbench.parallel.BrowserUtil;
 import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
 
 public class LegacyComponentThemeChangeTest extends MultiBrowserTest {