]> source.dussan.org Git - vaadin-framework.git/commitdiff
Allowed one pixel's worth of mismatch in
authorAnna Koskinen <anna@vaadin.com>
Mon, 22 Sep 2014 13:18:51 +0000 (16:18 +0300)
committerVaadin Code Review <review@vaadin.com>
Sat, 27 Sep 2014 18:12:05 +0000 (18:12 +0000)
TableRepairsScrollPositionOnReAddingAllRowsTest.

Change-Id: I04f17bf0acbb445343e2f9b18f6a55ce4f764afa

uitest/src/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRowsTest.java

index 807a80d182121e56d1a141d6d1d8b47a914e1e8c..2fbdd8b58143ccac21d877c4a06e5cefa63cac1a 100644 (file)
@@ -15,8 +15,8 @@
  */
 package com.vaadin.tests.components.table;
 
-import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.number.IsCloseTo.closeTo;
 
 import org.junit.Test;
 import org.openqa.selenium.By;
@@ -58,9 +58,10 @@ public class TableRepairsScrollPositionOnReAddingAllRowsTest extends
         row = $(TableElement.class).first().getCell(49, 0);
         int newRowLocation = row.getLocation().getY();
 
+        // ranged check because IE9 consistently misses the mark by 1 pixel
         assertThat(
                 "Scroll position should be the same as before Re-Adding all rows",
-                rowLocation == newRowLocation, is(true));
+                (double) newRowLocation, closeTo(rowLocation, 1));
     }
 
     private void scrollUp() {