Skip to main content
Semantic assertions must be enabled for your workspace. Ask your QA Wolf team to turn them on. They aren’t available to workspaces whose AI data policy restricts provider data retention.
To assert on what an element’s text means rather than its exact wording, use ai.expect(...).toSatisfy(...) from @qawolf/ai/web.
  • statement — the requirement the element’s text must satisfy
  • options — optional object, see Key options below

Examples

Assert on the meaning of a reply
Pass the original request as context
Assert that text doesn’t say something
Wait for a streamed reply to finish
Wait for the app’s completion signal before asserting on streamed text. toSatisfy retries until the statement holds, so it can pass on a partial response.

When to use

  • Your app shows AI-generated text, such as chat replies or summaries, whose wording changes between runs.
  • The requirement is what the text means, not the exact words.
  • An exact-match assertion would need to list every acceptable phrasing.
Avoid toSatisfy for required copy, numbers, IDs, and formats, or to prove what the app did, such as saving a record. Use an exact expect assertion instead.

Key options

Notes

  • ai.expect offers only toSatisfy and .not.toSatisfy. Use expect from @qawolf/flows/web for every other matcher.
  • The locator must match exactly one element. toSatisfy reads its text, not its visibility or input value, so add toBeVisible() when visibility matters.
  • An uncertain judgment or an evaluator error fails both toSatisfy and .not.toSatisfy. Treat an inconclusive result as a failure to investigate, not a reason to lower the threshold.
  • Semantic assertions run in web flows, in the editor and in triggered runs. They aren’t available in iOS, Android, or local execution.
  • QA Wolf evaluates each assertion with TypeSafe’s Jev model, so flows need no API key.
  • When semantic assertions are enabled, the QA Wolf agent uses them for generated text in the flows it writes.

Full sample test

Last modified on September 25, 2026