Returns the last Actor instantiated via Stage.actor. Useful when you don’t can’t or choose not to reference the actor by their name.
Notifies all the assigned listeners of the events, emitting them one by one.
Returns current time. This method should be used whenever DomainEvent objects are instantiated by you programmatically.
Generates and remembers a CorrelationId for the current scene.
This method should be used in custom test runner adapters when instantiating a SceneStarts event.
Generates and remembers a CorrelationId for the current Activity.
This method should be used in custom test runner adapters when instantiating the ActivityStarts event.
Returns a Promise that will be resolved when any asynchronous post-processing activities performed by Serenity/JS are completed.
Invoked in Serenity/JS test runner adapters to inform the test runner when the scenario has finished and when it’s safe for the test runner to proceed with the next test, or finish execution.
- RE: RuntimeError<RE>
errorType: new (...args: any) => RE
Stage is the place where actors perform.
In more technical terms, the Stage is the main event bus propagating DomainEvents to Actors it instantiates and StageCrewMembers that have been registered with it.
It is unlikely that you’ll ever need to interact with the
Stagedirectly in your tests. Instead, you’ll use functions like actorCalled and actorInTheSpotlight.