FIx tests

This commit is contained in:
Mark Tolmacs 2025-03-02 16:32:29 +01:00
parent 2af0336466
commit 3fa818b0ce
3 changed files with 45 additions and 32 deletions

View file

@ -511,12 +511,12 @@ describe("arrow element", () => {
)[0] as ExcalidrawElbowArrowElement;
expect(arrow.startBinding?.fixedPoint?.[0]).toBeCloseTo(1.05);
expect(arrow.startBinding?.fixedPoint?.[1]).toBeCloseTo(0.78);
expect(arrow.startBinding?.fixedPoint?.[1]).toBeCloseTo(0.79);
UI.resize(rectangle, "se", [-200, -150]);
expect(arrow.startBinding?.fixedPoint?.[0]).toBeCloseTo(1.05);
expect(arrow.startBinding?.fixedPoint?.[1]).toBeCloseTo(0.78);
expect(arrow.startBinding?.fixedPoint?.[1]).toBeCloseTo(0.79);
});
it("flips the fixed point binding on negative resize for group selection", () => {
@ -539,7 +539,7 @@ describe("arrow element", () => {
)[0] as ExcalidrawElbowArrowElement;
expect(arrow.startBinding?.fixedPoint?.[0]).toBeCloseTo(1.05);
expect(arrow.startBinding?.fixedPoint?.[1]).toBeCloseTo(0.78);
expect(arrow.startBinding?.fixedPoint?.[1]).toBeCloseTo(0.79);
UI.resize([rectangle, arrow], "nw", [300, 350]);
expect(arrow.startBinding?.fixedPoint?.[0]).toBeCloseTo(0);