diff --git a/packages/element/tests/binding.test.tsx b/packages/element/tests/binding.test.tsx index f57d7793a..bc34e7d89 100644 --- a/packages/element/tests/binding.test.tsx +++ b/packages/element/tests/binding.test.tsx @@ -172,14 +172,15 @@ describe("element binding", () => { const arrow = UI.createElement("arrow", { x: 0, y: 0, - size: 50, + size: 49, }); expect(arrow.endBinding).toBe(null); mouse.downAt(50, 50); - mouse.moveTo(51, 0); + mouse.moveTo(57, 0); mouse.up(0, 0); + console.log(JSON.stringify(h.elements)); // Test sticky connection expect(API.getSelectedElement().type).toBe("arrow"); diff --git a/packages/excalidraw/components/Stats/stats.test.tsx b/packages/excalidraw/components/Stats/stats.test.tsx index cc1cfce98..dd1b79a96 100644 --- a/packages/excalidraw/components/Stats/stats.test.tsx +++ b/packages/excalidraw/components/Stats/stats.test.tsx @@ -133,10 +133,9 @@ describe("binding with linear elements", () => { const inputX = UI.queryStatsProperty("X")?.querySelector( ".drag-input", ) as HTMLInputElement; - expect(linear.startBinding).not.toBe(null); expect(inputX).not.toBeNull(); - UI.updateInput(inputX, String("204")); + UI.updateInput(inputX, String("199")); expect(linear.startBinding).not.toBe(null); }); @@ -657,6 +656,7 @@ describe("stats for multiple elements", () => { mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { + mouse.moveTo(10, 0); mouse.click(); });