Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

649 B
Raw Blame
import { renderEditorHook as renderHook } from '@/app/components/workflow/editor-resource/__tests__/render'
import { useGetRunAndTraceUrl } from '../use-get-run-and-trace-url'

describe('useGetRunAndTraceUrl', () => {
  it('should build workflow run and trace urls from the current app id', () => {
    const { result } = renderHook(() => useGetRunAndTraceUrl(), {
      resource: { kind: 'app', appId: 'app-123', mode: 'workflow' },
    })

    expect(result.current.getWorkflowRunAndTraceUrl('run-1')).toEqual({
      runUrl: '/apps/app-123/workflow-runs/run-1',
      traceUrl: '/apps/app-123/workflow-runs/run-1/node-executions',
    })
  })
})