feat(scenario): add scenario runs, run steps, and step ordering
- add ScenarioRunEntity (pending|in_progress|pass|fail) and ScenarioRunStepEntity (waiting|pending|in_progress|pass|fail) - add POST /scenarios/:id/run — creates run with first step pending, rest waiting - add order field to ScenarioStepEntity and ScenarioRunStepEntity for deterministic sequential execution - findOne and createRun now sort steps/stepRuns by order ASC
This commit is contained in:
@@ -111,4 +111,14 @@ export class ScenarioController {
|
||||
) {
|
||||
return this.scenarioService.removeStep(id, stepId);
|
||||
}
|
||||
|
||||
// ── Runs ──────────────────────────────────────────────────────────────────
|
||||
|
||||
@Post(':id/run')
|
||||
@ApiOperation({ summary: 'Create a new run for a scenario' })
|
||||
@ApiResponse({ status: 201, description: 'Run created with step runs' })
|
||||
@ApiResponse({ status: 404, description: 'Scenario not found' })
|
||||
createRun(@Param('id', ParseIntPipe) id: number) {
|
||||
return this.scenarioService.createRun(id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user