@serenity-js/core
Version:
The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure
40 lines • 2.19 kB
TypeScript
import { FileSystemLocation } from '../io';
import type { UsesAbilities } from './abilities';
import type { PerformsActivities } from './activities';
import type { Answerable } from './Answerable';
import type { AnswersQuestions } from './questions/AnswersQuestions';
import { Describable } from './questions/Describable';
/**
* **Activities** represents [tasks](https://serenity-js.org/api/core/class/Task/) and [interactions](https://serenity-js.org/api/core/class/Interaction/) to be performed by an [actor](https://serenity-js.org/api/core/class/Actor/).
*
* Learn more about:
* - [Performing activities at multiple levels](https://serenity-js.org/handbook/design/screenplay-pattern#performing-activities-at-multiple-levels)
* - [`Actor`](https://serenity-js.org/api/core/class/Actor/)
* - [`PerformsActivities`](https://serenity-js.org/api/core/interface/PerformsActivities/)
* - [Command design pattern on Wikipedia](https://en.wikipedia.org/wiki/Command_pattern)
*
* @group Screenplay Pattern
*/
export declare abstract class Activity extends Describable {
#private;
private static errorStackParser;
constructor(description: Answerable<string>, location?: FileSystemLocation);
/**
* Returns the location where this [`Activity`](https://serenity-js.org/api/core/class/Activity/) was instantiated.
*/
instantiationLocation(): FileSystemLocation;
/**
* Instructs the provided [`Actor`](https://serenity-js.org/api/core/class/Actor/) to perform this [`Activity`](https://serenity-js.org/api/core/class/Activity/).
*
* @param actor
*
* #### Learn more
* - [`Actor`](https://serenity-js.org/api/core/class/Actor/)
* - [`PerformsActivities`](https://serenity-js.org/api/core/interface/PerformsActivities/)
* - [`UsesAbilities`](https://serenity-js.org/api/core/interface/UsesAbilities/)
* - [`AnswersQuestions`](https://serenity-js.org/api/core/interface/AnswersQuestions/)
*/
abstract performAs(actor: PerformsActivities | UsesAbilities | AnswersQuestions): Promise<any>;
protected static callerLocation(frameOffset: number): FileSystemLocation;
}
//# sourceMappingURL=Activity.d.ts.map