Skip to content

waygraph / MapBuilderOptions

Interface: MapBuilderOptions<Label> ​

Defined in: src/engine/flow/map-options.ts:34

What a flow says about itself: shown in the flow list, the demo's opening, the run log and Studio, and what --label picks by.

Extends ​

Type Parameters ​

Label ​

Label extends string = string

Properties ​

as? ​

optional as?: Account

Defined in: src/engine/flow/map-options.ts:72

Run as this account (account(name, { signIn })): the flow starts signed in, from the session kept since the account's first sign-in in this process, or by signing in now.

Example ​

ts
engine.map({ as: Planner }).gotoPage(NavEquipmentBlock)

demoPace? ​

optional demoPace?: DemoPace

Defined in: src/engine/flow/map-options.ts:64

Default demo pace for the whole flow.


description? ​

optional description?: string

Defined in: src/engine/flow/map-options.ts:18

What it proves and why it matters, a sentence or two: the demo's opening slide reads it.

Inherited from ​

FlowMeta.description


device? ​

optional device?: Device

Defined in: src/engine/flow/map-options.ts:87

The device this flow plays on, over the config's device (default desktop): "mobile", "tablet", or its parts ({ preset: "mobile", orientation: "landscape" }, { width: 1600, height: 900 }). run, demo and waygraph test --flows play it at that size; a phone or tablet layout and touch come from the browser the run started with (the config's device), since a browser can't switch them midway.

Example ​

ts
engine.map({ device: { preset: "tablet", orientation: "landscape" } })

exclusive? ​

optional exclusive?: boolean

Defined in: src/engine/flow/map-options.ts:92

Under waygraph test --flows, run this flow alone, after every other flow: it changes data others read (a bulk delete, a settings change), or it needs the app to itself.


expect? ​

optional expect?: false

Defined in: src/engine/flow/map-options.ts:55

false: run each step's verify but none of its expectations (the Blocks' expect and the steps'): a setup flow nobody is judging. --no-expect does the same for one run.


expectedFailure? ​

optional expectedFailure?: string

Defined in: src/engine/flow/map-options.ts:62

Marks a flow that is supposed to throw, with the reason shown in the demo.


given? ​

optional given?: readonly (SomeDefinedBlock | GivenGroup)[]

Defined in: src/engine/flow/map-options.ts:48

The preconditions: Blocks that make what the scenario needs (a tenant, a record in the state it must be in), played before the first step. A Block with an undo is put back after the flow, last given first. A given that fails blocks the flow (WG_GIVEN_FAILED): it was not played, so it neither passed nor failed.

Example ​

ts
given: [SeedTenant, SeedPendingRequest] · given: [signedUpTenant] (a group made with `engine.given`)

highlightStyle? ​

optional highlightStyle?: HighlightStyleDefaults

Defined in: src/engine/flow/map-options.ts:66

Default ring tone, size and weight for the whole flow.


homeOrigin? ​

optional homeOrigin?: string

Defined in: src/engine/flow/map-options.ts:41

This project's own origin (e.g. "https://app.example.com") - enables .gotoPage()/.gotoExternal()'s origin check against a Block's static url. Omit to skip that check entirely (still fully kind-checked either way; only the internal/external origin distinction is opt-in).


input? ​

optional input?: MemKey<unknown>

Defined in: src/engine/flow/map-options.ts:79

The MemKey this flow takes as its input: one flow for many cases. Its first step requires it; --input (JSON or @file) gives it on the command line - an array plays the flow once per item - as do --data, a mem stub and .flow(sub, { input }).

Example ​

ts
engine.map({ input: ApiCase }).gotoExternal(NavHoppscotchRestBlock).method(LoadCaseBlock)…

labels? ​

optional labels?: readonly Label[]

Defined in: src/engine/flow/map-options.ts:20

Groups it belongs to (auth, smoke); the config's labels globs add more. waygraph test --label auth runs them.

Inherited from ​

FlowMeta.labels


memStub? ​

optional memStub?: boolean

Defined in: src/engine/flow/map-options.ts:50

Fill missing requires keys from registerMemStub when the flow runs.


network? ​

optional network?: object

Defined in: src/engine/flow/map-options.ts:105

The network the flow runs on: throttle ("offline", "slow-3g", "fast-3g", or latency and throughput; Chromium) and faults (requests that fail or are slow on purpose). Applied when the flow starts, put back when it ends, pass or fail.

faults? ​

optional faults?: readonly Fault[]

throttle? ​

optional throttle?: Throttle

"offline" in every browser; the speeds in Chromium.

Example ​

ts
engine.map({ network: { faults: [{ url: "**/api/orders", status: 500 }] } })

owner? ​

optional owner?: string

Defined in: src/engine/flow/map-options.ts:24

Who looks after it.

Inherited from ​

FlowMeta.owner


panes? ​

optional panes?: readonly Pane<string>[]

Defined in: src/engine/flow/map-options.ts:112

The flow's panes: pages side by side, each in its own browser context (its own account and device) or sharing another's (with). .in(pane) says which one the next steps act in; panes share the flow's mem.

Examples ​

ts
engine.map({ panes: [Planner_, Admin_] })   // const Admin_ = pane("admin", { as: Admin, device: "tablet" })
ts
engine.map({ panes: [App, Mail] })           // const Mail = pane("mail", { with: App })

sessionReset? ​

optional sessionReset?: boolean

Defined in: src/engine/flow/map-options.ts:60

This flow wants a fresh browser session (cookies and storage cleared) when it runs after another one, in a CLI chain (waygraph run "a then b") or nested with .flow(sub): a second user signing in, a logged-out check.


ticket? ​

optional ticket?: string

Defined in: src/engine/flow/map-options.ts:22

The ticket or requirement it covers (QA-142).

Inherited from ​

FlowMeta.ticket


timezone? ​

optional timezone?: string

Defined in: src/engine/flow/map-options.ts:98

The time zone the flow runs in (an IANA name): the page's clock and dates follow it; put back when the flow ends. Chromium.

Example ​

ts
engine.map({ timezone: "Asia/Tokyo" })

title? ​

optional title?: string

Defined in: src/engine/flow/map-options.ts:16

The scenario in a line, in the QA's words: "Sign in with a valid account".

Inherited from ​

FlowMeta.title


video? ​

optional video?: string

Defined in: src/engine/flow/map-options.ts:31

Where a recording of it (--video) is saved: one key under the video folder, like an object key, with the tokens {flow}, {title}, {label} (its first), {date}, {time} and {pane}; the last part is the file's name (the extension is added), a name already taken gets -2. Without it, a random name in the video folder.

Example ​

ts
video: "auth/{label}/{title}-{date}"

Inherited from ​

FlowMeta.video

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