feat(tools): add brush raster painting
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
documentSetLayerClippingMaskCommand,
|
||||
documentSetLayerLockedCommand,
|
||||
documentSetLayerVisibleCommand,
|
||||
documentUpdateAssetSourceCommand,
|
||||
documentUngroupLayerCommand,
|
||||
} from "./document";
|
||||
|
||||
@@ -52,6 +53,17 @@ describe("document commands", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
test("updates asset sources", () => {
|
||||
const state = documentAddAssetCommand.execute(
|
||||
{ state: createInitialAppState("Test") },
|
||||
{ asset: { id: "asset-1", name: "Image", mimeType: "image/png", source: "old", intrinsicSize: { w: 100, h: 50 } } },
|
||||
);
|
||||
|
||||
const next = documentUpdateAssetSourceCommand.execute({ state }, { assetId: "asset-1", source: "new" });
|
||||
|
||||
expect(next.document.assets[0]?.source).toBe("new");
|
||||
});
|
||||
|
||||
test("adds image layers to artboards", () => {
|
||||
const state = documentAddArtboardCommand.execute(
|
||||
{ state: createInitialAppState("Test") },
|
||||
|
||||
Reference in New Issue
Block a user