feat(版本详情): 完善任务流程与风险预警
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user