Add demo mode factory reset
- Align the backend seeded default surgery template with the report editor's default report content. - Add backend demo defaults for the default template, Kimi provider, and Xunfei speech proxy configuration. - Change system reset into a super-admin demo mode factory reset that clears reports, audit logs, files, custom templates, and non-default users. - Keep only the default admin, manager, doctor, and default surgery template after demo reset. - Replace the old local-only reset all data button with a two-confirmation backend reset flow. - Add tests covering demo default alignment and database-backed demo reset behavior. - Update docs to describe demo mode reset semantics and production credential cautions.
This commit is contained in:
@@ -90,12 +90,13 @@ AI 第三方接口、讯飞语音上游 WebSocket、麦克风权限和真实视
|
||||
| 后端模板兼容映射 | 已覆盖 | `server/src/templates/template.mapper.test.ts` |
|
||||
| 后端用户兼容映射 | 已覆盖 | `server/src/users/users.mapper.test.ts` |
|
||||
| 后端系统设置 schema | 已覆盖 | `server/src/settings/settings.schemas.test.ts` |
|
||||
| 演示模式默认值 | 已覆盖 | `server/src/demo/demo-defaults.test.ts` 覆盖后端默认模板与前端报告编辑器默认内容一致,并校验语音演示配置完整。 |
|
||||
| 后端 AI 代理 schema | 已覆盖 | `server/src/ai/ai.schemas.test.ts` |
|
||||
| 后端语音代理首帧处理 | 已覆盖 | `server/src/speech/xf-frame.test.ts` |
|
||||
| 后端字段库 schema | 已覆盖 | `server/src/library/library.schemas.test.ts` |
|
||||
| 后端文件 schema | 已覆盖 | `server/src/files/files.schemas.test.ts` |
|
||||
| 后端 HTTP 集成 | 已覆盖 | `server/src/http.integration.test.ts` |
|
||||
| 后端真实数据库集成 | 已覆盖 | `server/src/database.integration.test.ts`,含 Dashboard 角色范围、报告媒体关系表同步、报告 HTML 清洗、审计写入和审计查询权限。 |
|
||||
| 后端真实数据库集成 | 已覆盖 | `server/src/database.integration.test.ts`,含 Dashboard 角色范围、报告媒体关系表同步、报告 HTML 清洗、审计写入、审计查询权限和演示模式恢复出厂设置。 |
|
||||
| 后端健康检查和认证 API | 已覆盖 | HTTP 集成测试覆盖健康检查、登录 session 和未登录保护;真实数据库集成覆盖 Argon2 登录、禁用账号和数据库 Session Store。 |
|
||||
| 模板编辑器深度交互 | 待 E2E | 依赖 contentEditable 和 execCommand。 |
|
||||
| 报告编辑器完整流程 | 部分覆盖 | 已覆盖保存修订版本和个人模板;模板切换、字段同步仍待补。 |
|
||||
|
||||
Reference in New Issue
Block a user