build: fix subpixel failures when running locally (#7671)

Fixes a few e2e tests that were failing due to subpixel measurement differences.
This commit is contained in:
Kristiyan Kostadinov
2017-10-12 23:40:48 +02:00
committed by Andrew Seguin
parent a7faebc88e
commit 0680481b06
+2 -2
View File
@@ -24,8 +24,8 @@ export function expectFocusOn(element: FinderResult, expected = true): void {
*/
export function expectLocation(element: FinderResult, {x, y}: Point): void {
getElement(element).getLocation().then((location: Point) => {
expect(location.x).toEqual(x);
expect(location.y).toEqual(y);
expect(Math.round(location.x)).toEqual(Math.round(x));
expect(Math.round(location.y)).toEqual(Math.round(y));
});
}