mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: copy bound text style when copying element having bound text (#5305)
* fix: copy bound text style when copying element having bound text * fix * fix tests
This commit is contained in:
parent
6196fba286
commit
84b47a2ed5
3 changed files with 51 additions and 21 deletions
|
@ -289,7 +289,7 @@ describe("contextMenu element", () => {
|
|||
expect(copiedStyles).toBe("{}");
|
||||
fireEvent.click(queryByText(contextMenu as HTMLElement, "Copy styles")!);
|
||||
expect(copiedStyles).not.toBe("{}");
|
||||
const element = JSON.parse(copiedStyles);
|
||||
const element = JSON.parse(copiedStyles)[0];
|
||||
expect(element).toEqual(API.getSelectedElement());
|
||||
});
|
||||
|
||||
|
@ -329,7 +329,7 @@ describe("contextMenu element", () => {
|
|||
});
|
||||
let contextMenu = UI.queryContextMenu();
|
||||
fireEvent.click(queryByText(contextMenu as HTMLElement, "Copy styles")!);
|
||||
const secondRect = JSON.parse(copiedStyles);
|
||||
const secondRect = JSON.parse(copiedStyles)[0];
|
||||
expect(secondRect.id).toBe(h.elements[1].id);
|
||||
|
||||
mouse.reset();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue