aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-10-27 15:58:41 +0200
committerVaadin Code Review <review@vaadin.com>2015-10-27 14:01:56 +0000
commit1b992700c2560bc78cdc7910d7bbf2c4a969af38 (patch)
treefc1a5235441e48608d7c5455ec06288be07df1e8
parentee12bf38bf6d00afbb261a3bdf0c36ac9f80d6dc (diff)
downloadvaadin-framework-1b992700c2560bc78cdc7910d7bbf2c4a969af38.tar.gz
vaadin-framework-1b992700c2560bc78cdc7910d7bbf2c4a969af38.zip
Fix TreeTableContextClickTest to not scroll vertically on IE
Too wide TreeTable in a UI causes IE to scroll vertically making calculated positions fail miserably. Also makes context clicking in AbstractContextClickTest avoid StaleElementReferenceExceptions. Change-Id: Ic4f5049bf0c221eb441813d202b9de5571e655d6
-rw-r--r--uitest/src/com/vaadin/tests/contextclick/AbstractContextClickTest.java4
-rw-r--r--uitest/src/com/vaadin/tests/contextclick/TreeTableContextClick.java1
-rw-r--r--uitest/src/com/vaadin/tests/contextclick/TreeTableContextClickTest.java7
3 files changed, 2 insertions, 10 deletions
diff --git a/uitest/src/com/vaadin/tests/contextclick/AbstractContextClickTest.java b/uitest/src/com/vaadin/tests/contextclick/AbstractContextClickTest.java
index 272cbfdc0e..7544caaf0a 100644
--- a/uitest/src/com/vaadin/tests/contextclick/AbstractContextClickTest.java
+++ b/uitest/src/com/vaadin/tests/contextclick/AbstractContextClickTest.java
@@ -142,9 +142,7 @@ public abstract class AbstractContextClickTest extends MultiBrowserTest {
*/
protected void contextClick(WebElement e, int xCoord, int yCoord) {
new Actions(getDriver()).moveToElement(e, xCoord, yCoord)
- .contextClick().perform();
- new Actions(getDriver()).moveToElement(e, xCoord - 5, yCoord - 5)
- .click().perform();
+ .contextClick().moveByOffset(-5, -5).click().perform();
}
}
diff --git a/uitest/src/com/vaadin/tests/contextclick/TreeTableContextClick.java b/uitest/src/com/vaadin/tests/contextclick/TreeTableContextClick.java
index 431f231cca..406f5d589e 100644
--- a/uitest/src/com/vaadin/tests/contextclick/TreeTableContextClick.java
+++ b/uitest/src/com/vaadin/tests/contextclick/TreeTableContextClick.java
@@ -33,6 +33,7 @@ public class TreeTableContextClick extends
treeTable.setContainerDataSource(PersonContainer.createWithTestData());
treeTable.setFooterVisible(true);
treeTable.setHeight("400px");
+ treeTable.setWidth("100%");
return treeTable;
}
diff --git a/uitest/src/com/vaadin/tests/contextclick/TreeTableContextClickTest.java b/uitest/src/com/vaadin/tests/contextclick/TreeTableContextClickTest.java
index fa3a34be06..f91750ce91 100644
--- a/uitest/src/com/vaadin/tests/contextclick/TreeTableContextClickTest.java
+++ b/uitest/src/com/vaadin/tests/contextclick/TreeTableContextClickTest.java
@@ -15,7 +15,6 @@
*/
package com.vaadin.tests.contextclick;
-import org.openqa.selenium.interactions.Actions;
public class TreeTableContextClickTest extends TableContextClickTest {
@@ -23,10 +22,4 @@ public class TreeTableContextClickTest extends TableContextClickTest {
protected Class<?> getUIClass() {
return TreeTableContextClick.class;
}
-
- @Override
- protected void contextClick(org.openqa.selenium.WebElement e) {
- new Actions(getDriver()).moveToElement(e, 10, 10).contextClick()
- .perform();
- };
}