feat: export e2e tests for a chosen scenario version
- GET /scenarios/:id/export-e2e and the export_e2e_test MCP tool take an optional version, defaulting to the latest - build the test project from that version's steps, name and timeout - put the version in the zip name (<scenario>-vN-e2e-test.zip), the generated package name and the README heading - the Export e2e test button exports the version being viewed - document the e2e export in scenario.md and mcp.md
This commit is contained in:
8 files changed
+102
-17
No files matched your search
@@ -203,12 +203,17 @@ export class ScenarioController {
|
||||
summary: "Export a scenario as a standalone, plug-and-play Playwright e2e test (zip)",
|
||||
})
|
||||
@ApiResponse({ status: 200, description: "Zip archive" })
|
||||
@ApiResponse({ status: 404, description: "Scenario not found" })
|
||||
@ApiResponse({ status: 404, description: "Scenario or version not found" })
|
||||
async exportE2eTest(
|
||||
@Param("id", ParseUUIDPipe) id: string,
|
||||
@Query("version", new ParseIntPipe({ optional: true }))
|
||||
version: number | undefined,
|
||||
@Res() res: Response,
|
||||
) {
|
||||
const { filename, buffer } = await this.e2eExportService.buildE2eTestPackage(id);
|
||||
const { filename, buffer } = await this.e2eExportService.buildE2eTestPackage(
|
||||
id,
|
||||
version,
|
||||
);
|
||||
res.setHeader("Content-Type", "application/zip");
|
||||
res.setHeader("Content-Disposition", `attachment; filename="${filename}"`);
|
||||
res.setHeader("Content-Length", buffer.length);
|
||||
|
||||
Reference in new issue
Block a user