waygraph / defineExpectBlock
Function: defineExpectBlock()
defineExpectBlock<
Out>(options):ExpectBlock<Out>
Defined in: src/engine/block/kinds/expect.ts:52
Declares what a scenario expects on a page, as a named Block: reusable, shown by the demo and the UI. It only reads: it stays on checkpoint, and its checks may not click, type, navigate or set mem.
Type Parameters
Out
Out extends Checkpoint<string>
Parameters
options
ExpectBlockOptions<Out>
Returns
ExpectBlock<Out>
Example
ts
export const ExpectArchivedToastBlock = defineExpectBlock({
name: "expect-archived-toast",
description: "The toast says the machine was archived.",
checkpoint: Registry,
verify: [Trait.text(RegistrySel.toast, "Equipment archived")],
});