summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2016-11-08 13:11:42 +0200
committerHenri Sara <hesara@vaadin.com>2016-11-09 11:48:56 +0000
commit1a94d6b90732c44b0ea20c82fd4129486a70a1bd (patch)
treeba1dd719e3110bfb570b6b6ea10418bd65d96fbf /uitest
parent0b7dc34d220f9443061c1664d235fe6085501025 (diff)
downloadvaadin-framework-1a94d6b90732c44b0ea20c82fd4129486a70a1bd.tar.gz
vaadin-framework-1a94d6b90732c44b0ea20c82fd4129486a70a1bd.zip
Fix modern browsers test failures for 7.7.
Change-Id: Ibef57aa4f8838f3bbc5f5c5500f3f4f7fc6eb438
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListenerTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemStyleGeneratorTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreenTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java15
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentageTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixelsTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java17
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopenTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/CustomComboBoxElement.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/flash/FlashIsVisibleTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/select/EnumSelectTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/newelements/ComboBoxElement.java15
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/LegacyComponentThemeChangeTest.java2
19 files changed, 56 insertions, 30 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java b/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java
index 22c8b6b39f..2aa66f82c5 100644
--- a/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java
@@ -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();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java
index 29b58705e5..bf1070f667 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java
@@ -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.
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java
index a5efb44ec8..04caa3cb50 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java
@@ -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"));
}
+
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListenerTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListenerTest.java
index 76758eecdd..8912cc5dca 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListenerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListenerTest.java
@@ -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 {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemStyleGeneratorTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemStyleGeneratorTest.java
index 8faedffedd..aca0dfa5be 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemStyleGeneratorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemStyleGeneratorTest.java
@@ -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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreenTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreenTest.java
index ce7dbd5a48..c4f988f4ca 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreenTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreenTest.java
@@ -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.
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java
index 12e0e4640a..c9542c8682 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java
@@ -15,19 +15,20 @@
*/
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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentageTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentageTest.java
index edc4ad489a..251f730d6b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentageTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentageTest.java
@@ -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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixelsTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixelsTest.java
index f5a0d9dc52..49c7202ed3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixelsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixelsTest.java
@@ -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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthTest.java
index b2502a720c..cc0f242c15 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthTest.java
@@ -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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java
index 8fd2e06765..1340ba72dc 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java
@@ -15,18 +15,19 @@
*/
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.
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopenTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopenTest.java
index 2b82acf505..054ef46998 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopenTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopenTest.java
@@ -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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/CustomComboBoxElement.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/CustomComboBoxElement.java
index bdcf92fd56..d72745edb3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/CustomComboBoxElement.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/CustomComboBoxElement.java
@@ -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);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/flash/FlashIsVisibleTest.java b/uitest/src/test/java/com/vaadin/tests/components/flash/FlashIsVisibleTest.java
index 4a18d4d8a2..4f8d6602fe 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/flash/FlashIsVisibleTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/flash/FlashIsVisibleTest.java
@@ -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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/select/EnumSelectTest.java b/uitest/src/test/java/com/vaadin/tests/components/select/EnumSelectTest.java
index 9669f82ae2..49da95766c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/select/EnumSelectTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/select/EnumSelectTest.java
@@ -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 {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java b/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java
index b299332324..ad6bc240d4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java
@@ -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;
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java
index 3de3b517a6..bdffca69a9 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -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();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/newelements/ComboBoxElement.java b/uitest/src/test/java/com/vaadin/tests/tb3/newelements/ComboBoxElement.java
index f1f16d3e00..f518d3e362 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/newelements/ComboBoxElement.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/newelements/ComboBoxElement.java
@@ -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());
+ }
}
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/LegacyComponentThemeChangeTest.java b/uitest/src/test/java/com/vaadin/tests/themes/LegacyComponentThemeChangeTest.java
index b10c51573f..de55664242 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/LegacyComponentThemeChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/LegacyComponentThemeChangeTest.java
@@ -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 {