From 6f44e463dcaf16357f101a1150b20f8eff575d8c Mon Sep 17 00:00:00 2001 From: crisbeto Date: Mon, 9 Oct 2017 22:22:47 +0200 Subject: [PATCH] build: fix subpixel failures when running locally Fixes a few e2e tests that were failing due to subpixel measurement differences. --- e2e/util/asserts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/util/asserts.ts b/e2e/util/asserts.ts index f507d096e399..d508ca7c79ca 100644 --- a/e2e/util/asserts.ts +++ b/e2e/util/asserts.ts @@ -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)); }); }