Skip to content

Matchers reference

Every row of tflw's closed matcher set — generated from packages/lang/src/spec-data.ts, the same manifest that regenerates SPEC.md §6.2. not negates any of them, and is is an optional copula that may sit on either side of it — so is not visible, not is visible, is visible and not visible all parse. Every matcher operand below takes the full value grammar, not just literals: has count {expected} works exactly like equals {expected}. See Assertions in depth for the full walkthrough.

any value

expect status equals 201

stringsarrays

expect body.msg contains "created"

strings

expect header "content-type" matches "json"

objects

expect body matches subset { type: "about:blank", status: 422 }

objects

expect body matches schema "ProductResponseDto" from "/openapi.json"

body bytes

expect body bytes matches file "expected-receipt.pdf"

numbersduration

expect body.total is less than 100

arraysUI listsbody bytes

expect body.items has count 3

arraysUI listsbody bytes

expect body.items has count at least 1

arraysUI listsbody bytes

expect body.items has count at most 50

stringsarraysobjects

expect body.errors is empty

UI fields

expect field "Email" has value "a@b.c"

is visible/hidden/enabled/disabled/checked

Section titled “is visible/hidden/enabled/disabled/checked”

UI locators

expect button "Pay" is enabled

request

expect request connects

request

expect request fails matching "certificate"

request to "<url>"

expect request to "/api/orders" was made

has no [minor/moderate/serious/critical] a11y violations

Section titled “has no [minor/moderate/serious/critical] a11y violations”

page

expect page has no critical a11y violations

has no [minor/moderate/serious/critical] security violations

Section titled “has no [minor/moderate/serious/critical] security violations”

response

expect response has no serious security violations

has no [minor/moderate/serious/critical] authorization violations

Section titled “has no [minor/moderate/serious/critical] authorization violations”

response

expect response has no authorization violations

has no [minor/moderate/serious/critical] input handling violations

Section titled “has no [minor/moderate/serious/critical] input handling violations”

response

expect response has no input handling violations

matches snapshot "<name>" [mask <locator>]*

Section titled “matches snapshot "<name>" [mask <locator>]*”

pageUI locators

expect page matches snapshot "checkout-page" mask css ".timestamp"