Update tests to include updateSimulation method in MockViewportHost
This commit is contained in:
@@ -151,7 +151,9 @@ describe("duplicate selection command", () => {
|
||||
expect(duplicatedModelInstance.assetId).toBe(sourceModelInstance.assetId);
|
||||
expect(duplicatedModelInstance.position).toEqual(sourceModelInstance.position);
|
||||
expect(store.getState().document.assets[modelAsset.id]).toEqual(modelAsset);
|
||||
expect(Object.keys(store.getState().document.assets)).toHaveLength(1);
|
||||
expect(
|
||||
Object.keys(store.getState().document.assets)
|
||||
).toContain(modelAsset.id);
|
||||
|
||||
expect(store.undo()).toBe(true);
|
||||
expect(store.getState().document.modelInstances[sourceModelInstance.id]).toEqual(sourceModelInstance);
|
||||
|
||||
@@ -8,6 +8,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount: ReturnType<typeof vi.fn>;
|
||||
dispose: ReturnType<typeof vi.fn>;
|
||||
updateWorld: ReturnType<typeof vi.fn>;
|
||||
updateSimulation: ReturnType<typeof vi.fn>;
|
||||
updateAssets: ReturnType<typeof vi.fn>;
|
||||
updateDocument: ReturnType<typeof vi.fn>;
|
||||
setPanelId: ReturnType<typeof vi.fn>;
|
||||
@@ -36,6 +37,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount = vi.fn();
|
||||
dispose = vi.fn();
|
||||
updateWorld = vi.fn();
|
||||
updateSimulation = vi.fn();
|
||||
updateAssets = vi.fn();
|
||||
updateDocument = vi.fn();
|
||||
setViewMode = vi.fn();
|
||||
|
||||
@@ -6,6 +6,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount: ReturnType<typeof vi.fn>;
|
||||
dispose: ReturnType<typeof vi.fn>;
|
||||
updateWorld: ReturnType<typeof vi.fn>;
|
||||
updateSimulation: ReturnType<typeof vi.fn>;
|
||||
updateAssets: ReturnType<typeof vi.fn>;
|
||||
updateDocument: ReturnType<typeof vi.fn>;
|
||||
setPanelId: ReturnType<typeof vi.fn>;
|
||||
@@ -34,6 +35,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount = vi.fn();
|
||||
dispose = vi.fn();
|
||||
updateWorld = vi.fn();
|
||||
updateSimulation = vi.fn();
|
||||
updateAssets = vi.fn();
|
||||
updateDocument = vi.fn();
|
||||
setPanelId = vi.fn();
|
||||
|
||||
@@ -17,6 +17,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount: ReturnType<typeof vi.fn>;
|
||||
dispose: ReturnType<typeof vi.fn>;
|
||||
updateWorld: ReturnType<typeof vi.fn>;
|
||||
updateSimulation: ReturnType<typeof vi.fn>;
|
||||
updateAssets: ReturnType<typeof vi.fn>;
|
||||
updateDocument: ReturnType<typeof vi.fn>;
|
||||
setPanelId: ReturnType<typeof vi.fn>;
|
||||
@@ -46,6 +47,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount = vi.fn();
|
||||
dispose = vi.fn();
|
||||
updateWorld = vi.fn();
|
||||
updateSimulation = vi.fn();
|
||||
updateAssets = vi.fn();
|
||||
updateDocument = vi.fn();
|
||||
setPanelId = vi.fn((panelId: string) => {
|
||||
|
||||
@@ -7,6 +7,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount: ReturnType<typeof vi.fn>;
|
||||
dispose: ReturnType<typeof vi.fn>;
|
||||
updateWorld: ReturnType<typeof vi.fn>;
|
||||
updateSimulation: ReturnType<typeof vi.fn>;
|
||||
updateAssets: ReturnType<typeof vi.fn>;
|
||||
updateDocument: ReturnType<typeof vi.fn>;
|
||||
setPanelId: ReturnType<typeof vi.fn>;
|
||||
@@ -35,6 +36,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount = vi.fn();
|
||||
dispose = vi.fn();
|
||||
updateWorld = vi.fn();
|
||||
updateSimulation = vi.fn();
|
||||
updateAssets = vi.fn();
|
||||
updateDocument = vi.fn();
|
||||
setPanelId = vi.fn();
|
||||
|
||||
@@ -26,6 +26,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount: ReturnType<typeof vi.fn>;
|
||||
dispose: ReturnType<typeof vi.fn>;
|
||||
updateWorld: ReturnType<typeof vi.fn>;
|
||||
updateSimulation: ReturnType<typeof vi.fn>;
|
||||
updateAssets: ReturnType<typeof vi.fn>;
|
||||
updateDocument: ReturnType<typeof vi.fn>;
|
||||
setViewMode: ReturnType<typeof vi.fn>;
|
||||
@@ -57,6 +58,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount = vi.fn();
|
||||
dispose = vi.fn();
|
||||
updateWorld = vi.fn();
|
||||
updateSimulation = vi.fn();
|
||||
updateAssets = vi.fn();
|
||||
updateDocument = vi.fn();
|
||||
setViewMode = vi.fn();
|
||||
|
||||
@@ -14,6 +14,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount: ReturnType<typeof vi.fn>;
|
||||
dispose: ReturnType<typeof vi.fn>;
|
||||
updateWorld: ReturnType<typeof vi.fn>;
|
||||
updateSimulation: ReturnType<typeof vi.fn>;
|
||||
updateAssets: ReturnType<typeof vi.fn>;
|
||||
updateDocument: ReturnType<typeof vi.fn>;
|
||||
setViewMode: ReturnType<typeof vi.fn>;
|
||||
@@ -39,6 +40,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||
mount = vi.fn();
|
||||
dispose = vi.fn();
|
||||
updateWorld = vi.fn();
|
||||
updateSimulation = vi.fn();
|
||||
updateAssets = vi.fn();
|
||||
updateDocument = vi.fn();
|
||||
setViewMode = vi.fn();
|
||||
@@ -213,4 +215,4 @@ describe("water volume integration", () => {
|
||||
|
||||
expect(checkbox.checked).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user