Skip to content

Commit

Permalink
Test mouseDrag
Browse files Browse the repository at this point in the history
  • Loading branch information
mbraak committed Dec 14, 2024
1 parent a66c9da commit dc1c977
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/test/dragAndDropHandler/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,17 @@ describe(".mouseDrag", () => {
// mouse start
dragAndDropHandler.mouseDrag({
originalEvent: new Event("mousemove"),
pageX: 10,
pageX: 15,
pageY: 30,
target: node2.element as HTMLElement,
});

const dragElement = document.querySelector(".jqtree-dragging");
expect(dragElement).toHaveStyle({ left: "10px", top: "30px" });
expect(dragElement).toHaveStyle({
left: "5px",
position: "absolute",
top: "20px",
});
});
});

Expand Down

0 comments on commit dc1c977

Please sign in to comment.