Files
ftb-project-management/apps/web/lib/governance-source.test.ts
2e595c7e72
Some checks failed
Deploy Production / Build, push, deploy, verify (push) Has been cancelled
refactor(data): 收口关系表运行时数据源
- 移除已迁移业务 AppData 运行时 fallback,改走领域 API 和关系表快读
- 补齐需求产品负责人、版本计划任务 JSON 和成员 username 回填迁移
- 统一治理字典入口,并补充 AI provider、数据源契约和领域服务测试

Co-Authored-By: Codex GPT-5 <codex@openai.com>
2026-07-09 14:59:49 +08:00

22 lines
1015 B
TypeScript

import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import test from 'node:test';
test('governance settings is the unified dictionary entry for requirement and task types', () => {
const sidebar = readFileSync('components/layout/Sidebar.tsx', 'utf8');
const permissions = readFileSync('lib/permissions.ts', 'utf8');
const governancePage = readFileSync('app/admin/governance/page.tsx', 'utf8');
const appModule = readFileSync(join(process.cwd(), '../server/src/app.module.ts'), 'utf8');
assert.match(sidebar, /治理设置/);
assert.match(sidebar, /\/admin\/governance/);
assert.doesNotMatch(sidebar, /\/admin\/categories/);
assert.match(permissions, /governance:manage/);
assert.match(appModule, /GovernanceModule/);
assert.match(governancePage, /task_category/);
assert.match(governancePage, /requirement_type/);
assert.match(governancePage, /requirement_platform/);
assert.match(governancePage, /requirement_source/);
});