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?
optionalbaseUrl?:string
Defined in: src/runtime/waygraph-config.ts:111
Same value resolveBaseUrl would otherwise read from package.json's waygraph.baseUrl.
demo?
optionaldemo?:DemoSettings
Defined in: src/runtime/waygraph-config.ts:131
Settings for waygraph demo only. They override the shared ones above.
device?
optionaldevice?: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?
optionalextensions?: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?
optionalheaded?: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?
optionallabels?: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
labels: ["smoke", "empty-db", { name: "auth", flows: ["src/flows/auth/**", "logoutFlow"], description: "sign in and out" }]network?
optionalnetwork?:NetworkSettings
Defined in: src/runtime/waygraph-config.ts:129
How HTTP calls are named and judged (the demo's card, waygraph check --network).
playwright?
optionalplaywright?: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?
optionalregression?: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
regression: { exclude: ["empty-db"] } · regression: { default: { exclude: ["empty-db"] }, nightly: { include: ["auth"] } }run?
optionalrun?:RunSettings
Defined in: src/runtime/waygraph-config.ts:127
Settings for waygraph run only. They override the shared ones above.
runLog?
optionalrunLog?: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?
optionalslowMo?: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?
optionaltestDir?:string
Defined in: src/runtime/waygraph-config.ts:150
Folder of test files, relative to the project. Default "tests".
video?
optionalvideo?:VideoSettings
Defined in: src/runtime/waygraph-config.ts:115
Recording with --video (waygraph run / demo); run and demo below can override it.
webServer?
optionalwebServer?: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).