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
+1
-1
@@ -61,7 +61,7 @@ The server registers the following tools. All entity IDs are UUIDs; list tools a
|
||||
| `export_scenario` | Export one scenario version (optional `version`, defaults to the latest) |
|
||||
| `import_scenario` | Import one scenario version; `version` is required (see "Versioning" in [scenario.md](scenario.md)) |
|
||||
| `import_yaml` | Import any mix of environments, credentials, snippets and scenarios from YAML (see "Import" in [scenario.md](scenario.md)) |
|
||||
| `export_e2e_test` | Export a scenario as a standalone Playwright test project (zip, base64) |
|
||||
| `export_e2e_test` | Export one scenario version as a standalone Playwright test project (zip, base64; optional `version`, defaults to the latest) |
|
||||
|
||||
Changes to scenario content (fields and steps) create a new scenario version; credential assignments and files are not versioned.
|
||||
|
||||
|
||||
@@ -114,6 +114,10 @@ steps:
|
||||
execCode: await context.page.goto(context.getEnv("base_url"));
|
||||
```
|
||||
|
||||
### E2e test export
|
||||
|
||||
`GET /scenarios/:id/export-e2e` (the "Export e2e test" button, the `export_e2e_test` MCP tool) exports one scenario version as a standalone Playwright test project, zipped as `<scenario>-v<N>-e2e-test.zip`. It takes an optional `version` (default: the latest). Snippets are bundled the same way as in the scenario export: the latest version for plain `runSnippet("alias")` calls, plus each version pinned with `alias@N`. The environment, credentials and files are the scenario's current ones; they are not versioned.
|
||||
|
||||
## Playwright traces
|
||||
|
||||
A run can record a [Playwright trace](https://playwright.dev/docs/trace-viewer) of its browser context (screenshots and DOM snapshots). When the run finishes, the trace is uploaded to the run's files as `trace.zip`. Download it from the run detail page, then open it with `npx playwright show-trace trace.zip` or at https://trace.playwright.dev.
|
||||
|
||||
Reference in new issue
Block a user