feat(runs): record playwright traces with per-run trace mode, bump to 1.15.0
- record a trace for each scenario run and upload it as trace.zip - add PLAYWRIGHT_TRACE_MODE (on, retain-on-failure, off) as the default - add a trace mode option to the run modal, stored per run and reused by repeat run; expose the default via GET /scenarios/run-defaults - accept traceMode in POST /scenarios/:id/run and run_scenario MCP tool - share one run modal component between scenario list and detail pages - git-ignore server/data
This commit is contained in:
1 parent
7d366e6368
commit
a328ef5ea7
24 files changed
+525
-99
No files matched your search
@@ -588,11 +588,15 @@ describe("McpController", () => {
|
||||
total: number;
|
||||
};
|
||||
|
||||
expect(list.total).toBe(1);
|
||||
expect(list.items).toHaveLength(1);
|
||||
expect(list.items[0].name).toBe("artifact.bin");
|
||||
expect(list.items[0].mimeType).toBe("application/octet-stream");
|
||||
expect(list.items[0].expiresAt).not.toBeNull();
|
||||
// The script's artifact plus the run's Playwright trace
|
||||
expect(list.total).toBe(2);
|
||||
expect(list.items.map((f) => f.name).sort()).toEqual([
|
||||
"artifact.bin",
|
||||
"trace.zip",
|
||||
]);
|
||||
const artifact = list.items.find((f) => f.name === "artifact.bin")!;
|
||||
expect(artifact.mimeType).toBe("application/octet-stream");
|
||||
expect(artifact.expiresAt).not.toBeNull();
|
||||
});
|
||||
|
||||
it("returns MCP error for non-existent scenario", async () => {
|
||||
@@ -621,7 +625,7 @@ describe("McpController", () => {
|
||||
) as {
|
||||
items: Array<{ id: string; name: string; mimeType: string }>;
|
||||
};
|
||||
const file = list.items[0];
|
||||
const file = list.items.find((f) => f.name === "artifact.bin")!;
|
||||
|
||||
const { status, rpc } = await mcpCall("get_run_file_content", {
|
||||
scenarioId: sc.id,
|
||||
|
||||
Reference in new issue
Block a user