Interface: TermwrightMatchers
@termwright/test / TermwrightMatchers
Interface: TermwrightMatchers<R>
Section titled “Interface: TermwrightMatchers<R>”Defined in: test/src/matchers.ts:92
The matchers this package adds to expect.
Type Parameters
Section titled “Type Parameters”R = unknown
Methods
Section titled “Methods”toBeAttached()
Section titled “toBeAttached()”toBeAttached(
options?):R
Defined in: test/src/matchers.ts:97
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toBeChecked()
Section titled “toBeChecked()”toBeChecked(
options?):R
Defined in: test/src/matchers.ts:116
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toBeDetached()
Section titled “toBeDetached()”toBeDetached(
options?):R
Defined in: test/src/matchers.ts:98
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toBeDisabled()
Section titled “toBeDisabled()”toBeDisabled(
options?):R
Defined in: test/src/matchers.ts:115
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toBeDisplayed()
Section titled “toBeDisplayed()”toBeDisplayed(
options?):R
Defined in: test/src/matchers.ts:99
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toBeEnabled()
Section titled “toBeEnabled()”toBeEnabled(
options?):R
Defined in: test/src/matchers.ts:114
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toBeExpanded()
Section titled “toBeExpanded()”toBeExpanded(
options?):R
Defined in: test/src/matchers.ts:118
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toBeFocused()
Section titled “toBeFocused()”toBeFocused(
options?):R
Defined in: test/src/matchers.ts:113
The locator resolves to the node carrying state.focused.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toBeHidden()
Section titled “toBeHidden()”toBeHidden(
options?):R
Defined in: test/src/matchers.ts:100
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toBeInViewport()
Section titled “toBeInViewport()”toBeInViewport(
options?):R
Defined in: test/src/matchers.ts:102
Parameters
Section titled “Parameters”options?
Section titled “options?”PollOptions & object
Returns
Section titled “Returns”R
toBeOffscreen()
Section titled “toBeOffscreen()”toBeOffscreen(
options?):R
Defined in: test/src/matchers.ts:101
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toBeSelected()
Section titled “toBeSelected()”toBeSelected(
options?):R
Defined in: test/src/matchers.ts:117
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toBeVisible()
Section titled “toBeVisible()”toBeVisible(
options?):R
Defined in: test/src/matchers.ts:96
The locator resolves to a node that is on screen and not hidden.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toHaveBounds()
Section titled “toHaveBounds()”toHaveBounds(
expected,options?):R
Defined in: test/src/matchers.ts:104
Parameters
Section titled “Parameters”expected
Section titled “expected”BoundsExpectation
options?
Section titled “options?”PollOptions & object
Returns
Section titled “Returns”R
toHaveCount()
Section titled “toHaveCount()”toHaveCount(
expected,options?):R
Defined in: test/src/matchers.ts:94
Retry until the locator matches exactly this many elements, retaining its selector.
Parameters
Section titled “Parameters”expected
Section titled “expected”number
options?
Section titled “options?”Returns
Section titled “Returns”R
toHaveExtendedState()
Section titled “toHaveExtendedState()”toHaveExtendedState(
expected,options?):R
Defined in: test/src/matchers.ts:123
Every listed application-domain key deep-equals the expected JSON value.
Parameters
Section titled “Parameters”expected
Section titled “expected”SemanticExtendedObject
options?
Section titled “options?”Returns
Section titled “Returns”R
toHaveLogged()
Section titled “toHaveLogged()”toHaveLogged(
query,options?):R
Defined in: test/src/matchers.ts:131
The program logged an entry matching the query.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R
toHaveSpatialRelation()
Section titled “toHaveSpatialRelation()”toHaveSpatialRelation(
expected,options?):R
Defined in: test/src/matchers.ts:108
Parameters
Section titled “Parameters”expected
Section titled “expected”SpatialRelationExpectation
options?
Section titled “options?”PollOptions & object
Returns
Section titled “Returns”R
toHaveState()
Section titled “toHaveState()”toHaveState(
expected,options?):R
Defined in: test/src/matchers.ts:121
Every listed state key holds; unlisted keys are not constrained.
Parameters
Section titled “Parameters”expected
Section titled “expected”Partial<SemanticState>
options?
Section titled “options?”Returns
Section titled “Returns”R
toHaveText()
Section titled “toHaveText()”toHaveText(
expected,options?):R
Defined in: test/src/matchers.ts:125
Accessible text of a locator, or the visible grid of a terminal.
Parameters
Section titled “Parameters”expected
Section titled “expected”string | RegExp
options?
Section titled “options?”Returns
Section titled “Returns”R
toHaveValue()
Section titled “toHaveValue()”toHaveValue(
expected,options?):R
Defined in: test/src/matchers.ts:119
Parameters
Section titled “Parameters”expected
Section titled “expected”string | RegExp
options?
Section titled “options?”Returns
Section titled “Returns”R
toMatchCellSnapshot()
Section titled “toMatchCellSnapshot()”toMatchCellSnapshot(
expected?,options?):R
Defined in: test/src/matchers.ts:127
Framed rendering of the visible grid, inline or from __snapshots__.
Parameters
Section titled “Parameters”expected?
Section titled “expected?”string
options?
Section titled “options?”Returns
Section titled “Returns”R
toMatchSemanticSnapshot()
Section titled “toMatchSemanticSnapshot()”toMatchSemanticSnapshot(
expected?,options?):R
Defined in: test/src/matchers.ts:129
Semantic tree as YAML, matched partially (/CONTRACTS.md §YAML).
Parameters
Section titled “Parameters”expected?
Section titled “expected?”string
options?
Section titled “options?”SemanticSnapshotMatcherOptions
Returns
Section titled “Returns”R
toReceivePointerEvents()
Section titled “toReceivePointerEvents()”toReceivePointerEvents(
options?):R
Defined in: test/src/matchers.ts:103
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”R