mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
parent
d21c6a1bc6
commit
c5d3bb0b6a
6 changed files with 77 additions and 38 deletions
|
@ -1,4 +1,5 @@
|
|||
import React from "react";
|
||||
import "../../utils/test-utils";
|
||||
import { render, fireEvent, act, unmountComponent } from "./test-utils";
|
||||
import { Excalidraw } from "../index";
|
||||
import * as StaticScene from "../renderer/staticScene";
|
||||
|
@ -121,10 +122,8 @@ describe("move element", () => {
|
|||
expect(h.state.selectedElementIds[rectB.id]).toBeTruthy();
|
||||
expect([rectA.x, rectA.y]).toEqual([0, 0]);
|
||||
expect([rectB.x, rectB.y]).toEqual([201, 2]);
|
||||
expect([Math.round(arrow.x), Math.round(arrow.y)]).toEqual([110, 50]);
|
||||
expect([Math.round(arrow.width), Math.round(arrow.height)]).toEqual([
|
||||
84, 84,
|
||||
]);
|
||||
expect([[arrow.x, arrow.y]]).toCloselyEqualPoints([[107.07, 47.07]]);
|
||||
expect([[arrow.width, arrow.height]]).toCloselyEqualPoints([[86.86, 87.3]]);
|
||||
|
||||
h.elements.forEach((element) => expect(element).toMatchSnapshot());
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue