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:
1 parent
d669bf1c59
commit
caf120741d
9 files changed
+158
-5
No files matched your search
@@ -1,8 +1,13 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { IsIn, IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
||||
import { IsIn, IsInt, IsNotEmpty, IsOptional, IsString, Min } from 'class-validator';
|
||||
import { StepType } from '../scenario-step.entity';
|
||||
|
||||
export class CreateScenarioStepDto {
|
||||
@ApiProperty({ example: 0, description: 'Execution order (ascending)' })
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
order: number;
|
||||
|
||||
@ApiProperty({ enum: ['login', 'exec'], example: 'exec' })
|
||||
@IsIn(['login', 'exec'])
|
||||
type: StepType;
|
||||
|
||||
Reference in new issue
Block a user