fix: 完善全系统业务闭环(大神入驻联动用户角色、服务评价人工下架监管、友圈搭子上车审核与抽屉)
这个提交包含在:
@@ -326,6 +326,52 @@ describe('ClientFeatures (TDD 测试套件: 用户端功能闭环)', () => {
|
||||
expect(content).toContain('resetAllFilters');
|
||||
});
|
||||
});
|
||||
|
||||
describe('9. 大神认证审核双向联动、服务评价监管与友圈搭子上车业务完整闭环', () => {
|
||||
it('审核大神入驻通过时,必须联动更新 users 表 role 为 "认证大神" 与 is_expert = 1', () => {
|
||||
const repoPath = path.join(serverSrcDir, 'db', 'repository.ts');
|
||||
const content = fs.readFileSync(repoPath, 'utf-8');
|
||||
|
||||
expect(content).toContain('auditCompanion');
|
||||
expect(content).toContain('UPDATE users SET role = "认证大神", is_expert = 1');
|
||||
expect(content).toContain('UPDATE users SET role = "普通用户", is_expert = 0');
|
||||
});
|
||||
|
||||
it('后端必须提供评价与回复监管接口 (GET /api/reviews 与 DELETE /api/reviews/:id)', () => {
|
||||
const indexPath = path.join(serverSrcDir, 'index.ts');
|
||||
const content = fs.readFileSync(indexPath, 'utf-8');
|
||||
|
||||
expect(content).toContain("app.get('/api/reviews'");
|
||||
expect(content).toContain("app.delete('/api/reviews/:id'");
|
||||
});
|
||||
|
||||
it('管理后台路由与菜单中必须挂载服务评价与回复监管模块', () => {
|
||||
const routePath = path.join(rootDir, 'admin', 'arco-design-pro-vite', 'src', 'router', 'routes', 'modules', 'community.ts');
|
||||
const content = fs.readFileSync(routePath, 'utf-8');
|
||||
|
||||
expect(content).toContain('review-manage');
|
||||
expect(content).toContain('menu.community.reviewManage');
|
||||
});
|
||||
|
||||
it('后端必须提供搭子上车申请查询与审核处置接口', () => {
|
||||
const indexPath = path.join(serverSrcDir, 'index.ts');
|
||||
const content = fs.readFileSync(indexPath, 'utf-8');
|
||||
|
||||
expect(content).toContain("app.get('/api/posts/:id/applies'");
|
||||
expect(content).toContain("app.get('/api/post-applies'");
|
||||
expect(content).toContain("app.post('/api/post-applies/:id/handle'");
|
||||
});
|
||||
|
||||
it('管理后台动态管理必须支持查看搭子上车申请并执行同意/婉拒处置', () => {
|
||||
const postManagePath = path.join(rootDir, 'admin', 'arco-design-pro-vite', 'src', 'views', 'community', 'post-manage', 'index.vue');
|
||||
const content = fs.readFileSync(postManagePath, 'utf-8');
|
||||
|
||||
expect(content).toContain('openAppliesDrawer');
|
||||
expect(content).toContain('appliesDrawerVisible');
|
||||
expect(content).toContain('handleApplyAction');
|
||||
expect(content).toContain('/api/post-applies/');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户