@@ -97,7 +97,7 @@ const mockUseRouter = vi.mocked(useRouter)
9797const mockPush = vi . fn ( )
9898const mockTrackCreateApp = vi . mocked ( trackCreateApp )
9999const mockGetRedirection = vi . mocked ( getRedirection )
100- const { mockToastSuccess , mockToastError } = toastMocks
100+ const { mockToastError } = toastMocks
101101
102102let appQuota = { size : 0 , limit : 1 }
103103
@@ -136,7 +136,7 @@ describe('CreateAppModal', () => {
136136 mockConsoleState . workspacePermissionKeys = [ 'app.create_and_management' ]
137137 } )
138138
139- it ( 'creates an app, notifies success, and fires callbacks' , async ( ) => {
139+ it ( 'creates an app and fires callbacks' , async ( ) => {
140140 const mockApp = createAppDetailFixture ( {
141141 mode : AppModeEnum . ADVANCED_CHAT ,
142142 maintainer : 'user-1' ,
@@ -163,7 +163,6 @@ describe('CreateAppModal', () => {
163163 source : 'studio_blank' ,
164164 appMode : AppModeEnum . ADVANCED_CHAT ,
165165 } )
166- expect ( mockToastSuccess ) . toHaveBeenCalledWith ( 'app.newApp.appCreated' )
167166 expect ( onClose ) . toHaveBeenCalledTimes ( 1 )
168167 await waitFor ( ( ) =>
169168 expect ( mockGetRedirection ) . toHaveBeenCalledWith ( mockApp , mockPush , {
@@ -419,7 +418,7 @@ describe('CreateAppModal', () => {
419418
420419 resolveCreate ?.( createAppDetailFixture ( { id : 'slow-app' , mode : AppModeEnum . ADVANCED_CHAT } ) )
421420 await waitFor ( ( ) => {
422- expect ( mockToastSuccess ) . toHaveBeenCalledWith ( 'app.newApp.appCreated' )
421+ expect ( mockGetRedirection ) . toHaveBeenCalledTimes ( 1 )
423422 } )
424423 } )
425424} )
0 commit comments