import {Actor} from '@serenity-js/core/lib/screenplay/actor'
public class | source

Static Method Summary

Static Public Methods
public static

named(name: *): {"whoCan": *}

this method was deprecated.

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

abilityTo(doSomething: AbilityType): T

public

answer(answerable: Answerable<T>): Promise<T>

public

attemptsTo(activities: UNKNOWN): Promise

public

collect(artifact: Artifact, name: string | Name)

Announce collection of an Artifact so that it can be picked up by a StageCrewMember.

public

nameFrom(maybeName: string | Name): Name

Instantiates a Name based on the string value of the parameter, or returns the argument if it's already an instance of Name.

public

notifyOf(event: DomainEvent): void

public

toString(): string

public

whoCan(abilities: UNKNOWN): Actor

Static Public Methods

public static named(name: *): {"whoCan": *} source

this method was deprecated.

Params:

NameTypeAttributeDescription
name *

Returns:

{"whoCan": *}

Public Constructors

public constructor() source

Public Methods

public abilityTo(doSomething: AbilityType): T source

Params:

NameTypeAttributeDescription
doSomething AbilityType

Returns:

T

public answer(answerable: Answerable<T>): Promise<T> source

Params:

NameTypeAttributeDescription
answerable Answerable<T>

a Question<Promise<T>>, Question<T>, Promise<T> or T

Returns:

Promise<T>

The answer to the Answerable

public attemptsTo(activities: UNKNOWN): Promise source

Params:

NameTypeAttributeDescription
activities UNKNOWN

Returns:

Promise

public collect(artifact: Artifact, name: string | Name) source

Announce collection of an Artifact so that it can be picked up by a StageCrewMember.

Params:

NameTypeAttributeDescription
artifact Artifact
name string | Name
  • nullable: true

public nameFrom(maybeName: string | Name): Name source

Instantiates a Name based on the string value of the parameter, or returns the argument if it's already an instance of Name.

Params:

NameTypeAttributeDescription
maybeName string | Name

Returns:

Name

public notifyOf(event: DomainEvent): void source

Params:

NameTypeAttributeDescription
event DomainEvent

Returns:

void

public toString(): string source

Returns:

string

public whoCan(abilities: UNKNOWN): Actor source

Params:

NameTypeAttributeDescription
abilities UNKNOWN

Returns:

Actor