From 0680481b066716bc0629e1cd793cc9f36d6dca5f Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 12 Oct 2017 23:40:48 +0200 Subject: [PATCH] build: fix subpixel failures when running locally (#7671) 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 f507d096e39..d508ca7c79c 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)); }); }