mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix library dnd (#2314)
This commit is contained in:
parent
8a50916ef2
commit
ba3f548b91
16 changed files with 261 additions and 168 deletions
|
@ -28,12 +28,20 @@ describe("appState", () => {
|
|||
expect(h.state.viewBackgroundColor).toBe("#F00");
|
||||
});
|
||||
|
||||
API.dropFile({
|
||||
appState: {
|
||||
viewBackgroundColor: "#000",
|
||||
},
|
||||
elements: [API.createElement({ type: "rectangle", id: "A" })],
|
||||
});
|
||||
API.drop(
|
||||
new Blob(
|
||||
[
|
||||
JSON.stringify({
|
||||
type: "excalidraw",
|
||||
appState: {
|
||||
viewBackgroundColor: "#000",
|
||||
},
|
||||
elements: [API.createElement({ type: "rectangle", id: "A" })],
|
||||
}),
|
||||
],
|
||||
{ type: "application/json" },
|
||||
),
|
||||
);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(h.elements).toEqual([expect.objectContaining({ id: "A" })]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue