refactor(scenario): remove validateCode — assertions live in execCode

- drop validateCode column, DTOs, service mappings, and scheduler branch
- remove parseValidateResult helper and ValidateResult interface
- inject playwright expect into code executor for direct use in execCode
- strip validateCode from MCP tool schemas, client types, and UI forms
This commit is contained in:
2026-04-11 00:52:50 +03:00
parent 29e91b0078
commit 238c52610a
16 changed files with 32 additions and 123 deletions
-10
View File
@@ -505,10 +505,6 @@ export class McpService {
.string()
.optional()
.describe("Playwright JS code to execute (exec steps)"),
validateCode: z
.string()
.optional()
.describe("Validation JS code returning { success, description }"),
},
},
async ({ scenarioId, ...dto }) => {
@@ -569,7 +565,6 @@ export class McpService {
.describe("New step type"),
title: z.string().optional().describe("New step title"),
execCode: z.string().optional().describe("New exec code"),
validateCode: z.string().optional().describe("New validation code"),
},
},
async ({ scenarioId, stepId, ...dto }) => {
@@ -785,11 +780,6 @@ export class McpService {
.nullable()
.optional()
.describe("Exec/sign code"),
validateCode: z
.string()
.nullable()
.optional()
.describe("Validation code"),
}),
)
.describe("Ordered list of steps"),