aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@gmail.com>2017-02-10 13:42:08 +0200
committerGitHub <noreply@github.com>2017-02-10 13:42:08 +0200
commit4445eae397818196ba1818470c73ccf34e2033ce (patch)
tree110a9c2d787eb13045d5a4cf8cf3929357396254
parent222003731a35affe551a12b23193e987f316dc96 (diff)
downloadvaadin-framework-4445eae397818196ba1818470c73ccf34e2033ce.tar.gz
vaadin-framework-4445eae397818196ba1818470c73ccf34e2033ce.zip
Fix Firefox 45 tests (click issues, screenshots) (#8533)
m---------tests/screenshots0
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java7
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java14
5 files changed, 24 insertions, 12 deletions
diff --git a/tests/screenshots b/tests/screenshots
-Subproject ce9907a1e9f05abceeb9be656b4d1d8d58f0d5b
+Subproject c233d26d0af136183eef3707461e2df0d026ff4
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java
index 69762141d8..6a82492da5 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -1003,6 +1003,15 @@ public abstract class AbstractTB3Test extends ParallelTest {
}
}
+ protected void clickElement(WebElement element) {
+ if (BrowserUtil.isFirefox(getDesiredCapabilities())) {
+ // Workaround for Selenium/TB and Firefox 45 issue
+ ((TestBenchElement) (element)).clickHiddenElement();
+ } else {
+ element.click();
+ }
+ }
+
protected boolean isLoadingIndicatorVisible() {
WebElement loadingIndicator = findElement(
By.className("v-loading-indicator"));
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 f60e3b5f67..a20968986c 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
@@ -35,10 +35,11 @@ public class ComboBoxClickIconTest extends MultiBrowserTest {
$(ComboBoxElement.class).first().openPopup();
- getDriver().findElements(By.className("gwt-MenuItem")).get(1).click();
+ clickElement(
+ getDriver().findElements(By.className("gwt-MenuItem")).get(1));
- getDriver().findElement(By.className("v-filterselect"))
- .findElement(By.className("v-icon")).click();
+ clickElement(getDriver().findElement(By.className("v-filterselect"))
+ .findElement(By.className("v-icon")));
Assert.assertTrue("Unable to find menu items in combobox popup",
isElementPresent(By.className("gwt-MenuItem")));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java
index e2dcd8ca10..656dea1ed0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java
@@ -27,7 +27,7 @@ public class ComboBoxLargeIconsTest extends MultiBrowserTest {
compareScreen("icons-16x16-page1");
cb.openNextPage();
compareScreen("icons-16x16-page2");
- cb.findElement(By.vaadin("#popup/item0")).click();
+ clickElement(cb.findElement(By.vaadin("#popup/item0")));
compareScreen("icons-16x16-selected-1-3-5-9");
iconSelect.selectByText("32x32");
@@ -42,12 +42,12 @@ public class ComboBoxLargeIconsTest extends MultiBrowserTest {
ComboBoxElement pageLength0cb = $(ComboBoxElement.class)
.caption("Pagelength 0").first();
pageLength0cb.openPopup();
- pageLength0cb.findElement(By.vaadin("#popup/item1")).click();
+ clickElement(pageLength0cb.findElement(By.vaadin("#popup/item1")));
ComboBoxElement cb200px = $(ComboBoxElement.class)
.caption("200px wide select with 50 items").first();
cb200px.openPopup();
- cb200px.findElement(By.vaadin("#popup/item1")).click();
+ clickElement(cb200px.findElement(By.vaadin("#popup/item1")));
ComboBoxElement cb150px = $(ComboBoxElement.class)
.caption("150px wide select with 5 items").first();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java
index 41632ea080..ac62ffe6d6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java
@@ -75,28 +75,30 @@ public class ComboboxSelectedItemTextTest extends MultiBrowserTest {
// Select an element from the first (to test) combobox.
- comboBox.findElement(By.className("v-filterselect-button")).click();
+ clickElement(
+ comboBox.findElement(By.className("v-filterselect-button")));
waitForPopup(comboBox);
WebElement comboBoxPopup = vaadinElement(
"/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
+ indexToTest + "]/VComboBox[0]#popup");
- comboBoxPopup.findElements(By.tagName("td")).get(2).click();
+ clickElement(comboBoxPopup.findElements(By.tagName("td")).get(2));
// Select an element from the second (to focus) combobox to remove
// focus from the first combobox
- comboBoxFocus.findElement(By.className("v-filterselect-button"))
- .click();
+ clickElement(comboBoxFocus
+ .findElement(By.className("v-filterselect-button")));
waitForPopup(comboBoxFocus);
comboBoxPopup = vaadinElement(
"/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
+ indexToFocus + "]/VComboBox[0]#popup");
- comboBoxPopup.findElements(By.tagName("td")).get(2).click();
+ clickElement(comboBoxPopup.findElements(By.tagName("td")).get(2));
// click the button of the first combobox. This would reveal the
// unwanted behaviour.
- comboBox.findElement(By.className("v-filterselect-button")).click();
+ clickElement(
+ comboBox.findElement(By.className("v-filterselect-button")));
// sadly, screenshot comparison is the only reasonable way to test a
// rendering issue.