mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
refactor(datasets): extract hooks and components with comprehensive tests (#31707)
Co-authored-by: CodingOnStar <hanxujiang@dify.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -11,7 +11,12 @@ vi.mock('@/app/components/base/modal', () => ({
|
||||
onClose,
|
||||
children,
|
||||
closable,
|
||||
}: any) {
|
||||
}: {
|
||||
isShow: boolean
|
||||
onClose: () => void
|
||||
children: React.ReactNode
|
||||
closable?: boolean
|
||||
}) {
|
||||
if (!isShow)
|
||||
return null
|
||||
|
||||
@ -39,7 +44,10 @@ vi.mock('./start-node-selection-panel', () => ({
|
||||
default: function MockStartNodeSelectionPanel({
|
||||
onSelectUserInput,
|
||||
onSelectTrigger,
|
||||
}: any) {
|
||||
}: {
|
||||
onSelectUserInput: () => void
|
||||
onSelectTrigger: (type: BlockEnum, config?: Record<string, unknown>) => void
|
||||
}) {
|
||||
return (
|
||||
<div data-testid="start-node-selection-panel">
|
||||
<button data-testid="select-user-input" onClick={onSelectUserInput}>
|
||||
|
||||
Reference in New Issue
Block a user