mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 18:27:19 +08:00
Merge branch 'jzh' into deploy/dev
This commit is contained in:
commit
e3a939c81d
@ -52,6 +52,11 @@ describe('EvaluationCell', () => {
|
||||
evaluation={[{
|
||||
name: 'Faithfulness',
|
||||
value: 0.98,
|
||||
details: {
|
||||
stubbed: true,
|
||||
source: 'console-evaluation-run',
|
||||
value_type: 'number',
|
||||
},
|
||||
nodeInfo: {
|
||||
node_id: 'node-1',
|
||||
title: 'Knowledge Retrieval',
|
||||
@ -85,5 +90,30 @@ describe('EvaluationCell', () => {
|
||||
|
||||
expect(await screen.findByText('True')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('should render evaluation items with null node info', async () => {
|
||||
const user = userEvent.setup()
|
||||
|
||||
render(
|
||||
<EvaluationCell
|
||||
evaluation={[{
|
||||
name: 'custom_score',
|
||||
value: 0.95,
|
||||
details: {
|
||||
stubbed: true,
|
||||
source: 'console-evaluation-run',
|
||||
value_type: 'number',
|
||||
customized: true,
|
||||
},
|
||||
nodeInfo: null,
|
||||
}]}
|
||||
/>,
|
||||
)
|
||||
|
||||
await user.click(screen.getByRole('button', { name: 'appLog.table.header.evaluation' }))
|
||||
|
||||
expect(await screen.findByText('custom_score')).toBeInTheDocument()
|
||||
expect(screen.getByText('0.95')).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -259,11 +259,18 @@ type EndUserInfo = {
|
||||
export type EvaluationLogItem = {
|
||||
name: string
|
||||
value: string | number | boolean
|
||||
details?: {
|
||||
stubbed?: boolean
|
||||
source?: string
|
||||
value_type?: string
|
||||
customized?: boolean
|
||||
[key: string]: unknown
|
||||
} | null
|
||||
nodeInfo?: {
|
||||
node_id: string
|
||||
type: string
|
||||
title: string
|
||||
}
|
||||
} | null
|
||||
}
|
||||
export type WorkflowAppLogDetail = {
|
||||
id: string
|
||||
|
||||
Loading…
Reference in New Issue
Block a user