diff options
author | Henri Sara <henri.sara@gmail.com> | 2017-03-13 16:14:42 +0200 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2017-03-13 16:14:42 +0200 |
commit | 93a42883a47908b573e27947a0f55ef77ed27aee (patch) | |
tree | 66371ecb2a48574f21c9c04ca606f412edec49a5 | |
parent | 776b54648a44a9d996b362ce71816d1187a84a79 (diff) | |
download | vaadin-framework-93a42883a47908b573e27947a0f55ef77ed27aee.tar.gz vaadin-framework-93a42883a47908b573e27947a0f55ef77ed27aee.zip |
Fix some tests for 7.7
3 files changed, 18 insertions, 9 deletions
diff --git a/tests/screenshots b/tests/screenshots -Subproject 17fe3eb960b74fd5c36fc19fc8ae91347009abd +Subproject 3f7397e946b0aba1c0e1857547fc05cc2d51273 diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnResizeModeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnResizeModeTest.java index 8e767eb033..d24fe19639 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnResizeModeTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnResizeModeTest.java @@ -39,17 +39,20 @@ public class GridColumnResizeModeTest extends GridBasicFeaturesTest { CustomGridElement grid = getGridElement(); + selectMenuPath("Component", "Columns", "Simple resize mode"); + sleep(250); + List<WebElement> handles = grid.findElements(By.className("v-grid-column-resize-handle")); WebElement handle = handles.get(1); - Actions drag1 = new Actions(getDriver()).moveToElement(handle).clickAndHold(); + // add 1px because of a glitch on IE9 and IE10 in our testing + // environment + Actions drag1 = new Actions(getDriver()).moveToElement(handle) + .moveByOffset(1, 0).clickAndHold(); Actions drag2 = new Actions(getDriver()).moveByOffset(-50, 0); Actions drag3 = new Actions(getDriver()).moveByOffset(100, 0); Actions dragEndAction = new Actions(getDriver()).release().moveToElement(grid); - selectMenuPath("Component", "Columns", "Simple resize mode"); - sleep(250); - drag1.perform(); sleep(500); drag2.perform(); diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesTest.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesTest.java index d3eae2e653..e2abf4cef7 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesTest.java @@ -28,6 +28,7 @@ import org.openqa.selenium.support.ui.ExpectedConditions; import com.vaadin.testbench.By; import com.vaadin.testbench.commands.TestBenchElementCommands; import com.vaadin.testbench.elements.TreeTableElement; +import com.vaadin.testbench.parallel.BrowserUtil; import com.vaadin.tests.tb3.MultiBrowserTest; /** @@ -49,7 +50,7 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest { // expand the first root element treeTable.getCell(0, 0) - .findElement(By.className("v-treetable-treespacer")).click(); + .findElement(By.className("v-treetable-treespacer")).click(); treeTable = $(TreeTableElement.class).first(); // wait for the scrollposition element to disappear @@ -67,7 +68,12 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest { // scroll far enough down to drop the first row from the cache // but not far enough to reach the last row - scrollable.scroll(1692); + if (BrowserUtil.isChrome(getDesiredCapabilities())) { + // Chrome 56 requires different scroll position + scrollable.scroll(846); + } else { + scrollable.scroll(1692); + } // wait for the scrollposition element to disappear waitUntilNot(ExpectedConditions.visibilityOfElementLocated( @@ -119,7 +125,7 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest { // expand the first root element treeTable.getCell(0, 0) - .findElement(By.className("v-treetable-treespacer")).click(); + .findElement(By.className("v-treetable-treespacer")).click(); // wait for the scrollposition element to disappear waitUntilNot(ExpectedConditions.visibilityOfElementLocated( @@ -151,7 +157,7 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest { // expand the second root element treeTable.getCell(201, 0) - .findElement(By.className("v-treetable-treespacer")).click(); + .findElement(By.className("v-treetable-treespacer")).click(); // wait for the scrollposition element to disappear waitUntilNot(ExpectedConditions.visibilityOfElementLocated( @@ -168,7 +174,7 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest { // collapse the second root element treeTable.getCell(201, 0) - .findElement(By.className("v-treetable-treespacer")).click(); + .findElement(By.className("v-treetable-treespacer")).click(); // wait for the scrollposition element to disappear waitUntilNot(ExpectedConditions.visibilityOfElementLocated( |