Remove unused state and function in App component

This commit is contained in:
2026-04-11 12:01:20 +02:00
parent db8ef092a4
commit 1dddeaf0b8
5 changed files with 14 additions and 41 deletions

View File

@@ -727,7 +727,7 @@ describe("transform foundation integration", () => {
).toBeInTheDocument();
});
it("keeps the persisted viewport camera state stable across transform commit, cancel, and delete", async () => {
it("does not reapply the persisted viewport camera state across transform commit, cancel, and delete", async () => {
const { store, brush, viewportHost } = await renderTransformFixtureApp();
const persistedCameraState: ViewportPanelCameraState = {
target: {
@@ -780,12 +780,10 @@ describe("transform foundation integration", () => {
}
});
await waitFor(() => {
expect(viewportHost.setCameraState.mock.calls.length).toBeGreaterThan(
commitCameraCallCount
);
});
expect(viewportHost.setCameraState.mock.calls.at(-1)?.[0]).toEqual(
expect(viewportHost.setCameraState.mock.calls.length).toBe(
commitCameraCallCount
);
expect(store.getState().viewportPanels.topLeft.cameraState).toEqual(
persistedCameraState
);
@@ -801,12 +799,10 @@ describe("transform foundation integration", () => {
code: "Escape"
});
await waitFor(() => {
expect(viewportHost.setCameraState.mock.calls.length).toBeGreaterThan(
cancelCameraCallCount
);
});
expect(viewportHost.setCameraState.mock.calls.at(-1)?.[0]).toEqual(
expect(viewportHost.setCameraState.mock.calls.length).toBe(
cancelCameraCallCount
);
expect(store.getState().viewportPanels.topLeft.cameraState).toEqual(
persistedCameraState
);
@@ -818,12 +814,10 @@ describe("transform foundation integration", () => {
code: "Delete"
});
await waitFor(() => {
expect(viewportHost.setCameraState.mock.calls.length).toBeGreaterThan(
deleteCameraCallCount
);
});
expect(viewportHost.setCameraState.mock.calls.at(-1)?.[0]).toEqual(
expect(viewportHost.setCameraState.mock.calls.length).toBe(
deleteCameraCallCount
);
expect(store.getState().viewportPanels.topLeft.cameraState).toEqual(
persistedCameraState
);
});