Skip to main content

Class: PostconditionNotMetError

Defined in: packages/core/src/errors/PostconditionNotMetError.ts:26

Thrown when a driver action's own postcondition did not hold within its timeout — see ComponentDriver.awaitPostcondition.

This error exists to make an unmet postcondition loud at its cause. The alternative — letting the action resolve anyway — surfaces later as a baffling read result (Expected: "Banana" / Received: null) attributed to the assertion rather than to the action that never finished, which is exactly the diagnosis cost this class removes.

Per ADR-010 it retains only the serializable driverName inherited from ErrorBase plus the human-readable postcondition description — never a live driver, locator, or probe.

Param​

driver

Anything name-bearing (a driver satisfies { driverName }); only its driverName is retained.

Param​

postcondition

Human-readable description of what was awaited, phrased as the state that failed to arrive (e.g. "selectByLabel('Banana'): the dropdown to close with the selection committed").

Param​

timeoutMs

How long it was awaited before giving up.

Extends​

Constructors​

Constructor​

new PostconditionNotMetError(driver, postcondition, timeoutMs): PostconditionNotMetError

Defined in: packages/core/src/errors/PostconditionNotMetError.ts:29

Parameters​

driver​
driverName​

string

postcondition​

string

timeoutMs​

number

Returns​

PostconditionNotMetError

Overrides​

ErrorBase.constructor

Properties​

postcondition​

readonly postcondition: string

Defined in: packages/core/src/errors/PostconditionNotMetError.ts:27

Inherited members (6)

Properties​

cause?​

optional cause?: unknown

Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24

Inherited from​

ErrorBase.cause


driverName​

readonly driverName: string

Defined in: packages/core/src/errors/ErrorBase.ts:13

Inherited from​

ErrorBase.driverName


message​

message: string

Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from​

ErrorBase.message


name​

name: string

Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074

Inherited from​

ErrorBase.name


stack?​

optional stack?: string

Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from​

ErrorBase.stack

Methods​

isError()​

static isError(error): error is Error

Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.error.d.ts:21

Indicates whether the argument provided is a built-in Error instance or not.

Parameters​
error​

unknown

Returns​

error is Error

Inherited from​

ErrorBase.isError