@@ -38,7 +38,7 @@ vi.mock('../hooks/use-cookbook', () => ({
3838 useCookbook : ( ) => mockUseCookbook ( ) ,
3939} ) )
4040
41- const mockUsePatternFiles = vi . fn < ( ) => { starlarkFiles : Array < { name : string ; content : string } > ; manifestContent : string | null ; hasSagas : boolean ; isLoading : false } > ( )
41+ const mockUsePatternFiles = vi . fn < ( ) => { starlarkFiles : Array < { name : string ; content : string } > ; manifestContent : string | null ; manifestSagas : Array < { name : string ; trigger ?: string ; filter ?: string } > ; hasSagas : boolean ; isLoading : false } > ( )
4242vi . mock ( '../hooks/use-pattern-files' , ( ) => ( {
4343 usePatternFiles : ( ) => mockUsePatternFiles ( ) ,
4444} ) )
@@ -82,7 +82,7 @@ describe('CookbookDetailPage', () => {
8282 beforeEach ( ( ) => {
8383 vi . clearAllMocks ( )
8484 mockUseCookbook . mockReturnValue ( { items : [ patternItem , uiItem ] , isLoading : false } )
85- mockUsePatternFiles . mockReturnValue ( { starlarkFiles : [ ] , manifestContent : null , hasSagas : false , isLoading : false as const } )
85+ mockUsePatternFiles . mockReturnValue ( { starlarkFiles : [ ] , manifestContent : null , manifestSagas : [ ] , hasSagas : false , isLoading : false as const } )
8686 } )
8787
8888 it ( 'shows loading skeleton while catalogue is loading' , ( ) => {
@@ -141,6 +141,7 @@ describe('CookbookDetailPage', () => {
141141 mockUsePatternFiles . mockReturnValue ( {
142142 starlarkFiles : [ { name : 'saga.star' , content : 'def execute(): pass' } ] ,
143143 manifestContent : 'name: test' ,
144+ manifestSagas : [ ] ,
144145 hasSagas : true ,
145146 isLoading : false as const ,
146147 } )
@@ -177,6 +178,7 @@ describe('CookbookDetailPage', () => {
177178 mockUsePatternFiles . mockReturnValue ( {
178179 starlarkFiles : [ ] ,
179180 manifestContent : 'name: test\ntype: registry:pattern' ,
181+ manifestSagas : [ ] ,
180182 hasSagas : false ,
181183 isLoading : false as const ,
182184 } )
0 commit comments