From 3c9aa9b52e3a9b5de825d0c69259610c7c206a72 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 12 May 2026 22:36:26 +0200 Subject: [PATCH] Add assertions to ensure no focus selection on viewport hosts in path inspector tests --- tests/unit/path-inspector.integration.test.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/unit/path-inspector.integration.test.tsx b/tests/unit/path-inspector.integration.test.tsx index 4fa90181..119ac278 100644 --- a/tests/unit/path-inspector.integration.test.tsx +++ b/tests/unit/path-inspector.integration.test.tsx @@ -118,6 +118,11 @@ describe("Path inspector", () => { }); expect(Object.keys(store.getState().document.paths)).toHaveLength(1); }); + expect( + viewportHostInstances.every( + (viewportHost) => viewportHost.focusSelection.mock.calls.length === 0 + ) + ).toBe(true); const createdPath = Object.values(store.getState().document.paths)[0]; @@ -159,5 +164,10 @@ describe("Path inspector", () => { z: 2 }); }); + expect( + viewportHostInstances.every( + (viewportHost) => viewportHost.focusSelection.mock.calls.length === 0 + ) + ).toBe(true); }); });