Fix tests

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs
2025-03-06 12:24:48 +01:00
parent 8c9666b8ab
commit 528e6aa2df
5 changed files with 59 additions and 58 deletions

View File

@@ -298,7 +298,7 @@ History {
"focus": "0.00990",
"gap": 5,
},
"height": "0.92900",
"height": "0.92929",
"points": [
[
0,
@@ -306,7 +306,7 @@ History {
],
[
"92.92893",
"-0.92900",
"-0.92929",
],
],
"startBinding": {
@@ -319,10 +319,10 @@ History {
"inserted": {
"endBinding": {
"elementId": "id171",
"focus": "-0.02052",
"focus": "-0.02075",
"gap": 5,
},
"height": "0.04625",
"height": "0.07074",
"points": [
[
0,
@@ -330,12 +330,12 @@ History {
],
[
"92.92893",
"0.04625",
"0.07074",
],
],
"startBinding": {
"elementId": "id170",
"focus": "0.01841",
"focus": "0.01770",
"gap": 5,
},
"width": "92.92893",
@@ -414,7 +414,7 @@ History {
"focus": "0.00990",
"gap": 5,
},
"height": "0.92678",
"height": "0.92929",
"points": [
[
0,
@@ -422,7 +422,7 @@ History {
],
[
"92.92893",
"-0.92678",
"-0.92929",
],
],
"startBinding": {
@@ -432,7 +432,7 @@ History {
},
"width": "92.92893",
"x": "3.53553",
"y": "0.96071",
"y": "0.96033",
},
},
"id175" => Delta {
@@ -873,11 +873,11 @@ History {
0,
],
[
90,
"85.85786",
0,
],
],
"width": 90,
"width": "85.85786",
},
},
},
@@ -1253,7 +1253,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": "2.98409",
"height": "1.71911",
"id": "id178",
"index": "Zz",
"isDeleted": false,
@@ -1268,7 +1268,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
],
[
"92.92893",
"-2.98409",
"1.71911",
],
],
"roughness": 1,
@@ -1293,7 +1293,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"version": 11,
"width": "92.92893",
"x": "3.53553",
"y": "4.70319",
"y": 0,
}
`;
@@ -1625,7 +1625,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": "2.98409",
"height": "1.71911",
"id": "id181",
"index": "a0",
"isDeleted": false,
@@ -1640,7 +1640,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
],
[
"92.92893",
"-2.98409",
"1.71911",
],
],
"roughness": 1,
@@ -1665,7 +1665,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"version": 11,
"width": "92.92893",
"x": "3.53553",
"y": "4.70319",
"y": 0,
}
`;
@@ -1783,7 +1783,7 @@ History {
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": "22.46459",
"height": "12.86717",
"index": "a0",
"isDeleted": false,
"lastCommittedPoint": null,
@@ -1796,8 +1796,8 @@ History {
0,
],
[
"93.46683",
"-22.46459",
"92.92893",
"12.86717",
],
],
"roughness": 1,
@@ -1818,9 +1818,9 @@ History {
"strokeStyle": "solid",
"strokeWidth": 2,
"type": "arrow",
"width": "93.46683",
"x": "2.99764",
"y": "35.33176",
"width": "92.92893",
"x": "3.53553",
"y": 0,
},
"inserted": {
"isDeleted": true,
@@ -2338,7 +2338,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": "408.02337",
"height": "369.21589",
"id": "id186",
"index": "a2",
"isDeleted": false,
@@ -2352,8 +2352,8 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
0,
],
[
"495.48945",
"-408.02337",
"496.84035",
"-369.21589",
],
],
"roughness": 1,
@@ -2372,9 +2372,9 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"type": "arrow",
"updated": 1,
"version": 10,
"width": "495.48945",
"x": "3.53553",
"y": 0,
"width": "496.84035",
"x": "2.18463",
"y": "-38.80748",
}
`;

View File

@@ -196,7 +196,7 @@ exports[`move element > rectangles with binding arrow 7`] = `
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": "87.97595",
"height": "94.40997",
"id": "id2",
"index": "a2",
"isDeleted": false,
@@ -210,8 +210,8 @@ exports[`move element > rectangles with binding arrow 7`] = `
0,
],
[
"87.46447",
"87.97595",
"93.92893",
"94.40997",
],
],
"roughness": 1,
@@ -232,8 +232,8 @@ exports[`move element > rectangles with binding arrow 7`] = `
"updated": 1,
"version": 11,
"versionNonce": 1051383431,
"width": "87.46447",
"x": 110,
"y": 50,
"width": "93.92893",
"x": "103.53553",
"y": "43.53553",
}
`;

View File

@@ -128,8 +128,10 @@ 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([[arrow.x, arrow.y]]).toCloselyEqualPoints([[107.07, 47.07]]);
expect([[arrow.width, arrow.height]]).toCloselyEqualPoints([[86.86, 87.3]]);
expect([[arrow.x, arrow.y]]).toCloselyEqualPoints([[103.54, 43.53]]);
expect([[arrow.width, arrow.height]]).toCloselyEqualPoints([
[93.93, 94.41],
]);
h.elements.forEach((element) => expect(element).toMatchSnapshot());
});