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
FlowMeta<Label>
Type Parameters
Label
Label extends string = string
Properties
as?
optionalas?: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
engine.map({ as: Planner }).gotoPage(NavEquipmentBlock)demoPace?
optionaldemoPace?:DemoPace
Defined in: src/engine/flow/map-options.ts:64
Default demo pace for the whole flow.
description?
optionaldescription?: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
device?
optionaldevice?: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
engine.map({ device: { preset: "tablet", orientation: "landscape" } })exclusive?
optionalexclusive?: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?
optionalexpect?: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?
optionalexpectedFailure?: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?
optionalgiven?: 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
given: [SeedTenant, SeedPendingRequest] · given: [signedUpTenant] (a group made with `engine.given`)highlightStyle?
optionalhighlightStyle?:HighlightStyleDefaults
Defined in: src/engine/flow/map-options.ts:66
Default ring tone, size and weight for the whole flow.
homeOrigin?
optionalhomeOrigin?: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?
optionalinput?: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
engine.map({ input: ApiCase }).gotoExternal(NavHoppscotchRestBlock).method(LoadCaseBlock)…labels?
optionallabels?: readonlyLabel[]
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
memStub?
optionalmemStub?:boolean
Defined in: src/engine/flow/map-options.ts:50
Fill missing requires keys from registerMemStub when the flow runs.
network?
optionalnetwork?: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?
optionalfaults?: readonlyFault[]
throttle?
optionalthrottle?:Throttle
"offline" in every browser; the speeds in Chromium.
Example
engine.map({ network: { faults: [{ url: "**/api/orders", status: 500 }] } })owner?
optionalowner?:string
Defined in: src/engine/flow/map-options.ts:24
Who looks after it.
Inherited from
panes?
optionalpanes?: readonlyPane<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
engine.map({ panes: [Planner_, Admin_] }) // const Admin_ = pane("admin", { as: Admin, device: "tablet" })engine.map({ panes: [App, Mail] }) // const Mail = pane("mail", { with: App })sessionReset?
optionalsessionReset?: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?
optionalticket?:string
Defined in: src/engine/flow/map-options.ts:22
The ticket or requirement it covers (QA-142).
Inherited from
timezone?
optionaltimezone?: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
engine.map({ timezone: "Asia/Tokyo" })title?
optionaltitle?: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
video?
optionalvideo?: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
video: "auth/{label}/{title}-{date}"