Merge branch 'codex/brd-release-20260715' into codex/multi-tenant-knowledge-platform
# Conflicts: # AGENTS.md # README.md # backend/ruoyi-modules/ruoyi-aihr/src/main/java/org/dromara/aihr/domain/AihrPracticeDto.java # backend/ruoyi-modules/ruoyi-aihr/src/main/java/org/dromara/aihr/service/AihrOrgSyncService.java # backend/ruoyi-modules/ruoyi-aihr/src/main/java/org/dromara/aihr/service/AihrPracticeSeedService.java # backend/ruoyi-modules/ruoyi-aihr/src/main/java/org/dromara/aihr/service/AihrUploadQueueService.java # backend/ruoyi-modules/ruoyi-aihr/src/test/java/org/dromara/aihr/service/AihrOrgSyncServiceTest.java # backend/ruoyi-modules/ruoyi-aihr/src/test/java/org/dromara/aihr/service/AihrPracticeSeedServiceTest.java # backend/ruoyi-modules/ruoyi-aihr/src/test/java/org/dromara/aihr/service/AihrUploadQueueServiceTest.java # docs/20260708/uni-app用户侧前端重建计划.md # docs/API_INTEGRATION.md # docs/BRD_IMPLEMENTATION_AUDIT.md # docs/BRD_PRODUCTION_MIGRATION_RUNBOOK.md # docs/DEMO_ACCEPTANCE.md # docs/DEV_SETUP.md # docs/FIGMA_IMPLEMENTATION_MATRIX.md # docs/README.md # frontend/src/views/knowledge/processing.vue # mobile-uni/src/pages/supervisor/assign/index.vue # mobile-uni/src/pages/supervisor/index/index.vue # mobile-uni/src/pages/supervisor/profile/index.vue # mobile-uni/src/pages/supervisor/review/index.vue # mobile-uni/src/pages/supervisor/reviews/index.vue # mobile-uni/src/pages/supervisor/team/index.vue # mobile-uni/src/pages/user/cases/index.vue # mobile-uni/src/pages/user/practice/index.vue # mobile-uni/src/pages/user/profile/index.vue # mobile-uni/src/pages/user/sop/index.vue # mobile-uni/src/pages/user/today/index.vue # mobile-uni/src/types/api.ts # scripts/tests/aihr-schema-migrations.test.sh
This commit is contained in:
@@ -40,6 +40,36 @@ test('训练页提交失败会回滚本次乐观追加的对话', async () => {
|
||||
assert.match(source, /uni\.showToast\(\{ title: message\.value \|\| '提交失败', icon: 'none'/);
|
||||
});
|
||||
|
||||
test('训练结果回到顶部,SOP 答案生成后定位到回答区', async () => {
|
||||
const [practiceSource, sopSource, navigationSource] = await Promise.all([
|
||||
pageSource('../src/pages/user/practice/index.vue'),
|
||||
pageSource('../src/pages/user/sop/index.vue'),
|
||||
pageSource('../src/services/navigation.ts')
|
||||
]);
|
||||
|
||||
assert.match(practiceSource, /result\.value = await finishPractice\([\s\S]*?resetPageScroll\(\)/);
|
||||
assert.match(sopSource, /import \{ resetPageScroll, scrollPageToSelector \} from '@\/services\/navigation';/);
|
||||
assert.match(sopSource, /result\.value = await searchKnowledge\(value\);\s*scrollPageToSelector\('\.answer-panel'/);
|
||||
assert.match(navigationSource, /export const scrollPageToSelector = \(selector: string/);
|
||||
});
|
||||
|
||||
test('训练历史按摘要、逐句复盘、SOP 依据和行动建议分层', async () => {
|
||||
const source = await pageSource('../src/pages/user/history/index.vue');
|
||||
|
||||
assert.match(source, /训练摘要/);
|
||||
assert.match(source, /录音与逐句复盘/);
|
||||
assert.match(source, /SOP 依据与改进建议/);
|
||||
assert.match(source, /推荐话术/);
|
||||
});
|
||||
|
||||
test('案例页为无权限和无案例提供明确空状态', async () => {
|
||||
const source = await pageSource('../src/pages/user/cases/index.vue');
|
||||
|
||||
assert.match(source, /class="case-empty-state"/);
|
||||
assert.match(source, /暂时还没有可学习案例/);
|
||||
assert.match(source, /提交权限由组织角色决定/);
|
||||
});
|
||||
|
||||
test('manifest 明确声明为 uni-app Vue3 CLI 工程', async () => {
|
||||
const source = await pageSource('../src/manifest.json');
|
||||
|
||||
@@ -69,6 +99,8 @@ test('登录页按高保真原型保留品牌结构和紧凑验证码行', async
|
||||
test('共享视觉基座包含员工端主色和卡片圆角 token', async () => {
|
||||
const source = await pageSource('../src/styles/base.css');
|
||||
|
||||
assert.match(source, /lxgw-wenkai-tc-webfont/);
|
||||
assert.match(source, /font-family:\s*"LXGW WenKai TC"/);
|
||||
assert.match(source, /--employee-primary:\s*#e60012/);
|
||||
assert.match(source, /--employee-card-radius:\s*24px/);
|
||||
assert.match(source, /\.employee-card\s*\{/);
|
||||
@@ -190,6 +222,21 @@ test('问师傅页保留搜索框、答案区和总结卡入口', async () => {
|
||||
assert.match(source, /TEAM_PRACTICE_SUMMARY/);
|
||||
});
|
||||
|
||||
test('SOP 没解决先收集结构化原因再提交', async () => {
|
||||
const [source, service] = await Promise.all([
|
||||
pageSource('../src/pages/user/sop/index.vue'),
|
||||
pageSource('../src/services/knowledge.ts')
|
||||
]);
|
||||
|
||||
assert.match(source, /feedbackReasonOptions/);
|
||||
assert.match(source, /negative-feedback-panel/);
|
||||
assert.match(source, /submitNegativeFeedback/);
|
||||
assert.match(source, /reasonCodes:\s*selectedFeedbackReasons\.value/);
|
||||
assert.match(source, /comment:\s*feedbackComment\.value\.trim\(\)/);
|
||||
assert.match(service, /reasonCodes\?:\s*string\[\]/);
|
||||
assert.match(service, /comment\?:\s*string/);
|
||||
});
|
||||
|
||||
test('训练页保留任务卡、对话区、回复区和结果区并互斥切换', async () => {
|
||||
const source = await pageSource('../src/pages/user/practice/index.vue');
|
||||
|
||||
@@ -203,6 +250,23 @@ test('训练页保留任务卡、对话区、回复区和结果区并互斥切
|
||||
assert.match(source, /practiceView === 'prep'/);
|
||||
assert.match(source, /practiceView === 'active'/);
|
||||
assert.match(source, /practiceView\.value === 'result'/);
|
||||
assert.match(source, /result\.score\?\.length/);
|
||||
assert.match(source, /class="result-dimensions"/);
|
||||
});
|
||||
|
||||
test('底部固定导航页面复用安全操作区', async () => {
|
||||
const [base, practice, assign, review] = await Promise.all([
|
||||
pageSource('../src/styles/base.css'),
|
||||
pageSource('../src/pages/user/practice/index.vue'),
|
||||
pageSource('../src/pages/supervisor/assign/index.vue'),
|
||||
pageSource('../src/pages/supervisor/review/index.vue')
|
||||
]);
|
||||
|
||||
assert.match(base, /--app-bottom-nav-space/);
|
||||
assert.match(base, /\.tabbar-safe-action\s*\{/);
|
||||
assert.match(practice, /primary-button tabbar-safe-action/);
|
||||
assert.match(assign, /primary-button submit-button tabbar-safe-action/);
|
||||
assert.match(review, /primary-button submit-button tabbar-safe-action/);
|
||||
});
|
||||
|
||||
test('员工练习页显示当前岗位而不是固定生活顾问', async () => {
|
||||
|
||||
Reference in New Issue
Block a user