docs: 交付文档、维护指引与端到端回归

补齐 README、开发计划、维护交接与 E2E 用例,执行最终验收。
This commit is contained in:
WangShen007 committed 2026-10-21 21:40:00 +08:00
1 parent 18732801b5
commit 6cd904d460
216 files changed
+37038

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { test, expect, scenarioMarker, unique, AI_REPLY } from '@e2e'
test.describe('agent editor', () => {
test('an agent created and edited in the dashboard answers with its new instructions @agents', async ({ makeAgent, agentsPage, makeWidget, llm }) => {
// With at least one agent, /ai-agents shows the list rather than onboarding.
await makeAgent()
const scenarioId = unique('scn')
const name = `UI Agent ${scenarioId}`
await agentsPage.goto()
const agentId = await agentsPage.createAgent(name)
await agentsPage.openAgent(agentId)
await agentsPage.setInstructions(`Always sign off as the Acme team. ${scenarioMarker(scenarioId)}`)
await llm.script({ name, scenarioId }, (s) => s.otherwise().reply('Hello from the Acme team!'))
const widget = await makeWidget(agentId)
await widget.embed()
await widget.open()
await widget.send('Hi there')
await expect(widget.lastAgentMessage()).toHaveText('Hello from the Acme team!', AI_REPLY)
const prompts = (await llm.requests({ name, scenarioId })).map((request) => request.system)
expect(prompts.join('\n')).toContain('Always sign off as the Acme team.')
})
})