feat(版本详情): 完善流程日志与需求覆盖

This commit is contained in:
Script Generator
2026-06-30 11:00:07 +08:00
parent d754585fe0
commit 1cd595c42e
38 changed files with 4123 additions and 237 deletions

View File

@@ -1,5 +1,5 @@
import type { TestCase, TestCaseStatus } from './test-case';
import { canTcTransition, getTestCaseRoundNo } from './test-case';
import { canStartTestCase, canTcTransition, getTestCaseRoundNo } from './test-case';
export interface TestCaseWorkflowResult {
ok: boolean;
@@ -36,6 +36,10 @@ export function applyTestCaseTransition(
}
const nowIso = (options.now ?? new Date()).toISOString();
if (to === 'running' && !canStartTestCase(testCase)) {
return { ok: false, message: '开始测试前需要先领取并填写计划开始和计划结束时间' };
}
const patch: Partial<TestCase> = {
status: to,
aiDraft: false,