@@ -5,6 +5,7 @@ import CommandBarSelectionMixedInput from '@src/components/CommandBar/CommandBar
55import type { CommandArgument } from '@src/lib/commandTypes'
66import { App } from '@src/lib/app'
77import { KclManager } from '@src/lang/KclManager'
8+ import { signal } from '@preact/signals-core'
89
910vi . mock ( `@rust/kcl-wasm-lib/pkg/kcl_wasm_lib` )
1011vi . mock ( '@src/lang/wasmUtils' , async ( ) => {
@@ -55,10 +56,11 @@ describe('CommandBarSelectionMixedInput', () => {
5556 describe ( 'clearSelectionFirst behavior' , ( ) => {
5657 it ( 'should send clear selection command when clearSelectionFirst is true' , async ( ) => {
5758 const app = App . getDefaultSystems ( )
58- const executingEditor = new KclManager ( {
59+ const executingEditor = new KclManager ( 'some-path' , {
5960 commandBar : app . commands . actor ,
6061 settings : app . settings . actor ,
6162 wasmInstancePromise : app . wasmPromise ,
63+ projectPath : signal ( 'some-project' ) ,
6264 } )
6365 const mockModelingSend = vi . spyOn (
6466 executingEditor . engineCommandManager ,
@@ -85,10 +87,11 @@ describe('CommandBarSelectionMixedInput', () => {
8587
8688 it ( 'should NOT send clear selection command when clearSelectionFirst is false' , async ( ) => {
8789 const app = App . getDefaultSystems ( )
88- const executingEditor = new KclManager ( {
90+ const executingEditor = new KclManager ( 'some-path' , {
8991 commandBar : app . commands . actor ,
9092 settings : app . settings . actor ,
9193 wasmInstancePromise : app . wasmPromise ,
94+ projectPath : signal ( 'some-project' ) ,
9295 } )
9396 const mockModelingSend = vi . spyOn (
9497 executingEditor . engineCommandManager ,
@@ -112,10 +115,11 @@ describe('CommandBarSelectionMixedInput', () => {
112115
113116 it ( 'should NOT send clear selection command when clearSelectionFirst is undefined' , async ( ) => {
114117 const app = App . getDefaultSystems ( )
115- const executingEditor = new KclManager ( {
118+ const executingEditor = new KclManager ( 'some-path' , {
116119 commandBar : app . commands . actor ,
117120 settings : app . settings . actor ,
118121 wasmInstancePromise : app . wasmPromise ,
122+ projectPath : signal ( 'some-project' ) ,
119123 } )
120124 const mockModelingSend = vi . spyOn (
121125 executingEditor . engineCommandManager ,
@@ -139,10 +143,11 @@ describe('CommandBarSelectionMixedInput', () => {
139143
140144 it ( 'should send clear selection command only once on mount' , async ( ) => {
141145 const app = App . getDefaultSystems ( )
142- const executingEditor = new KclManager ( {
146+ const executingEditor = new KclManager ( 'some-path' , {
143147 commandBar : app . commands . actor ,
144148 settings : app . settings . actor ,
145149 wasmInstancePromise : app . wasmPromise ,
150+ projectPath : signal ( 'some-project' ) ,
146151 } )
147152 const mockModelingSend = vi . spyOn (
148153 executingEditor . engineCommandManager ,
@@ -181,10 +186,11 @@ describe('CommandBarSelectionMixedInput', () => {
181186
182187 it ( 'should set hasClearedSelection state after clearing' , async ( ) => {
183188 const app = App . getDefaultSystems ( )
184- const executingEditor = new KclManager ( {
189+ const executingEditor = new KclManager ( 'some-path' , {
185190 commandBar : app . commands . actor ,
186191 settings : app . settings . actor ,
187192 wasmInstancePromise : app . wasmPromise ,
193+ projectPath : signal ( 'some-project' ) ,
188194 } )
189195 const mockModelingSend = vi . spyOn (
190196 executingEditor . engineCommandManager ,
0 commit comments