Update tests

This commit is contained in:
Mark Tolmacs 2024-09-30 16:51:37 +02:00
parent 1d293b9203
commit 411deae176
No known key found for this signature in database
5 changed files with 15 additions and 15 deletions

View file

@ -179,7 +179,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s
"elementId": "diamond-1",
"fixedPoint": null,
"focus": 0,
"gap": 5.2311437434718675,
"gap": 4.545343408287929,
},
"strokeColor": "#e67700",
"strokeStyle": "solid",

View file

@ -295,7 +295,7 @@ History {
"focus": "0.00990",
"gap": 1,
},
"height": "0.98017",
"height": "1.37272",
"points": [
[
0,
@ -303,7 +303,7 @@ History {
],
[
98,
"-0.98017",
"-1.37272",
],
],
"startBinding": {
@ -320,15 +320,15 @@ History {
"focus": "-0.02000",
"gap": 1,
},
"height": "0.00169",
"height": "0.00473",
"points": [
[
0,
0,
],
[
98,
"0.00169",
"98.00000",
"0.00473",
],
],
"startBinding": {
@ -411,15 +411,15 @@ History {
"focus": "0.00990",
"gap": 1,
},
"height": "0.98161",
"height": "1.37680",
"points": [
[
0,
0,
],
[
98,
"-0.98161",
"98.00000",
"-1.37680",
],
],
"startBinding": {
@ -428,7 +428,7 @@ History {
"focus": "0.02970",
"gap": 1,
},
"y": "0.99245",
"y": "1.39313",
},
},
"id169" => Delta {

View file

@ -197,7 +197,7 @@ exports[`move element > rectangles with binding arrow 7`] = `
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": "81.47368",
"height": "77.29870",
"id": "id2",
"index": "a2",
"isDeleted": false,
@ -212,7 +212,7 @@ exports[`move element > rectangles with binding arrow 7`] = `
],
[
81,
"81.47368",
"77.29870",
],
],
"roughness": 1,

View file

@ -125,7 +125,7 @@ describe("move element", () => {
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([
81, 81,
81, 77,
]);
h.elements.forEach((element) => expect(element).toMatchSnapshot());

View file

@ -77,6 +77,6 @@ test("unselected bound arrows update when rotating their target elements", async
expect(textArrow.x).toEqual(360);
expect(textArrow.y).toEqual(300);
expect(textArrow.points[0]).toEqual([0, 0]);
expect(textArrow.points[1][0]).toBeCloseTo(-94, 0);
expect(textArrow.points[1][1]).toBeCloseTo(-116.1, 0);
expect(textArrow.points[1][0]).toBeCloseTo(-89, 0);
expect(textArrow.points[1][1]).toBeCloseTo(-120, 0);
});