mirror of
https://github.com/EKKOLearnAI/hermes-web-ui.git
synced 2026-07-14 04:30:32 +00:00
f5a292663b
* feat: add workflow builder page * Add workflow schema and editor controls * feat: add workflow builder persistence * feat: add workflow socket and agent skills * feat: complete workflow run execution * test: fix workflow ci coverage failures --------- Co-authored-by: Codex <codex@openai.com>
39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { buildWorkflowSkillOptions, workflowAgentToSkillTarget } from '@/utils/hermes/workflow-skills'
|
|
|
|
describe('workflow skill helpers', () => {
|
|
it('maps workflow agents to skill API targets', () => {
|
|
expect(workflowAgentToSkillTarget('hermes')).toBe('hermes')
|
|
expect(workflowAgentToSkillTarget('claude-code')).toBe('claude')
|
|
expect(workflowAgentToSkillTarget('codex')).toBe('codex')
|
|
expect(workflowAgentToSkillTarget('unknown-agent')).toBe('hermes')
|
|
})
|
|
|
|
it('builds sorted enabled skill options without duplicate names', () => {
|
|
expect(buildWorkflowSkillOptions({
|
|
archived: [],
|
|
categories: [
|
|
{
|
|
name: 'beta',
|
|
description: '',
|
|
skills: [
|
|
{ name: 'write-report', description: '', enabled: true },
|
|
{ name: 'disabled-skill', description: '', enabled: false },
|
|
],
|
|
},
|
|
{
|
|
name: 'alpha',
|
|
description: '',
|
|
skills: [
|
|
{ name: 'analyze-data', description: '' },
|
|
{ name: 'write-report', description: '' },
|
|
],
|
|
},
|
|
],
|
|
})).toEqual([
|
|
{ label: 'analyze-data', value: 'analyze-data' },
|
|
{ label: 'write-report', value: 'write-report' },
|
|
])
|
|
})
|
|
})
|