@@ -18,6 +18,7 @@ const mocks = vi.hoisted(() => ({
1818 normalizeState : vi . fn ( ) ,
1919 sandboxAccess : vi . fn ( ) ,
2020 blockVisibility : vi . fn ( ) ,
21+ customBlocks : vi . fn ( ) ,
2122 permissionConfig : vi . fn ( ) ,
2223 preValidate : vi . fn ( ) ,
2324 collectReferences : vi . fn ( ) ,
@@ -46,6 +47,9 @@ vi.mock('@sim/platform-authz/workspace', () => ({
4647vi . mock ( '@/lib/workflows/application/context' , ( ) => ( {
4748 resolveActiveWorkflowApplicationContext : mocks . resolveContext ,
4849} ) )
50+ vi . mock ( '@/lib/workflows/custom-blocks/operations' , ( ) => ( {
51+ listCustomBlocksWithInputsForWorkspace : mocks . customBlocks ,
52+ } ) )
4953vi . mock ( '@/lib/realtime/notify' , ( ) => ( { notifyWorkflowUpdated : mocks . notify } ) )
5054vi . mock ( '@/lib/workflows/persistence/replace-normalized-state' , ( ) => ( {
5155 replaceWorkflowNormalizedState : mocks . replace ,
@@ -179,6 +183,7 @@ const EMPTY_GRAPH_LINT = {
179183describe ( 'applyWorkflowOperations' , ( ) => {
180184 beforeEach ( ( ) => {
181185 vi . clearAllMocks ( )
186+ mocks . customBlocks . mockResolvedValue ( [ ] )
182187 mocks . resolveContext . mockResolvedValue ( context )
183188 mocks . resolvePermission . mockResolvedValue ( 'write' )
184189 workflowAuthzMockFns . mockAssertWorkflowMutable . mockResolvedValue ( undefined )
@@ -542,6 +547,7 @@ describe('applyWorkflowOperations', () => {
542547 expect ( mocks . applyOperations ) . toHaveBeenCalledWith ( baseGraph , operations , null , true )
543548
544549 vi . clearAllMocks ( )
550+ mocks . customBlocks . mockResolvedValue ( [ ] )
545551 mocks . resolveContext . mockResolvedValue ( context )
546552 mocks . resolvePermission . mockResolvedValue ( 'write' )
547553 mocks . sandboxAccess . mockResolvedValue ( true )
0 commit comments