]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix some tests for 7.7
authorHenri Sara <henri.sara@gmail.com>
Mon, 13 Mar 2017 14:14:42 +0000 (16:14 +0200)
committerIlia Motornyi <elmot@vaadin.com>
Mon, 13 Mar 2017 14:14:42 +0000 (16:14 +0200)
tests/screenshots
uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnResizeModeTest.java
uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesTest.java

index 17fe3eb960b74fd5c36fc19fc8ae91347009abd7..3f7397e946b0aba1c0e1857547fc05cc2d512735 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 17fe3eb960b74fd5c36fc19fc8ae91347009abd7
+Subproject commit 3f7397e946b0aba1c0e1857547fc05cc2d512735
index 8e767eb033c8a0ce6b20431573a625b5aa23ecdd..d24fe196395d21375019fac521dacafc0d0d840c 100644 (file)
@@ -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();
index d3eae2e653def3a7721b33186c72d88da17a1c38..e2abf4cef7403119721818e1636d54e97356e19a 100644 (file)
@@ -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(