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​
Properties​
postcondition​
readonlypostcondition:string
Defined in: packages/core/src/errors/PostconditionNotMetError.ts:27
Inherited members (6)
Properties​
cause?​
optionalcause?:unknown
Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24
Inherited from​
driverName​
readonlydriverName:string
Defined in: packages/core/src/errors/ErrorBase.ts:13
Inherited from​
message​
message:
string
Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
Inherited from​
name​
name:
string
Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074
Inherited from​
stack?​
optionalstack?:string
Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from​
Methods​
isError()​
staticisError(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