summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-11-24 14:52:15 +0200
committerVaadin Code Review <review@vaadin.com>2016-11-25 09:33:26 +0000
commitd63c1f9014e0a49e5250edd41bd5c7542901c267 (patch)
tree8a7551900962c15917487df0f977798bb0295917 /uitest
parent24b43d902c71ea469e2105f3a1c8be2f84610f04 (diff)
downloadvaadin-framework-d63c1f9014e0a49e5250edd41bd5c7542901c267.tar.gz
vaadin-framework-d63c1f9014e0a49e5250edd41bd5c7542901c267.zip
Upgrade to TestBench 5 alpha1 and JUnit 4.12
Change-Id: Ib3f88b6aca37ebb1962b4692df0c4ba11fe92bc2
Diffstat (limited to 'uitest')
-rw-r--r--uitest/ivy.xml4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java5
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/MemoryLeakTableTest.java2
3 files changed, 6 insertions, 5 deletions
diff --git a/uitest/ivy.xml b/uitest/ivy.xml
index 3e92b17ff9..15da194adb 100644
--- a/uitest/ivy.xml
+++ b/uitest/ivy.xml
@@ -108,7 +108,7 @@
<exclude org="org.eclipse.jetty.orbit"></exclude>
</dependency>
- <dependency org="junit" name="junit" rev="4.11"
+ <dependency org="junit" name="junit" rev="4.12"
conf="build -> default" />
<dependency org="org.hamcrest" name="hamcrest-all"
rev="1.3" conf="build->default" />
@@ -122,7 +122,7 @@
<dependency org="org.hsqldb" name="hsqldb" rev="2.2.6"
conf="build -> default" />
<dependency org="com.vaadin" name="vaadin-testbench"
- rev="4.1.0" conf="build-provided -> default" />
+ rev="5.0.0.alpha1" conf="build-provided -> default" />
<!-- This should be removed once tests have been updated to use lang3 -->
<dependency org="commons-lang" name="commons-lang"
rev="2.6" conf="build -> default" />
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java
index 3b986b503c..7f0947fc2d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java
@@ -26,6 +26,7 @@ import com.vaadin.testbench.TestBenchElement;
import com.vaadin.testbench.customelements.TableElement;
import com.vaadin.testbench.elements.ButtonElement;
import com.vaadin.testbench.elements.TableElement.ContextMenuElement;
+import com.vaadin.testbench.parallel.BrowserUtil;
import com.vaadin.tests.tb3.MultiBrowserTest;
public class ColumnCollapsingAndColumnExpansionTest extends MultiBrowserTest {
@@ -62,8 +63,8 @@ public class ColumnCollapsingAndColumnExpansionTest extends MultiBrowserTest {
}
private void contextClick(TestBenchElement e) {
- if (e.isPhantomJS()) {
- JavascriptExecutor js = e.getCommandExecutor();
+ if (BrowserUtil.isPhantomJS(getDesiredCapabilities())) {
+ JavascriptExecutor js = (JavascriptExecutor) getDriver();
String scr = "var element=arguments[0];"
+ "var ev = document.createEvent('HTMLEvents');"
+ "ev.initEvent('contextmenu', true, false);"
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/MemoryLeakTableTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/MemoryLeakTableTest.java
index f950319e71..8e004c26a7 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/MemoryLeakTableTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/MemoryLeakTableTest.java
@@ -86,7 +86,7 @@ public class MemoryLeakTableTest extends MultiBrowserTest {
private void scrollTable(TableElement tbl, int value) {
WebElement actualElement = tbl
.findElement(By.className("v-table-body-wrapper"));
- JavascriptExecutor js = tbl.getCommandExecutor();
+ JavascriptExecutor js = (JavascriptExecutor) getDriver();
js.executeScript("arguments[0].scrollTop = " + value, actualElement);
}
}