diff --git a/web/app/components/base/chat/chat/answer/human-input-content/__tests__/submitted.spec.tsx b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/submitted.spec.tsx index 24960c0837..8bd42c8dfd 100644 --- a/web/app/components/base/chat/chat/answer/human-input-content/__tests__/submitted.spec.tsx +++ b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/submitted.spec.tsx @@ -44,4 +44,18 @@ describe('SubmittedHumanInputContent Integration', () => { expect(screen.getByTestId('submitted-field-answer')).toHaveTextContent('approved') expect(screen.queryByTestId('submitted-content')).not.toBeInTheDocument() }) + + it('should fallback to rendered markdown when structured form data is empty', () => { + render( + , + ) + + expect(screen.getByTestId('submitted-content')).toBeInTheDocument() + expect(screen.getByTestId('mock-markdown')).toHaveTextContent('Rendered **Markdown** content') + expect(screen.queryByTestId('submitted-field-values')).not.toBeInTheDocument() + }) })