mirror of
https://github.com/langgenius/dify.git
synced 2026-05-10 05:56:31 +08:00
Test human input submitted markdown fallback
This commit is contained in:
parent
ccb43eb856
commit
75e5429534
@ -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(
|
||||
<SubmittedHumanInputContent formData={{
|
||||
...mockFormData,
|
||||
form_data: {},
|
||||
}}
|
||||
/>,
|
||||
)
|
||||
|
||||
expect(screen.getByTestId('submitted-content')).toBeInTheDocument()
|
||||
expect(screen.getByTestId('mock-markdown')).toHaveTextContent('Rendered **Markdown** content')
|
||||
expect(screen.queryByTestId('submitted-field-values')).not.toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user