diff options
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/components/grid/HorizontalScrollAfterResizeTest.java | 13 |
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 |