feat(scenarios): add step title, scenario credentials, and environment context in executor
- add nullable title column to scenario steps; exposed in create/edit forms and step table - add scenario-credential join (many-to-many with CredentialEntity) with CRUD endpoints - expose environment URLs in code executor helpers via helpers.env and helpers.getEnvUrl() - resolve and cache environment per run from the login step's environmentName in scheduler - add section spacing and step table title column to ScenarioDetailPage
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsInt, IsNotEmpty, IsPositive, IsString } from "class-validator";
|
||||
|
||||
export class AddScenarioCredentialDto {
|
||||
@ApiProperty({ example: 1 })
|
||||
@IsInt()
|
||||
@IsPositive()
|
||||
credentialId: number;
|
||||
|
||||
@ApiProperty({ example: "api_key" })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
alias: string;
|
||||
}
|
||||
@@ -10,6 +10,11 @@ import {
|
||||
import { StepType } from "../scenario-step.entity";
|
||||
|
||||
export class CreateScenarioStepDto {
|
||||
@ApiPropertyOptional({ example: "Check login page title" })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
title?: string;
|
||||
|
||||
@ApiProperty({ example: 0, description: "Execution order (ascending)" })
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
|
||||
@@ -10,6 +10,11 @@ import {
|
||||
import { StepType } from "../scenario-step.entity";
|
||||
|
||||
export class UpdateScenarioStepDto {
|
||||
@ApiPropertyOptional({ example: "Check login page title" })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
title?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 0 })
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
|
||||
Reference in New Issue
Block a user