docs: 交付文档、维护指引与端到端回归
补齐 README、开发计划、维护交接与 E2E 用例,执行最终验收。
This commit is contained in:
1 parent
5be5ca3376
commit
308332eb94
216 files changed
+37038
No files matched your search
@@ -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.')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user