FIx tests

This commit is contained in:
Mark Tolmacs 2025-03-02 16:32:29 +01:00
parent 63d53fc242
commit 5c1fc2f4fb
3 changed files with 45 additions and 32 deletions

View file

@ -78,8 +78,8 @@ describe("elbow arrow segment move", () => {
expect(arrow.points).toCloselyEqualPoints([
[0, 0],
[110, 0],
[110, 195.01],
[190, 195.01],
[110, 200],
[190, 200],
]);
mouse.reset();
@ -89,8 +89,8 @@ describe("elbow arrow segment move", () => {
expect(arrow.points).toCloselyEqualPoints([
[0, 0],
[110, 0],
[110, 195.01],
[190, 195.01],
[110, 200],
[190, 200],
]);
});
@ -201,8 +201,8 @@ describe("elbow arrow routing", () => {
expect(arrow.points).toCloselyEqualPoints([
[0, 0],
[45, 0],
[45, 199.07],
[90.07, 199.07],
[45, 206.55],
[90, 206.55],
]);
});
});
@ -255,8 +255,8 @@ describe("elbow arrow ui", () => {
expect(arrow.points).toCloselyEqualPoints([
[0, 0],
[45, 0],
[45, 195.01],
[90, 195.01],
[45, 200],
[90, 200],
]);
});
@ -293,11 +293,12 @@ describe("elbow arrow ui", () => {
".drag-input",
) as HTMLInputElement;
UI.updateInput(inputAngle, String("40"));
console.log(JSON.stringify(h.elements))
expect(arrow.points.map((point) => point.map(Math.round))).toEqual([
[0, 0],
[109, 0],
[109, 152],
[35, 0],
[35, 183],
[96, 183],
]);
});