From c2d00bdb87ec97b2f1f25405b19a864fa2cc3c27 Mon Sep 17 00:00:00 2001 From: hdx Date: Fri, 6 Dec 2024 16:49:57 +0800 Subject: [PATCH] =?UTF-8?q?test:=20getBoundingClientRectAsync=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E7=B2=BE=E5=BA=A6=E5=81=8F=E5=B7=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../element-get-bounding-client-rect-async.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/API/element-get-bounding-client-rect-async/element-get-bounding-client-rect-async.test.js b/pages/API/element-get-bounding-client-rect-async/element-get-bounding-client-rect-async.test.js index 82b74376..5911f2df 100644 --- a/pages/API/element-get-bounding-client-rect-async/element-get-bounding-client-rect-async.test.js +++ b/pages/API/element-get-bounding-client-rect-async/element-get-bounding-client-rect-async.test.js @@ -31,7 +31,7 @@ async function invokeGetBoundingClientRect(page, methodName, dataName) { expect(Math.round(rectInfo.x)).toBe(RECT_X) expect(Math.round(rectInfo.y) > 90).toBe(true) - expect(Math.round(rectInfo.width)).toBe(width - 15 * 2) + expect(width - 15 * 2 - Math.round(rectInfo.width) >= 0).toBe(true) expect(Math.round(rectInfo.height)).toBe(RECT_HEIGHT) expect(Math.round(rectInfo.left)).toBe(RECT_LEFT) expect(Math.round(rectInfo.top) > 90).toBe(true) -- GitLab