diff --git a/web/app/components/rag-pipeline/components/update-dsl-modal.spec.tsx b/web/app/components/rag-pipeline/components/update-dsl-modal.spec.tsx index 3d2d05ce8f..edc13f1844 100644 --- a/web/app/components/rag-pipeline/components/update-dsl-modal.spec.tsx +++ b/web/app/components/rag-pipeline/components/update-dsl-modal.spec.tsx @@ -724,10 +724,10 @@ describe('UpdateDSLModal', () => { await Promise.resolve() }) + // Element should be visible immediately after advancing timers + expect(screen.getByText('newApp.appCreateDSLErrorTitle')).toBeInTheDocument() + vi.useRealTimers() - - // Wait for element to appear after advancing timers and flushing - await screen.findByText('newApp.appCreateDSLErrorTitle') }) it('should show version info in error modal', async () => { @@ -857,11 +857,11 @@ describe('UpdateDSLModal', () => { await Promise.resolve() }) + // Element should be visible immediately after advancing timers + expect(screen.getByText('newApp.appCreateDSLErrorTitle')).toBeInTheDocument() + vi.useRealTimers() - // Wait for element to appear after advancing timers and flushing - await screen.findByText('newApp.appCreateDSLErrorTitle') - // Click confirm button const confirmButton = screen.getByText('newApp.Confirm') @@ -1159,11 +1159,11 @@ describe('UpdateDSLModal', () => { await Promise.resolve() }) + // Element should be visible immediately after advancing timers + expect(screen.getByText('newApp.appCreateDSLErrorTitle')).toBeInTheDocument() + vi.useRealTimers() - // Wait for element to appear after advancing timers and flushing - await screen.findByText('newApp.appCreateDSLErrorTitle') - const confirmButton = screen.getByText('newApp.Confirm') await act(async () => {