Custom Journey (custom-journey)
Summary
Executes user-defined multi-step Playwright journeys, including optional page fragments.
Classification
- Category:
ECOMMERCE - Plugin id:
custom-journey - Version:
1.0.0 - Target types:
WEBSITE,WEBSHOP - Weight class:
MEDIUM - Risk level: not set on plugin object
- Browser required: Yes (Playwright)
- Tier / group: Tier 3 — E-commerce / flows (Playwright)
Schedule
- scheduleHints:
{ defaultInterval: '0 */4 * * *', priority: 8 } - Prerequisites: None declared on this plugin.
Configurable inputs
Public keys are derived from inputSchema: z.object({ ... }) (underscore-prefixed keys are runtime-only and omitted here).
| Field | Notes |
|---|---|
journeyId |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
journeyName |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
action |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
target |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
value |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
label |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
assertionOperator |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
waitMs |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
screenshot |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
timeout |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
Runtime / injected config
_secrets— merged into journey step values.- Journey definitions and optional page fragments come from the API/worker, not only
inputSchema.
Checks that produce findings
These checks run inside this plugin during a single test run. They are not separate tests in the database — each becomes a Finding linked to the Run for custom-journey.
| Check | Typical severity | Why |
|---|---|---|
| Journey has no steps defined | INFO | An empty journey cannot validate business-critical flows and wastes scheduled run slots. |
| Journey failed at step N (first failing step) | WARNING | A broken step means the monitored user path (checkout, login, etc.) is failing in production. |
Supported step actions: navigate, click, type, fill, select, assert, wait, screenshot, scroll, hover (fragments expanded by worker before enqueue).
How each check works
- Config — Steps arrive from the API/worker (
journey.trigger) with optionaljourneyName, default timeout 60s. Per-step timeout =min(totalTimeout / stepCount, 15000). - Execution — Sequential Playwright actions. Click/fill/assert support comma-separated selector fallbacks. Failed step captures screenshot; remaining steps marked skipped.
- Assertions —
element_visible,element_hidden,url_contains,text_contains,element_count(minimum count fromvalue, default expects ≥1). - Findings — Empty steps → INFO finding, run status
warning. First failed step → WARNING finding with step index, action, selector, error. No CRITICAL findings. - Video — When
_recordVideoor_forceRecordVideois set, records.webmflow evidence via browser pool. - Score and status —
(passedSteps / totalSteps) × 100. Statuswarningif any step failed, elsepassed.
Caveats and concerns
- User-defined fragility — Breaks when selectors change; requires maintenance like any E2E suite.
- Secrets in steps —
{{LOGIN_EMAIL}}substitution happens at enqueue time in the API, not inside the plugin file shown here. - No automatic retry — One attempt per step; transient flakes appear as failures.
- Stop on first failure — Later steps are skipped, so multiple breakages may be hidden until the first is fixed.
- WEBSITE + WEBSHOP — Target type allows corporate sites, but journeys are typically commerce/support flows.
Source
packages/test-plugins/src/plugins/custom-journey.ts