Update tests to include initialGeometry for brushes
This commit is contained in:
@@ -4,6 +4,7 @@ import { createEditorStore } from "../../src/app/editor-store";
|
||||
import { createCreateBoxBrushCommand } from "../../src/commands/create-box-brush-command";
|
||||
import { createSetSceneNameCommand } from "../../src/commands/set-scene-name-command";
|
||||
import { createTransformSession } from "../../src/core/transform-session";
|
||||
import { createBoxBrush } from "../../src/document/brushes";
|
||||
import { createEmptySceneDocument } from "../../src/document/scene-document";
|
||||
import type { KeyValueStorage } from "../../src/serialization/local-draft-storage";
|
||||
|
||||
@@ -359,7 +360,14 @@ describe("EditorStore", () => {
|
||||
x: 2,
|
||||
y: 2,
|
||||
z: 2
|
||||
}
|
||||
},
|
||||
initialGeometry: createBoxBrush({
|
||||
size: {
|
||||
x: 2,
|
||||
y: 2,
|
||||
z: 2
|
||||
}
|
||||
}).geometry
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
@@ -281,7 +281,8 @@ describe("transform session commit commands", () => {
|
||||
},
|
||||
size: {
|
||||
...brush.size
|
||||
}
|
||||
},
|
||||
geometry: target.initialGeometry
|
||||
};
|
||||
|
||||
store.executeCommand(createCommitTransformSessionCommand(store.getState().document, rotateSession));
|
||||
@@ -322,7 +323,8 @@ describe("transform session commit commands", () => {
|
||||
x: 3.25,
|
||||
y: 1.75,
|
||||
z: 5.5
|
||||
}
|
||||
},
|
||||
geometry: scaleTarget.initialGeometry
|
||||
};
|
||||
|
||||
store.executeCommand(createCommitTransformSessionCommand(store.getState().document, scaleSession));
|
||||
@@ -412,7 +414,8 @@ describe("transform session commit commands", () => {
|
||||
kind: "brush",
|
||||
center: { x: 0.5, y: 1, z: 0 },
|
||||
rotationDegrees: { x: 0, y: 0, z: 0 },
|
||||
size: { x: 3, y: 2, z: 2 }
|
||||
size: { x: 3, y: 2, z: 2 },
|
||||
geometry: createBoxBrush({ size: { x: 3, y: 2, z: 2 } }).geometry
|
||||
};
|
||||
|
||||
store.executeCommand(createCommitTransformSessionCommand(store.getState().document, session));
|
||||
@@ -476,7 +479,8 @@ describe("transform session commit commands", () => {
|
||||
kind: "brush",
|
||||
center: { x: 0.5, y: 1.5, z: 0.5 },
|
||||
rotationDegrees: { x: 0, y: 0, z: 0 },
|
||||
size: { x: 3, y: 3, z: 3 }
|
||||
size: { x: 3, y: 3, z: 3 },
|
||||
geometry: createBoxBrush({ size: { x: 3, y: 3, z: 3 } }).geometry
|
||||
};
|
||||
|
||||
store.executeCommand(createCommitTransformSessionCommand(store.getState().document, session));
|
||||
|
||||
@@ -303,7 +303,8 @@ describe("transform foundation integration", () => {
|
||||
},
|
||||
size: {
|
||||
...brush.size
|
||||
}
|
||||
},
|
||||
geometry: createBoxBrush({ size: brush.size }).geometry
|
||||
}
|
||||
};
|
||||
|
||||
@@ -343,7 +344,8 @@ describe("transform foundation integration", () => {
|
||||
},
|
||||
size: {
|
||||
...brush.size
|
||||
}
|
||||
},
|
||||
geometry: createBoxBrush({ size: brush.size }).geometry
|
||||
}
|
||||
};
|
||||
|
||||
@@ -374,7 +376,14 @@ describe("transform foundation integration", () => {
|
||||
x: 3.5,
|
||||
y: 2.5,
|
||||
z: 4.5
|
||||
}
|
||||
},
|
||||
geometry: createBoxBrush({
|
||||
size: {
|
||||
x: 3.5,
|
||||
y: 2.5,
|
||||
z: 4.5
|
||||
}
|
||||
}).geometry
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user