summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorDenis <denis@vaadin.com>2016-12-19 11:43:19 +0200
committerHenri Sara <henri.sara@gmail.com>2016-12-19 11:43:19 +0200
commitd7a081b3307adb18fefa99cd06d97de432513144 (patch)
tree6ddd23963077c0065530b35d98b668d437f5cce6 /uitest
parentcf748bf329786ea2d78166dc9f979b006802e124 (diff)
downloadvaadin-framework-d7a081b3307adb18fefa99cd06d97de432513144.tar.gz
vaadin-framework-d7a081b3307adb18fefa99cd06d97de432513144.zip
Grid horizontal scrolling fix for Chrome. (#8031)
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/HorizontalScrollAfterResizeTest.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/HorizontalScrollAfterResizeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/HorizontalScrollAfterResizeTest.java
index fcc9681b61..fa612b1a28 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/HorizontalScrollAfterResizeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/HorizontalScrollAfterResizeTest.java
@@ -52,13 +52,16 @@ public class HorizontalScrollAfterResizeTest extends GridBasicFeaturesTest {
// second scroll to the right
scrollGridHorizontallyTo(600);
- Point lolocationAfterSecondScrollcation = $(GridElement.class).first()
+ Point locationAfterSecondScrollcation = $(GridElement.class).first()
.getCell(0, 9).getLocation();
- // With the bug scrolling doesn't happen. Location should be the same as
- // first time
- Assert.assertEquals(locationAfterFirstScroll,
- lolocationAfterSecondScrollcation);
+ // With the bug scrolling doesn't happen. Location should be around of
+ // the initial scrolling
+ Assert.assertEquals(locationAfterFirstScroll.getY(),
+ locationAfterSecondScrollcation.getY());
+ int delta = 5;
+ Assert.assertTrue(Math.abs(locationAfterFirstScroll.getX()
+ - locationAfterSecondScrollcation.getX()) < delta);
}
@Override