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, customizeAgent } from '@e2e'
// Screenshot baselines are generated on Linux in CI (the nightly job, or the e2e
// workflow run by hand with "update snapshots") and committed from its artifact.
// Never commit a baseline made on a Mac: fonts render differently.
test.describe('widget appearance', () => {
for (const scheme of ['light', 'dark'] as const) {
test(`launcher and open chat, ${scheme} @visual @widget`, async ({ agent, adminApi, widget }) => {
// Fixed name and text, so nothing in the shot changes from run to run (the
// avatar is drawn from the name, too).
await adminApi.put(`/agent/${agent.id}`, { data: { display_name: 'Acme Support' } })
await customizeAgent(adminApi, agent.id, { welcome_message: 'Hi! How can we help today?' })
await widget.page.emulateMedia({ colorScheme: scheme })
await widget.embed()
await expect(widget.launcher).toBeVisible()
await expect(widget.launcher).toHaveScreenshot(`launcher-${scheme}.png`)
await widget.open()
await expect(widget.welcomeMessage).toBeVisible()
await expect(widget.agentName).toHaveText('Acme Support')
await expect(widget.panel).toHaveScreenshot(`chat-${scheme}.png`)
})
}
})