Skip to content

Interface: TermwrightMatchers

@termwright/test


@termwright/test / TermwrightMatchers

Defined in: test/src/matchers.ts:92

The matchers this package adds to expect.

R = unknown

toBeAttached(options?): R

Defined in: test/src/matchers.ts:97

PollOptions

R


toBeChecked(options?): R

Defined in: test/src/matchers.ts:116

PollOptions

R


toBeDetached(options?): R

Defined in: test/src/matchers.ts:98

PollOptions

R


toBeDisabled(options?): R

Defined in: test/src/matchers.ts:115

PollOptions

R


toBeDisplayed(options?): R

Defined in: test/src/matchers.ts:99

PollOptions

R


toBeEnabled(options?): R

Defined in: test/src/matchers.ts:114

PollOptions

R


toBeExpanded(options?): R

Defined in: test/src/matchers.ts:118

PollOptions

R


toBeFocused(options?): R

Defined in: test/src/matchers.ts:113

The locator resolves to the node carrying state.focused.

PollOptions

R


toBeHidden(options?): R

Defined in: test/src/matchers.ts:100

PollOptions

R


toBeInViewport(options?): R

Defined in: test/src/matchers.ts:102

PollOptions & object

R


toBeOffscreen(options?): R

Defined in: test/src/matchers.ts:101

PollOptions

R


toBeSelected(options?): R

Defined in: test/src/matchers.ts:117

PollOptions

R


toBeVisible(options?): R

Defined in: test/src/matchers.ts:96

The locator resolves to a node that is on screen and not hidden.

PollOptions

R


toHaveBounds(expected, options?): R

Defined in: test/src/matchers.ts:104

BoundsExpectation

PollOptions & object

R


toHaveCount(expected, options?): R

Defined in: test/src/matchers.ts:94

Retry until the locator matches exactly this many elements, retaining its selector.

number

PollOptions

R


toHaveExtendedState(expected, options?): R

Defined in: test/src/matchers.ts:123

Every listed application-domain key deep-equals the expected JSON value.

SemanticExtendedObject

PollOptions

R


toHaveLogged(query, options?): R

Defined in: test/src/matchers.ts:131

The program logged an entry matching the query.

LogQuery

PollOptions

R


toHaveSpatialRelation(expected, options?): R

Defined in: test/src/matchers.ts:108

SpatialRelationExpectation

PollOptions & object

R


toHaveState(expected, options?): R

Defined in: test/src/matchers.ts:121

Every listed state key holds; unlisted keys are not constrained.

Partial<SemanticState>

PollOptions

R


toHaveText(expected, options?): R

Defined in: test/src/matchers.ts:125

Accessible text of a locator, or the visible grid of a terminal.

string | RegExp

TextMatcherOptions

R


toHaveValue(expected, options?): R

Defined in: test/src/matchers.ts:119

string | RegExp

TextMatcherOptions

R


toMatchCellSnapshot(expected?, options?): R

Defined in: test/src/matchers.ts:127

Framed rendering of the visible grid, inline or from __snapshots__.

string

CellSnapshotMatcherOptions

R


toMatchSemanticSnapshot(expected?, options?): R

Defined in: test/src/matchers.ts:129

Semantic tree as YAML, matched partially (/CONTRACTS.md §YAML).

string

SemanticSnapshotMatcherOptions

R


toReceivePointerEvents(options?): R

Defined in: test/src/matchers.ts:103

PollOptions

R