mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Update tests
This commit is contained in:
parent
1d293b9203
commit
411deae176
5 changed files with 15 additions and 15 deletions
|
@ -179,7 +179,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s
|
||||||
"elementId": "diamond-1",
|
"elementId": "diamond-1",
|
||||||
"fixedPoint": null,
|
"fixedPoint": null,
|
||||||
"focus": 0,
|
"focus": 0,
|
||||||
"gap": 5.2311437434718675,
|
"gap": 4.545343408287929,
|
||||||
},
|
},
|
||||||
"strokeColor": "#e67700",
|
"strokeColor": "#e67700",
|
||||||
"strokeStyle": "solid",
|
"strokeStyle": "solid",
|
||||||
|
|
|
@ -295,7 +295,7 @@ History {
|
||||||
"focus": "0.00990",
|
"focus": "0.00990",
|
||||||
"gap": 1,
|
"gap": 1,
|
||||||
},
|
},
|
||||||
"height": "0.98017",
|
"height": "1.37272",
|
||||||
"points": [
|
"points": [
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
|
@ -303,7 +303,7 @@ History {
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
98,
|
98,
|
||||||
"-0.98017",
|
"-1.37272",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
"startBinding": {
|
"startBinding": {
|
||||||
|
@ -320,15 +320,15 @@ History {
|
||||||
"focus": "-0.02000",
|
"focus": "-0.02000",
|
||||||
"gap": 1,
|
"gap": 1,
|
||||||
},
|
},
|
||||||
"height": "0.00169",
|
"height": "0.00473",
|
||||||
"points": [
|
"points": [
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
98,
|
"98.00000",
|
||||||
"0.00169",
|
"0.00473",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
"startBinding": {
|
"startBinding": {
|
||||||
|
@ -411,15 +411,15 @@ History {
|
||||||
"focus": "0.00990",
|
"focus": "0.00990",
|
||||||
"gap": 1,
|
"gap": 1,
|
||||||
},
|
},
|
||||||
"height": "0.98161",
|
"height": "1.37680",
|
||||||
"points": [
|
"points": [
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
98,
|
"98.00000",
|
||||||
"-0.98161",
|
"-1.37680",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
"startBinding": {
|
"startBinding": {
|
||||||
|
@ -428,7 +428,7 @@ History {
|
||||||
"focus": "0.02970",
|
"focus": "0.02970",
|
||||||
"gap": 1,
|
"gap": 1,
|
||||||
},
|
},
|
||||||
"y": "0.99245",
|
"y": "1.39313",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"id169" => Delta {
|
"id169" => Delta {
|
||||||
|
|
|
@ -197,7 +197,7 @@ exports[`move element > rectangles with binding arrow 7`] = `
|
||||||
"fillStyle": "solid",
|
"fillStyle": "solid",
|
||||||
"frameId": null,
|
"frameId": null,
|
||||||
"groupIds": [],
|
"groupIds": [],
|
||||||
"height": "81.47368",
|
"height": "77.29870",
|
||||||
"id": "id2",
|
"id": "id2",
|
||||||
"index": "a2",
|
"index": "a2",
|
||||||
"isDeleted": false,
|
"isDeleted": false,
|
||||||
|
@ -212,7 +212,7 @@ exports[`move element > rectangles with binding arrow 7`] = `
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
81,
|
81,
|
||||||
"81.47368",
|
"77.29870",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
"roughness": 1,
|
"roughness": 1,
|
||||||
|
|
|
@ -125,7 +125,7 @@ describe("move element", () => {
|
||||||
expect([rectB.x, rectB.y]).toEqual([201, 2]);
|
expect([rectB.x, rectB.y]).toEqual([201, 2]);
|
||||||
expect([Math.round(arrow.x), Math.round(arrow.y)]).toEqual([110, 50]);
|
expect([Math.round(arrow.x), Math.round(arrow.y)]).toEqual([110, 50]);
|
||||||
expect([Math.round(arrow.width), Math.round(arrow.height)]).toEqual([
|
expect([Math.round(arrow.width), Math.round(arrow.height)]).toEqual([
|
||||||
81, 81,
|
81, 77,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
h.elements.forEach((element) => expect(element).toMatchSnapshot());
|
h.elements.forEach((element) => expect(element).toMatchSnapshot());
|
||||||
|
|
|
@ -77,6 +77,6 @@ test("unselected bound arrows update when rotating their target elements", async
|
||||||
expect(textArrow.x).toEqual(360);
|
expect(textArrow.x).toEqual(360);
|
||||||
expect(textArrow.y).toEqual(300);
|
expect(textArrow.y).toEqual(300);
|
||||||
expect(textArrow.points[0]).toEqual([0, 0]);
|
expect(textArrow.points[0]).toEqual([0, 0]);
|
||||||
expect(textArrow.points[1][0]).toBeCloseTo(-94, 0);
|
expect(textArrow.points[1][0]).toBeCloseTo(-89, 0);
|
||||||
expect(textArrow.points[1][1]).toBeCloseTo(-116.1, 0);
|
expect(textArrow.points[1][1]).toBeCloseTo(-120, 0);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue