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,31 @@
|
||||
import { test, expect, storageStatePath, unique, LoginPage, Sidebar } from '@e2e'
|
||||
|
||||
test.describe('team', () => {
|
||||
test('an admin adds an agent who can sign in to the inbox @team', async ({ humanAgentsPage, anonymousPage }) => {
|
||||
const id = unique('agent')
|
||||
const member = { name: `Alex ${id}`, email: `${id}@e2e.example.com`, password: 'E2e-New-Agent-Passw0rd!', role: 'Agent' as const }
|
||||
|
||||
await humanAgentsPage.goto()
|
||||
await humanAgentsPage.invite(member)
|
||||
await expect(humanAgentsPage.member(member.email)).toBeVisible()
|
||||
|
||||
const login = new LoginPage(anonymousPage)
|
||||
await login.goto()
|
||||
await login.signIn(member.email, member.password)
|
||||
await expect(anonymousPage).toHaveURL(/\/conversations/)
|
||||
})
|
||||
})
|
||||
|
||||
test.describe('as a human agent', () => {
|
||||
test.use({ storageState: storageStatePath('human-agent') })
|
||||
|
||||
test('the Agent role does not see admin areas in the navigation @team', async ({ page }) => {
|
||||
// Not /conversations: the inbox collapses the sidebar to icons.
|
||||
await page.goto('/people')
|
||||
const sidebar = new Sidebar(page)
|
||||
await expect(sidebar.link('Inbox')).toBeVisible()
|
||||
for (const adminArea of ['AI Agents', 'Human Agents', 'Knowledge', 'AI Configuration', 'Organization']) {
|
||||
await expect(sidebar.link(adminArea)).toBeHidden()
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user