mirror of
https://github.com/langgenius/dify.git
synced 2026-05-09 21:28:25 +08:00
Lock paragraph prepopulate behavior
This commit is contained in:
parent
71803d7c76
commit
022d73d0ed
@ -324,4 +324,26 @@ describe('InputField', () => {
|
||||
})
|
||||
expect(screen.queryByText(/workflow\.nodes\.humanInput\.insertInputField\.prePopulateField/i)).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('should keep paragraph pre-populate editor available after switching back to paragraph', async () => {
|
||||
const user = userEvent.setup()
|
||||
|
||||
render(
|
||||
<InputField
|
||||
nodeId="node-8"
|
||||
isEdit={false}
|
||||
payload={createPayload()}
|
||||
onChange={vi.fn()}
|
||||
onCancel={vi.fn()}
|
||||
/>,
|
||||
)
|
||||
|
||||
expect(screen.getByText(/workflow\.nodes\.humanInput\.insertInputField\.prePopulateField/i)).toBeInTheDocument()
|
||||
|
||||
await user.click(screen.getByRole('button', { name: 'select-file' }))
|
||||
expect(screen.queryByText(/workflow\.nodes\.humanInput\.insertInputField\.prePopulateField/i)).not.toBeInTheDocument()
|
||||
|
||||
await user.click(screen.getByRole('button', { name: 'select-paragraph' }))
|
||||
expect(screen.getByText(/workflow\.nodes\.humanInput\.insertInputField\.prePopulateField/i)).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user