Skip to content

Commit 0680481

Browse files
crisbetoandrewseguin
authored andcommitted
build: fix subpixel failures when running locally (#7671)
Fixes a few e2e tests that were failing due to subpixel measurement differences.
1 parent a7faebc commit 0680481

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

e2e/util/asserts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export function expectFocusOn(element: FinderResult, expected = true): void {
2424
*/
2525
export function expectLocation(element: FinderResult, {x, y}: Point): void {
2626
getElement(element).getLocation().then((location: Point) => {
27-
expect(location.x).toEqual(x);
28-
expect(location.y).toEqual(y);
27+
expect(Math.round(location.x)).toEqual(Math.round(x));
28+
expect(Math.round(location.y)).toEqual(Math.round(y));
2929
});
3030
}
3131

0 commit comments

Comments
 (0)