mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix tests
This commit is contained in:
parent
35c4c074d7
commit
126c7caabc
4 changed files with 7 additions and 11 deletions
|
@ -254,11 +254,11 @@ describe("actionDuplicateSelection", () => {
|
|||
act(() => {
|
||||
h.app.actionManager.executeAction(actionDuplicateSelection);
|
||||
});
|
||||
|
||||
console.log(h.elements, h.state.selectedElementIds);
|
||||
assertElements(h.elements, [
|
||||
{ id: frame.id },
|
||||
{ id: text.id, frameId: frame.id },
|
||||
{ [ORIG_ID]: text.id, frameId: frame.id },
|
||||
{ [ORIG_ID]: text.id, frameId: frame.id, selected: true },
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ describe("duplicating multiple elements", () => {
|
|||
|
||||
const arrow3 = API.createElement({
|
||||
type: "arrow",
|
||||
id: "arrow2",
|
||||
id: "arrow3",
|
||||
startBinding: {
|
||||
elementId: "rectangle-not-exists",
|
||||
focus: 0.2,
|
||||
|
@ -306,6 +306,7 @@ describe("duplicating multiple elements", () => {
|
|||
const { newElements: clonedElements } = duplicateElements(
|
||||
origElements,
|
||||
) as any as { newElements: typeof origElements };
|
||||
|
||||
const [
|
||||
clonedRectangle,
|
||||
clonedText1,
|
||||
|
@ -325,7 +326,6 @@ describe("duplicating multiple elements", () => {
|
|||
elementId: clonedRectangle.id,
|
||||
});
|
||||
expect(clonedArrow2.endBinding).toBe(null);
|
||||
console.log(clonedArrow3);
|
||||
expect(clonedArrow3.startBinding).toBe(null);
|
||||
expect(clonedArrow3.endBinding).toEqual({
|
||||
...arrow3.endBinding,
|
||||
|
|
|
@ -1185,9 +1185,7 @@ exports[`contextMenu element > selecting 'Add to library' in context menu adds e
|
|||
},
|
||||
"suggestedBindings": [],
|
||||
"theme": "light",
|
||||
"toast": {
|
||||
"message": "Added to library",
|
||||
},
|
||||
"toast": null,
|
||||
"userToFollow": null,
|
||||
"viewBackgroundColor": "#ffffff",
|
||||
"viewModeEnabled": false,
|
||||
|
|
|
@ -924,12 +924,11 @@ History {
|
|||
],
|
||||
],
|
||||
"startBinding": null,
|
||||
"y": 0,
|
||||
},
|
||||
"inserted": {
|
||||
"endBinding": {
|
||||
"elementId": "id166",
|
||||
"focus": "0.00000",
|
||||
"focus": -0,
|
||||
"gap": 1,
|
||||
},
|
||||
"points": [
|
||||
|
@ -944,10 +943,9 @@ History {
|
|||
],
|
||||
"startBinding": {
|
||||
"elementId": "id165",
|
||||
"focus": "-0.00000",
|
||||
"focus": 0,
|
||||
"gap": 1,
|
||||
},
|
||||
"y": "0.00000",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue