Skip to content

Deprecated and removed ​

0.16.0 removed every old form instead of keeping it alongside the new one, so there is one way to write each thing. The codemods in waygraph upgrade convert a project; the tables say what replaces what.

Deprecated now (generated) ​

NameKindUse instead
defineLayoutmemberA page covers pages: definePageBlock({ covers: "children", links: (self) => ({ docs: self.link({ to: "Docs", click }) }) }); no separate layout kind. A layout: the UI many pages share. In src/map/<folder>/_layout.block.ts it covers every page in that folder and below (nested layouts stack); on names the pages instead.
defineReadBlockmemberA page's what-it-shows is its read: (definePageBlock({ read: (ctx) => ({ ... }) })), keys as Page.read.x; a layout's is defineLayout({ read }). waygraph upgrade --codemod page-object moves a project.
PageBlockOptions.methodspropertyName them in do: () => ({ addItem: AddItemBlock }). waygraph upgrade --codemod page-object converts a project.
PageBlockOptions.navpropertyGive the page its own url (or click) and from: the page opens itself, map().gotoPage(LoginPage). waygraph upgrade --codemod nav converts a project.
readsmemberA page's read declares its keys as it reads: definePageBlock({ read: (ctx) => ({ title: ctx.page.text("h1") }) }), then Page.read.title. waygraph upgrade --codemod page-object moves a project.
registerMemStubmemberPut the fake value on the key where it is declared: keys("signup")<{ email: string }>({ email: ({ unique }) => \qa+${unique}@example.com` }). waygraph upgrade --codemod mem-stubs` converts a project.

Removed in 0.16.0: flows ​

waygraph upgrade --codemod flows rewrites these onto map() and lists anything it can't convert.

RemovedUse instead
engine.defineFlow([start, …, end], options), start, end, FlowOptionsengine.map({ … }).start().gotoPage(…).method(…).assert(…).end()
chainFlow(a, b)engine.map().start().flow(a).flow(b, { reset: true }).end()
.end(options)Settings in engine.map({ … })
withMemStub, withSessionReset, withExpectedFailure, withDemoPace, withHighlightStyleengine.map({ memStub, sessionReset, expectedFailure, demoPace, highlightStyle })
withTitle(flow, title)ctx.ui.title(title) in a stub on the flow's first step
withBlockPace(block, pace)The step option .method(Block, { pace })
withStubBefore / withStubAfter / withStubOnErrorBlock.stubBefore((ctx) => …) (and stubAfter, stubOnError)
withHighlightFixtures(flow, map), HighlightFixtureMap, WaygraphHighlightFixturectx stubs chained on the Block where the flow uses it: AddItemBlock.stubAfter((ctx) => { ctx.ui.ring(…) })

Removed in 0.16.0: Blocks and Checkpoints ​

waygraph upgrade --codemod checkpoints rewrites tag strings and <In, Out> into Checkpoint values.

RemovedUse instead
checkpoint: "Home" (a tag string) on Nav, NavClick, Page and Assert Blocks; from: ["Home"] on a Navcheckpoint: Home, from: [Home], with export const Home = checkpoint("Home")
defineMethodBlock<In, Out>({ … }) / defineEffectBlock<In, Out>({ … })defineMethodBlock({ from: In, to: Out, … }) (leave from out for "from anywhere")
defineApiBlock without todefineApiBlock({ to: Out, … })
defineActionBlock, ActionBlockdefineMethodBlock, MethodBlock
defineMemEffectBlock, MemEffectBlockdefineMethodBlock, MethodBlock (its requires and instanceOptions)
highlights: [...] on an instruction, a Nav or a Page Block; WaygraphHighlight.stubAfter((ctx) => { ctx.ui.ring(…) })
A stub written as (out) => ({ slot: … }), and per-slot todos(ctx) => { ctx.ui.ring(…); ctx.ui.todos(…) }
ctx.todos([...]) with ctx.todoId / todoTitle / todoStyle / todoPosctx.ui.todos(id, items, { title, style, pos, index }) (codemod flows)
ctx.todoGroups(groups)ctx.ui.todoGroups(id, groups, { title, style, pos })
ctx.banner, ctx.bannerPos, ctx.clearDevice, ctx.clearTodosctx.ui.title, ctx.ui.titlePos, ctx.ui.hideDevice, ctx.ui.hideTodos
ctx.landscape() / ctx.portrait(), ctx.todoDockFull()`ctx.ui.orientation("landscape"
A stub in a Block's definition (defineXBlock({ stubBefore }) or its instruction)Block.stubBefore((ctx) => …) where the flow uses it (codemod flows)
A slot map as a stub (.stubAfter({ email: { selector, label } })), HighlightStubPhaseOrFn.stubAfter((ctx) => { ctx.ui.ring("email", { selector, label }) }) (codemod flows)
ctx.set({...}), a todo item's nameOne call per thing (ctx.ui.ring, ctx.ui.todos, …); id
WAYGRAPH_STEPPER_MINIWAYGRAPH_MINI (--mini)
--no-todo-smart--todo-full
traverse --headed, inject veciro / demosaucetraverse --non-headless, --inject <path> / --inject saucedemo
resolveSlideDwellMs, SLIDE_DURATION_MS_DEFAULT, SLIDE_DURATION_FAST_MS_DEFAULTresolveFixtureDwellMs, FIXTURE_DURATION_MS_DEFAULT, FIXTURE_DURATION_FAST_MS_DEFAULT

Removed in 0.16.9: other spellings of the same value ​

A narration option takes its documented values only; anything else stops the step with the values it takes.

RemovedUse instead
tone error / red, warn / yellow, ok / green, blue, amber / dom / inspect, purple / authored, automation / enginedanger, warning, success, info, orange, planned, auto
size s / small / tiny, l / large / big / xl; weight strong / heavy / bsm, lg; bold
device phone / m, pad / t, desk / d / main; orientation port / tall / p, land / wide / lmobile, tablet, desktop; portrait, landscape
pace ff, quick, careful / review, default / 1x, 2xblitz, fast, slow, normal, 2
todo style seq / steps, check / box, bullet / list / ul / plain; dock side l / rsequential, checklist, bullets; left, right
Upper case or spaces around a value ("Danger ")the value as written above
WAYGRAPH_AUTO_MEMWAYGRAPH_DATA (--data)

Removed in 0.16.9: the hand-written glob matcher ​

--blocks globs are matched by picomatch now (**, *, ?, {a,b}, [abc]).

RemovedUse instead
globToRegExp(glob)matchBlocksSelect(parseBlocksSelect(glob), { relFile }), or picomatch itself

Removed in 0.16.7: the beta entry ​

Read Blocks are part of waygraph now.

RemovedUse instead
import { defineReadBlock, reads, ReadPage, readCheckpoint } from "waygraph/beta"the same names from "waygraph"

Removed in 0.16.7: one key per declaration ​

waygraph upgrade --codemod keys rewrites them into namespaces and updates every use.

RemovedUse instead
const Creds = key<Creds>("saucedemo.credentials")const SaucedemoKeys = keys("saucedemo")<{ credentials: Creds }>(), used as SaucedemoKeys.credentials
keyGroup<T>(name), Creds.key, mem.set(Creds({ ... }))a namespace field: mem.set(SaucedemoKeys.credentials, { ... })

Removed in 0.16.6: the overlay's CSS in code ​

The overlay's look is one stylesheet now (Tailwind, macOS tokens), not CSS strings exported from code.

RemovedUse instead
WAYGRAPH_RING_CSSNothing: every surface that paints a ring installs the overlay's stylesheet, ring included. A tone is ctx.ui.ring(…, { tone }).

Removed in 0.16.3: painting straight on a stub's ctx ​

A stub paints through ctx.ui; ctx itself holds only what a stub reads (mem, out, error). waygraph upgrade --codemod flows moves every call.

RemovedUse instead
ctx.ring(…), ctx.todos(…), ctx.title(…), ctx.caption(…), ctx.device(…), ctx.zoom(…), ctx.slides(…), ctx.showNetworkTab(), … (every painting call)ctx.ui.ring(…), ctx.ui.todos(…), ctx.ui.title(…), …

Removed in 0.16.2: narration in a Block ​

waygraph upgrade --codemod flows moves a Block's slides into ctx.ui.slides in its chained stubAfter, turns ctx.highlights into ctx.ring calls, and unwraps narrate (it lists each caption to move).

RemovedUse instead
slides: [...] on an instruction or defineAssertBlock, WaygraphSlidesOrFnBlock.stubAfter((ctx) => ctx.ui.slides([...])) where the flow uses it (or stubBefore to play them before the step)
slides: (out) => [...].stubAfter((ctx) => ctx.ui.slides(…ctx.out…))
resolveSlides(block)(await runStubPhase(block, "stubAfter", { out })).slides
narrate(locator, caption, () => action) in an actThe action alone in act, and Block.stubBefore((ctx) => ctx.ui.ring("id", { selector, label: caption })) where the flow uses it (a click or fill on that element shows the ring)
ctx.highlights({ a: ring, b: ring })ctx.ui.ring("a", ring); ctx.ui.ring("b", ring);

Removed in 0.16.0: project and CLI ​

RemovedUse instead
A project's own playwright.config.tsconfig/waygraph.config.ts (testDir, webServer, playwright: { … }); waygraph upgrade points one out
package.json "waygraph": { "baseUrl" }baseUrl in config/waygraph.config.ts
waygraph chain <spec>, chain auto A Bwaygraph run --blocks <spec> / demo --blocks, auto --blocks A B
waygraph auto --cli --detachwaygraph browser start [--headless] [--goto <url>], or pilot start
--autoplay / --no-autoplay, --stepper-mini, --no-ff, try auto --headed--auto-next / --no-auto-next, --mini, --ff-disabled, try auto
WAYGRAPH_TODO_UI=legacy / classicWAYGRAPH_TODO_UI=full
create-waygraph (npm)npx waygraph init

Moved in 0.18.0 ​

A page is one object: how it opens (url, from), what it shows (read), what you can do (do), what you can expect (expects). The old forms still run; waygraph upgrade --codemod page-object moves a project (it was tried on two real projects of 70 and 35 pages).

BeforeNow
a page's Read Block (defineReadBlock in _read.block.ts) and its reads("ns")<T>() namespace in _reads.tsread: (ctx) => ({ ... }) on the page, its types inferred; keys are Page.read.field (readAs keeps the name a recorded run used)
a Read Block with no from (a header, the user menu)read on the layout over its folder: Layout.read.field
methods: { addItem: () => AddItem }do: () => ({ addItem: AddItem }); expects: (page) => ({ ... }) is a function of the page too
a Method's verify: [Ns.field.is(1)] on a page its page importsverify: (): Trait[] => [Page.read.field.is(1)]: a function, so the page and the Method can import each other
defineMethodBlock({ instruction: { act, verify, observe, resolve } })defineMethodBlock({ act, verify, lands }): the parts on the Method itself; observe and resolve become one optional lands(page, mem) that returns the Checkpoint (waygraph upgrade --codemod instructions)
a page's Nav Block in _nav.block.ts (nav: NavHomeBlock, Home.nav)the page opens itself: url (or click) and from on its definePageBlock, and map().gotoPage(Home) (waygraph upgrade --codemod nav)
registerMemStub(key, fake) in a *.mem-stubs.ts filethe fake on the key: keys("ns")<{…}>({ field: () => value }) (waygraph upgrade --codemod mem-stubs)
defineLayout in a _layout.block.tsa page that covers pages: definePageBlock({ covers: "children", links: (self) => ({ … self.link({ to, click }) }), read, interrupts }); Layout.go.x is Page.links.x

Removed in 0.18.3: loose selector helpers ​

RemovedUse instead
css(raw), byText(text, { within, contains }), byRole(role, opts) (strings, any role)sel.css, sel.text(text, { exact }), sel.role(role, options) and sel.within(parent, child): typed from Playwright's getBy…, so a wrong role or option is a compile error. sel.text ignores case and matches a substring unless exact: true, as getByText does

Removed in 0.18.3: generated page names ​

RemovedUse instead
waygraph types and src/waygraph-pages.d.ts (the global WaygraphPages, PageName as a union of the project's pages)nothing to run or commit: to, covers and from take any string, and waygraph check / typecheck name a page that no Page Block makes, with the one it probably meant. Delete the file (check says so)

Removed in 0.17.0 ​

RemovedUse instead
waygraph ui (Waygraph UI)waygraph studio (Waygraph Studio): the same app, renamed; the repo's ui/ is studio/, npm run ui is npm run studio
map({ panes: { name: {…} } }), .in("name"), .close("name"), with: "name" (panes by string, the split view's first form)a pane is a value: const Guest = pane("guest", { as: ProblemUser }), then map({ panes: [Main, Guest] }), .in(Guest), .close(Guest), with: Main

Removed in 0.16.19 ​

RemovedUse instead
map({ viewport: { width, height } })map({ device: { width, height } }), or a device by name and orientation: map({ device: { preset: "tablet", orientation: "landscape" } })
waygraph extensions installwaygraph install: the extensions, and everything else the config requires (browsers, the demo's voice, .env entries)

Removed in 0.16.16 ​

An Effect Block was a Method that also listed the rows it could act on; a Method lists them the same way. waygraph upgrade --codemod effect converts a project.

RemovedUse instead
defineEffectBlock, EffectBlockdefineMethodBlock, MethodBlock, with the same requires and instanceOptions
EffectExtrasthe Method's own requires and instanceOptions fields
*.effect.block.ts files*.method.block.ts (the codemod renames them and their imports)
the effect kind (manifest, run log)method

Removed in 0.16.11 ​

RemovedUse instead
MapStartStart, a value and a type: from: Start, to: Start, Block<Start, Home>
.start(), .end() on a map() chainNothing: the chain is the flow (waygraph upgrade --codemod chain).
defineAssertBlock, AssertBlock, AssertBlockOptionsdefineExpectBlock, ExpectBlock, ExpectBlockOptions (waygraph upgrade --codemod expect)
.assert(Block) step{ expect: [Block] } on the step it judges (the codemod folds them in)
.expect(key, want) step{ expect: [key.is(want)] } / key.passes(test) on the step
Trait.read(key, test, wants)key.passes(test, wants) (and key.is(value))
defineLayout (a shared list of expectations), EngineConfig.layouts, RunGraphOptions.layoutsan Expect Block (or a shared list of them) in the expect of each Block that lands on those pages: what runs is what the flow says. Since 0.16.21 defineLayout is the UI many pages share (Layouts)

Style ​

Not API, but the convention the tools and docs assume.

Instead ofWrite
Stubs written inside Block filesStubs in the flow. Blocks carry no narration.
new Engine() in every flowimport { engine } from "../../config/waygraph.config.js" (built from the loaded config).
act(){} plus an observe that writes memRead into mem inside act. observe is only for a Block that branches.
checkpoint("__start__"), Checkpoint<"__start__">import { Start } from "waygraph" (waygraph check points them out).
import "…/_page.block.js" or import "…/x.mem-stubs.js" in a flow, for its side effectNothing: the tools load every Block and mem stub file themselves.
One import per Block a flow usesOne per page: HomePage.nav, HomePage.do.addItem (a Page Block's nav and methods; waygraph upgrade --codemod pages).
seedMemStub(mem, flow) before flow.run()memStub: true on the Engine (or the map()): the flow fills missing keys when it runs.
const Saved = Block as MethodBlock<A, B>.method(Block, { lands: B }) (waygraph upgrade --codemod lands).
Block.stubAfter(fn)Block.stub(fn) (narration after the step lands; .stubBefore and .stubOnError stay; waygraph upgrade --codemod stub).
{ ff: true } on three or more steps in a row.ffStart() … .ffEnd() (waygraph upgrade --codemod ff).
Page.read.x.passes((x, mem) => …, "why")Page.check("why", ({ x }, mem) => …): one primitive that gets everything the page shows and says true or false (waygraph upgrade --codemod checks). Key.is(want) stays.

Releases ​

0.15.49 and 0.15.50 were published with local logs in the tarball and are deprecated on npm; use 0.15.52 or later.

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