externalEnsureEventually <Actual>
experimental
Hierarchy
- Interaction
- EnsureEventually
Index
Constructors
externalconstructor
Type parameters
- Actual
Parameters
externalactual: Answerable<Actual>
externalexpectation: Expectation<Actual>
externallocation: FileSystemLocation
externaloptionaltimeout: Duration
Returns EnsureEventually<Actual>
Methods
externaltimeoutAfter
Override the default timeout set via
SerenityConfig.interactionTimeout
.Parameters
externaltimeout: Duration
Returns EnsureEventually<Actual>
externalperformAs
Parameters
externalactor: UsesAbilities & AnswersQuestions & CollectsArtifacts
Returns Promise<void>
externalotherwiseFailWith
Overrides the default
AssertionError
thrown when the actual value does not meet the expectation.Parameters
externaltypeOfRuntimeError: new (message: string, cause?: Error) => RuntimeError
A constructor function producing a subtype of
RuntimeError
to throw, e.g.TestCompromisedError
externaloptionalmessage: string
The message explaining the failure
Returns Interaction
externalinstantiationLocation
Returns the location where this
Activity
was instantiated.Returns FileSystemLocation
externaldescribedBy
Resolves the description of this object in the context of the provided
actor
.Parameters
externalactor: AnswersQuestions & UsesAbilities & { name: string }
Returns Promise<string>
externaltoString
Returns a human-readable description of this object.
Returns string
The interaction to
EnsureEventually
verifies if the resolved value of the providedAnswerable
meets the specifiedExpectation
within the expected timeframe.If the expectation is not met by the time the timeout expires, the interaction throws an
AssertionError
.EnsureEventually
retries the evaluation if resolving theactual
results in anListItemNotFoundError
, but rethrows any other errors.Use the factory method [
Ensure.eventually
](/api/assertions/class/Ensure/#eventually] to instantiate this interaction.Basic usage with dynamic values
Composing expectations with
and
Overriding the type of Error thrown upon assertion failure