Skip to content

waygraph / WaygraphConfig

Interface: WaygraphConfig<Label> ​

Defined in: src/runtime/waygraph-config.ts:109

The project config in config/waygraph.config.ts: base URL, extensions, run and demo settings, web server and the Playwright block.

Type Parameters ​

Label ​

Label extends string = string

Properties ​

baseUrl? ​

optional baseUrl?: string

Defined in: src/runtime/waygraph-config.ts:111

Same value resolveBaseUrl would otherwise read from package.json's waygraph.baseUrl.


demo? ​

optional demo?: DemoSettings

Defined in: src/runtime/waygraph-config.ts:131

Settings for waygraph demo only. They override the shared ones above.


device? ​

optional device?: Device

Defined in: src/runtime/waygraph-config.ts:121

The device flows play on: "desktop" (the default), "tablet", "mobile", or its parts ({ preset: "mobile", orientation: "landscape" }, { width: 1600, height: 900 }). run, demo and waygraph test start their browser as it (its size, phone layout and touch); a flow's map({ device }) changes the size for that flow.


extensions? ​

optional extensions?: ExtensionSpec[]

Defined in: src/runtime/waygraph-config.ts:113

Chromium extensions to load in every run: "hoppscotch", a Chrome Web Store id, or { path } to an unpacked one.


headed? ​

optional headed?: boolean

Defined in: src/runtime/waygraph-config.ts:125

Default for run and demo: show the browser window. Without it demo and auto are headed and run is headless.


labels? ​

optional labels?: LabelsConfig<Label>

Defined in: src/runtime/waygraph-config.ts:140

Every label a flow may carry, typed into map({ labels }) and regression (a typo is a type error). A name is a string; a label that needs more is an object, { name, flows, description }: flows puts the label on flows from here, by a glob over their files ("src/flows/auth/**") or a flow's export name. waygraph test --label auth runs a group of flows.

Example ​

ts
labels: ["smoke", "empty-db", { name: "auth", flows: ["src/flows/auth/**", "logoutFlow"], description: "sign in and out" }]

network? ​

optional network?: NetworkSettings

Defined in: src/runtime/waygraph-config.ts:129

How HTTP calls are named and judged (the demo's card, waygraph check --network).


playwright? ​

optional playwright?: PlaywrightTestConfig

Defined in: src/runtime/waygraph-config.ts:154

Anything else for the test runner, e.g. workers, timeout, reporter, use: { video: "on" }. Merged over waygraph's defaults.


regression? ​

optional regression?: RegressionConfig<Label>

Defined in: src/runtime/waygraph-config.ts:148

Which flows the full run (waygraph test) plays. By default every flow, labelled or not. A set narrows it by label: include keeps only flows with one of its labels, then exclude drops flows with one of its (it wins). Edge cases that need a precondition a shared environment can't promise (an empty database, rows seeded by hand) are left out, listed as skipped, and run when picked (--label empty-db) or with --all. Name several sets and choose one with --regression.

Example ​

ts
regression: { exclude: ["empty-db"] } · regression: { default: { exclude: ["empty-db"] }, nightly: { include: ["auth"] } }

run? ​

optional run?: RunSettings

Defined in: src/runtime/waygraph-config.ts:127

Settings for waygraph run only. They override the shared ones above.


runLog? ​

optional runLog?: string | boolean

Defined in: src/runtime/waygraph-config.ts:133

Write each run's events to .waygraph/runs/<runId>.jsonl (the history Waygraph Studio shows), or to this folder. Default true.


slowMo? ​

optional slowMo?: number

Defined in: src/runtime/waygraph-config.ts:123

Default for run and demo: milliseconds to pause around each browser action, so a run is watchable.


testDir? ​

optional testDir?: string

Defined in: src/runtime/waygraph-config.ts:150

Folder of test files, relative to the project. Default "tests".


video? ​

optional video?: VideoSettings

Defined in: src/runtime/waygraph-config.ts:115

Recording with --video (waygraph run / demo); run and demo below can override it.


webServer? ​

optional webServer?: WebServerConfig | WebServerConfig[]

Defined in: src/runtime/waygraph-config.ts:152

App to start around waygraph test, run, demo and auto (same fields as Playwright's webServer).

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed