@serenity-js/core 3.25.0 → 3.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +1 -1
- package/lib/Serenity.d.ts +22 -22
- package/lib/Serenity.js +22 -22
- package/lib/adapter/OutputStream.d.ts +5 -4
- package/lib/adapter/OutputStream.d.ts.map +1 -1
- package/lib/adapter/TestRunnerAdapter.d.ts +2 -2
- package/lib/config/ClassDescription.d.ts +1 -1
- package/lib/config/SerenityConfig.d.ts +22 -20
- package/lib/config/SerenityConfig.d.ts.map +1 -1
- package/lib/config/SerenityConfig.js +22 -20
- package/lib/config/SerenityConfig.js.map +1 -1
- package/lib/errors/ErrorFactory.d.ts +2 -1
- package/lib/errors/ErrorFactory.d.ts.map +1 -1
- package/lib/errors/ErrorFactory.js +2 -1
- package/lib/errors/ErrorFactory.js.map +1 -1
- package/lib/errors/RaiseErrors.d.ts +9 -9
- package/lib/errors/RaiseErrors.js +9 -9
- package/lib/errors/diff/AnsiDiffFormatter.d.ts +1 -1
- package/lib/errors/diff/AnsiDiffFormatter.js +1 -1
- package/lib/errors/diff/DiffFormatter.d.ts +1 -1
- package/lib/errors/diff/NoOpDiffFormatter.d.ts +1 -1
- package/lib/errors/diff/NoOpDiffFormatter.js +1 -1
- package/lib/errors/model/AssertionError.d.ts +1 -1
- package/lib/errors/model/AssertionError.js +1 -1
- package/lib/errors/model/ConfigurationError.d.ts +1 -1
- package/lib/errors/model/ConfigurationError.js +1 -1
- package/lib/errors/model/ImplementationPendingError.d.ts +3 -3
- package/lib/errors/model/ImplementationPendingError.js +3 -3
- package/lib/errors/model/ListItemNotFoundError.d.ts +2 -2
- package/lib/errors/model/ListItemNotFoundError.js +2 -2
- package/lib/errors/model/LogicError.d.ts +2 -2
- package/lib/errors/model/LogicError.js +2 -2
- package/lib/errors/model/OperationInterruptedError.d.ts +2 -2
- package/lib/errors/model/OperationInterruptedError.js +2 -2
- package/lib/errors/model/RuntimeError.d.ts +2 -2
- package/lib/errors/model/RuntimeError.js +2 -2
- package/lib/errors/model/TestCompromisedError.d.ts +1 -1
- package/lib/errors/model/TestCompromisedError.js +1 -1
- package/lib/errors/model/TimeoutExpiredError.d.ts +2 -2
- package/lib/errors/model/TimeoutExpiredError.js +2 -2
- package/lib/errors/model/UnknownError.d.ts +1 -1
- package/lib/errors/model/UnknownError.js +1 -1
- package/lib/events/ActivityFinished.d.ts +1 -1
- package/lib/events/ActivityFinished.js +1 -1
- package/lib/events/ActivityStarts.d.ts +1 -1
- package/lib/events/ActivityStarts.js +1 -1
- package/lib/events/BusinessRuleDetected.d.ts +1 -1
- package/lib/events/BusinessRuleDetected.js +1 -1
- package/lib/events/SceneFinishes.d.ts +2 -1
- package/lib/events/SceneFinishes.d.ts.map +1 -1
- package/lib/events/SceneFinishes.js +2 -1
- package/lib/events/SceneFinishes.js.map +1 -1
- package/lib/instance.d.ts +30 -30
- package/lib/instance.js +30 -30
- package/lib/io/format.d.ts +15 -6
- package/lib/io/format.d.ts.map +1 -1
- package/lib/io/format.js +15 -6
- package/lib/io/format.js.map +1 -1
- package/lib/io/loader/ModuleLoader.d.ts +1 -1
- package/lib/io/loader/ModuleLoader.js +1 -1
- package/lib/io/reflection/ValueInspector.d.ts +1 -1
- package/lib/io/reflection/ValueInspector.js +2 -2
- package/lib/io/reflection/ValueInspector.js.map +1 -1
- package/lib/io/stringified.d.ts +1 -1
- package/lib/io/stringified.js +1 -1
- package/lib/io/trimmed.d.ts +1 -1
- package/lib/io/trimmed.js +1 -1
- package/lib/model/artifacts/HTTPRequestResponse.d.ts +2 -2
- package/lib/model/artifacts/HTTPRequestResponse.js +1 -1
- package/lib/screenplay/Activity.d.ts +10 -10
- package/lib/screenplay/Activity.js +5 -5
- package/lib/screenplay/Actor.d.ts +28 -28
- package/lib/screenplay/Actor.js +28 -28
- package/lib/screenplay/Answerable.d.ts +1 -1
- package/lib/screenplay/Answered.d.ts +2 -2
- package/lib/screenplay/Interaction.d.ts +17 -17
- package/lib/screenplay/Interaction.js +12 -12
- package/lib/screenplay/Optional.d.ts +1 -1
- package/lib/screenplay/Question.d.ts +48 -45
- package/lib/screenplay/Question.d.ts.map +1 -1
- package/lib/screenplay/Question.js +39 -36
- package/lib/screenplay/Question.js.map +1 -1
- package/lib/screenplay/RecursivelyAnswered.d.ts +2 -2
- package/lib/screenplay/Task.d.ts +19 -19
- package/lib/screenplay/Task.js +15 -15
- package/lib/screenplay/WithAnswerableProperties.d.ts +2 -2
- package/lib/screenplay/abilities/Ability.d.ts +48 -46
- package/lib/screenplay/abilities/Ability.d.ts.map +1 -1
- package/lib/screenplay/abilities/Ability.js +48 -46
- package/lib/screenplay/abilities/Ability.js.map +1 -1
- package/lib/screenplay/abilities/AbilityType.d.ts +5 -5
- package/lib/screenplay/abilities/AnswerQuestions.d.ts +3 -3
- package/lib/screenplay/abilities/AnswerQuestions.js +3 -3
- package/lib/screenplay/abilities/CanHaveAbilities.d.ts +4 -4
- package/lib/screenplay/abilities/Discardable.d.ts +8 -8
- package/lib/screenplay/abilities/Initialisable.d.ts +11 -11
- package/lib/screenplay/abilities/PerformActivities.d.ts +3 -3
- package/lib/screenplay/abilities/PerformActivities.js +3 -3
- package/lib/screenplay/abilities/UsesAbilities.d.ts +6 -6
- package/lib/screenplay/activities/PerformsActivities.d.ts +7 -7
- package/lib/screenplay/artifacts/CollectsArtifacts.d.ts +4 -5
- package/lib/screenplay/artifacts/CollectsArtifacts.d.ts.map +1 -1
- package/lib/screenplay/debugging/Debug.d.ts +7 -6
- package/lib/screenplay/debugging/Debug.d.ts.map +1 -1
- package/lib/screenplay/debugging/Debug.js +7 -6
- package/lib/screenplay/debugging/Debug.js.map +1 -1
- package/lib/screenplay/debugging/DebuggingResult.d.ts +1 -1
- package/lib/screenplay/debugging/Log.d.ts +7 -5
- package/lib/screenplay/debugging/Log.d.ts.map +1 -1
- package/lib/screenplay/debugging/Log.js +7 -5
- package/lib/screenplay/debugging/Log.js.map +1 -1
- package/lib/screenplay/notes/Notepad.d.ts +13 -13
- package/lib/screenplay/notes/Notepad.js +13 -13
- package/lib/screenplay/notes/NotepadAdapter.d.ts +16 -16
- package/lib/screenplay/notes/NotepadAdapter.js +16 -16
- package/lib/screenplay/notes/TakeNotes.d.ts +9 -9
- package/lib/screenplay/notes/TakeNotes.js +9 -9
- package/lib/screenplay/notes/notes.d.ts +6 -6
- package/lib/screenplay/notes/notes.js +6 -6
- package/lib/screenplay/questions/AnswersQuestions.d.ts +4 -4
- package/lib/screenplay/questions/ChainableMetaQuestion.d.ts +6 -6
- package/lib/screenplay/questions/Check.d.ts +2 -2
- package/lib/screenplay/questions/Check.js +2 -2
- package/lib/screenplay/questions/DescriptionFormattingOptions.d.ts +2 -2
- package/lib/screenplay/questions/Expectation.d.ts +17 -14
- package/lib/screenplay/questions/Expectation.d.ts.map +1 -1
- package/lib/screenplay/questions/Expectation.js +17 -14
- package/lib/screenplay/questions/Expectation.js.map +1 -1
- package/lib/screenplay/questions/List.d.ts +5 -5
- package/lib/screenplay/questions/List.js +5 -5
- package/lib/screenplay/questions/Masked.d.ts +4 -2
- package/lib/screenplay/questions/Masked.d.ts.map +1 -1
- package/lib/screenplay/questions/Masked.js +4 -2
- package/lib/screenplay/questions/Masked.js.map +1 -1
- package/lib/screenplay/questions/MetaQuestion.d.ts +9 -9
- package/lib/screenplay/questions/Unanswered.d.ts +2 -2
- package/lib/screenplay/questions/Unanswered.js +2 -2
- package/lib/screenplay/questions/expectations/ExpectationDetails.d.ts +1 -1
- package/lib/screenplay/questions/expectations/ExpectationDetails.js +1 -1
- package/lib/screenplay/questions/expectations/ExpectationMet.d.ts +1 -1
- package/lib/screenplay/questions/expectations/ExpectationMet.js +1 -1
- package/lib/screenplay/questions/expectations/ExpectationNotMet.d.ts +1 -1
- package/lib/screenplay/questions/expectations/ExpectationNotMet.js +1 -1
- package/lib/screenplay/questions/expectations/ExpectationOutcome.d.ts +2 -2
- package/lib/screenplay/questions/expectations/ExpectationOutcome.js +2 -2
- package/lib/screenplay/questions/tag-functions.d.ts +23 -21
- package/lib/screenplay/questions/tag-functions.d.ts.map +1 -1
- package/lib/screenplay/questions/tag-functions.js +5 -5
- package/lib/screenplay/questions/tag-functions.js.map +1 -1
- package/lib/screenplay/time/TellsTime.d.ts +4 -4
- package/lib/screenplay/time/abilities/ScheduleWork.d.ts +2 -2
- package/lib/screenplay/time/abilities/ScheduleWork.js +2 -2
- package/lib/screenplay/time/activities/Wait.d.ts +29 -27
- package/lib/screenplay/time/activities/Wait.d.ts.map +1 -1
- package/lib/screenplay/time/activities/Wait.js +29 -27
- package/lib/screenplay/time/activities/Wait.js.map +1 -1
- package/lib/screenplay/time/models/Clock.d.ts +4 -4
- package/lib/screenplay/time/models/Clock.js +4 -4
- package/lib/screenplay/time/models/Duration.d.ts +1 -1
- package/lib/screenplay/time/models/Duration.js +1 -1
- package/lib/screenplay/time/models/Timestamp.d.ts +2 -2
- package/lib/screenplay/time/models/Timestamp.js +2 -2
- package/lib/stage/Cast.d.ts +21 -21
- package/lib/stage/Cast.js +19 -19
- package/lib/stage/Extras.d.ts +1 -1
- package/lib/stage/Extras.js +1 -1
- package/lib/stage/ListensToDomainEvents.d.ts +7 -7
- package/lib/stage/Stage.d.ts +30 -30
- package/lib/stage/Stage.d.ts.map +1 -1
- package/lib/stage/Stage.js +30 -30
- package/lib/stage/Stage.js.map +1 -1
- package/lib/stage/StageCrewMember.d.ts +11 -11
- package/lib/stage/StageCrewMemberBuilder.d.ts +7 -7
- package/lib/stage/StageCrewMemberBuilderDependencies.d.ts +2 -2
- package/lib/stage/crew/artifact-archiver/ArtifactArchiver.d.ts +4 -4
- package/lib/stage/crew/artifact-archiver/ArtifactArchiver.js +4 -4
- package/lib/stage/crew/stream-reporter/StreamReporter.d.ts +7 -7
- package/lib/stage/crew/stream-reporter/StreamReporter.js +7 -7
- package/package.json +4 -4
- package/src/Serenity.ts +22 -22
- package/src/adapter/OutputStream.ts +5 -4
- package/src/adapter/TestRunnerAdapter.ts +2 -2
- package/src/config/ClassDescription.ts +1 -1
- package/src/config/SerenityConfig.ts +22 -20
- package/src/errors/ErrorFactory.ts +2 -1
- package/src/errors/ErrorSerialiser.ts +3 -3
- package/src/errors/RaiseErrors.ts +9 -9
- package/src/errors/diff/AnsiDiffFormatter.ts +1 -1
- package/src/errors/diff/DiffFormatter.ts +1 -1
- package/src/errors/diff/NoOpDiffFormatter.ts +1 -1
- package/src/errors/model/AssertionError.ts +1 -1
- package/src/errors/model/ConfigurationError.ts +1 -1
- package/src/errors/model/ImplementationPendingError.ts +3 -3
- package/src/errors/model/ListItemNotFoundError.ts +2 -2
- package/src/errors/model/LogicError.ts +2 -2
- package/src/errors/model/OperationInterruptedError.ts +2 -2
- package/src/errors/model/RuntimeError.ts +2 -2
- package/src/errors/model/TestCompromisedError.ts +1 -1
- package/src/errors/model/TimeoutExpiredError.ts +2 -2
- package/src/errors/model/UnknownError.ts +1 -1
- package/src/events/ActivityFinished.ts +1 -1
- package/src/events/ActivityStarts.ts +1 -1
- package/src/events/BusinessRuleDetected.ts +1 -1
- package/src/events/SceneFinishes.ts +2 -1
- package/src/instance.ts +30 -30
- package/src/io/format.ts +15 -6
- package/src/io/loader/ModuleLoader.ts +1 -1
- package/src/io/reflection/ValueInspector.ts +3 -3
- package/src/io/stringified.ts +1 -1
- package/src/io/trimmed.ts +1 -1
- package/src/model/artifacts/HTTPRequestResponse.ts +2 -2
- package/src/screenplay/Activity.ts +10 -10
- package/src/screenplay/Actor.ts +28 -28
- package/src/screenplay/Answerable.ts +1 -1
- package/src/screenplay/Answered.ts +2 -2
- package/src/screenplay/Interaction.ts +17 -17
- package/src/screenplay/Optional.ts +1 -1
- package/src/screenplay/Question.ts +48 -45
- package/src/screenplay/RecursivelyAnswered.ts +2 -2
- package/src/screenplay/Task.ts +19 -19
- package/src/screenplay/WithAnswerableProperties.ts +2 -2
- package/src/screenplay/abilities/Ability.ts +48 -46
- package/src/screenplay/abilities/AbilityType.ts +5 -5
- package/src/screenplay/abilities/AnswerQuestions.ts +3 -3
- package/src/screenplay/abilities/CanHaveAbilities.ts +4 -4
- package/src/screenplay/abilities/Discardable.ts +8 -8
- package/src/screenplay/abilities/Initialisable.ts +11 -11
- package/src/screenplay/abilities/PerformActivities.ts +3 -3
- package/src/screenplay/abilities/UsesAbilities.ts +6 -6
- package/src/screenplay/activities/PerformsActivities.ts +7 -7
- package/src/screenplay/artifacts/CollectsArtifacts.ts +4 -5
- package/src/screenplay/debugging/Debug.ts +7 -6
- package/src/screenplay/debugging/DebuggingResult.ts +1 -1
- package/src/screenplay/debugging/Log.ts +7 -5
- package/src/screenplay/notes/Notepad.ts +13 -13
- package/src/screenplay/notes/NotepadAdapter.ts +16 -16
- package/src/screenplay/notes/TakeNotes.ts +9 -9
- package/src/screenplay/notes/notes.ts +6 -6
- package/src/screenplay/questions/AnswersQuestions.ts +4 -4
- package/src/screenplay/questions/ChainableMetaQuestion.ts +6 -6
- package/src/screenplay/questions/Check.ts +2 -2
- package/src/screenplay/questions/DescriptionFormattingOptions.ts +2 -2
- package/src/screenplay/questions/Expectation.ts +17 -14
- package/src/screenplay/questions/List.ts +5 -5
- package/src/screenplay/questions/Masked.ts +4 -2
- package/src/screenplay/questions/MetaQuestion.ts +9 -9
- package/src/screenplay/questions/Unanswered.ts +2 -2
- package/src/screenplay/questions/expectations/ExpectationDetails.ts +1 -1
- package/src/screenplay/questions/expectations/ExpectationMet.ts +1 -1
- package/src/screenplay/questions/expectations/ExpectationNotMet.ts +1 -1
- package/src/screenplay/questions/expectations/ExpectationOutcome.ts +2 -2
- package/src/screenplay/questions/tag-functions.ts +23 -21
- package/src/screenplay/time/TellsTime.ts +4 -4
- package/src/screenplay/time/abilities/ScheduleWork.ts +2 -2
- package/src/screenplay/time/activities/Wait.ts +29 -27
- package/src/screenplay/time/models/Clock.ts +4 -4
- package/src/screenplay/time/models/Duration.ts +1 -1
- package/src/screenplay/time/models/Timestamp.ts +2 -2
- package/src/stage/Cast.ts +21 -21
- package/src/stage/Extras.ts +1 -1
- package/src/stage/ListensToDomainEvents.ts +7 -7
- package/src/stage/Stage.ts +30 -30
- package/src/stage/StageCrewMember.ts +11 -11
- package/src/stage/StageCrewMemberBuilder.ts +7 -7
- package/src/stage/StageCrewMemberBuilderDependencies.ts +2 -2
- package/src/stage/crew/artifact-archiver/ArtifactArchiver.ts +4 -4
- package/src/stage/crew/stream-reporter/StreamReporter.ts +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Options } from 'chalk';
|
|
2
2
|
import type { DiffFormatter } from './DiffFormatter';
|
|
3
3
|
/**
|
|
4
|
-
* A
|
|
4
|
+
* A [`DiffFormatter`](https://serenity-js.org/api/core/interface/DiffFormatter/) that uses [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
|
|
5
5
|
* to format the output.
|
|
6
6
|
*
|
|
7
7
|
* @group Errors
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AnsiDiffFormatter = void 0;
|
|
4
4
|
const chalk_1 = require("chalk"); // eslint-disable-line unicorn/import-style
|
|
5
5
|
/**
|
|
6
|
-
* A
|
|
6
|
+
* A [`DiffFormatter`](https://serenity-js.org/api/core/interface/DiffFormatter/) that uses [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
|
|
7
7
|
* to format the output.
|
|
8
8
|
*
|
|
9
9
|
* @group Errors
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Formats text representing expected, received, and unchanged lines of a diff
|
|
3
|
-
* produced by the
|
|
3
|
+
* produced by the [`ErrorFactory`](https://serenity-js.org/api/core/class/ErrorFactory/), so that they can be presented to a developer
|
|
4
4
|
* in a visually distinctive way.
|
|
5
5
|
*
|
|
6
6
|
* @group Errors
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DiffFormatter } from './DiffFormatter';
|
|
2
2
|
/**
|
|
3
|
-
* A no-op
|
|
3
|
+
* A no-op [`DiffFormatter`](https://serenity-js.org/api/core/interface/DiffFormatter/) that produces output identical to input.
|
|
4
4
|
*
|
|
5
5
|
* @group Errors
|
|
6
6
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NoOpDiffFormatter = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* A no-op
|
|
5
|
+
* A no-op [`DiffFormatter`](https://serenity-js.org/api/core/interface/DiffFormatter/) that produces output identical to input.
|
|
6
6
|
*
|
|
7
7
|
* @group Errors
|
|
8
8
|
*/
|
|
@@ -9,7 +9,7 @@ export declare class AssertionError extends RuntimeError {
|
|
|
9
9
|
static fromJSON(serialised: JSONObject): AssertionError;
|
|
10
10
|
/**
|
|
11
11
|
* @param message - Human-readable description of the error and the difference between the expected and actual values
|
|
12
|
-
* @param [cause] - The root cause of this
|
|
12
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
13
13
|
*/
|
|
14
14
|
constructor(message: string, cause?: Error);
|
|
15
15
|
}
|
|
@@ -16,7 +16,7 @@ class AssertionError extends RuntimeError_1.RuntimeError {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* @param message - Human-readable description of the error and the difference between the expected and actual values
|
|
19
|
-
* @param [cause] - The root cause of this
|
|
19
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
20
20
|
*/
|
|
21
21
|
constructor(message, cause) {
|
|
22
22
|
super(AssertionError, message, cause);
|
|
@@ -9,7 +9,7 @@ export declare class ConfigurationError extends RuntimeError {
|
|
|
9
9
|
static fromJSON(serialised: JSONObject): ConfigurationError;
|
|
10
10
|
/**
|
|
11
11
|
* @param message - Human-readable description of the error
|
|
12
|
-
* @param [cause] - The root cause of this
|
|
12
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
13
13
|
*/
|
|
14
14
|
constructor(message: string, cause?: Error);
|
|
15
15
|
}
|
|
@@ -16,7 +16,7 @@ class ConfigurationError extends RuntimeError_1.RuntimeError {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* @param message - Human-readable description of the error
|
|
19
|
-
* @param [cause] - The root cause of this
|
|
19
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
20
20
|
*/
|
|
21
21
|
constructor(message, cause) {
|
|
22
22
|
super(ConfigurationError, message, cause);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { JSONObject } from 'tiny-types';
|
|
2
2
|
import { RuntimeError } from './RuntimeError';
|
|
3
3
|
/**
|
|
4
|
-
* Thrown to indicate that the
|
|
5
|
-
* a
|
|
4
|
+
* Thrown to indicate that the [`Actor`](https://serenity-js.org/api/core/class/Actor/) attempted to perform
|
|
5
|
+
* a [`Task`](https://serenity-js.org/api/core/class/Task/) or [`Interaction`](https://serenity-js.org/api/core/class/Interaction/) that hasn't been implemented yet.
|
|
6
6
|
*
|
|
7
7
|
* ## A pending Task
|
|
8
8
|
*
|
|
@@ -30,7 +30,7 @@ export declare class ImplementationPendingError extends RuntimeError {
|
|
|
30
30
|
static fromJSON(serialised: JSONObject): ImplementationPendingError;
|
|
31
31
|
/**
|
|
32
32
|
* @param {string} message - Human-readable description of the error
|
|
33
|
-
* @param {Error} [cause] - The root cause of this
|
|
33
|
+
* @param {Error} [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
34
34
|
*/
|
|
35
35
|
constructor(message: string, cause?: Error);
|
|
36
36
|
}
|
|
@@ -4,8 +4,8 @@ exports.ImplementationPendingError = void 0;
|
|
|
4
4
|
const ErrorSerialiser_1 = require("../ErrorSerialiser");
|
|
5
5
|
const RuntimeError_1 = require("./RuntimeError");
|
|
6
6
|
/**
|
|
7
|
-
* Thrown to indicate that the
|
|
8
|
-
* a
|
|
7
|
+
* Thrown to indicate that the [`Actor`](https://serenity-js.org/api/core/class/Actor/) attempted to perform
|
|
8
|
+
* a [`Task`](https://serenity-js.org/api/core/class/Task/) or [`Interaction`](https://serenity-js.org/api/core/class/Interaction/) that hasn't been implemented yet.
|
|
9
9
|
*
|
|
10
10
|
* ## A pending Task
|
|
11
11
|
*
|
|
@@ -37,7 +37,7 @@ class ImplementationPendingError extends RuntimeError_1.RuntimeError {
|
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* @param {string} message - Human-readable description of the error
|
|
40
|
-
* @param {Error} [cause] - The root cause of this
|
|
40
|
+
* @param {Error} [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
41
41
|
*/
|
|
42
42
|
constructor(message, cause) {
|
|
43
43
|
super(ImplementationPendingError, message, cause);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JSONObject } from 'tiny-types';
|
|
2
2
|
import { RuntimeError } from './RuntimeError';
|
|
3
3
|
/**
|
|
4
|
-
* Thrown to indicate that an
|
|
4
|
+
* Thrown to indicate that an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/), a [`Task`](https://serenity-js.org/api/core/class/Task/) or a test scenario
|
|
5
5
|
* can't be executed due to no items are found in a list.
|
|
6
6
|
*
|
|
7
7
|
* For example, it's not possible to get the first() or the last() item of a list
|
|
@@ -13,7 +13,7 @@ export declare class ListItemNotFoundError extends RuntimeError {
|
|
|
13
13
|
static fromJSON(serialised: JSONObject): ListItemNotFoundError;
|
|
14
14
|
/**
|
|
15
15
|
* @param message - Human-readable description of the error
|
|
16
|
-
* @param [cause] - The root cause of this
|
|
16
|
+
* @param [cause] - The root cause of this [`ListItemNotFoundError`](https://serenity-js.org/api/core/class/ListItemNotFoundError/), if any
|
|
17
17
|
*/
|
|
18
18
|
constructor(message: string, cause?: Error);
|
|
19
19
|
}
|
|
@@ -4,7 +4,7 @@ exports.ListItemNotFoundError = void 0;
|
|
|
4
4
|
const ErrorSerialiser_1 = require("../ErrorSerialiser");
|
|
5
5
|
const RuntimeError_1 = require("./RuntimeError");
|
|
6
6
|
/**
|
|
7
|
-
* Thrown to indicate that an
|
|
7
|
+
* Thrown to indicate that an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/), a [`Task`](https://serenity-js.org/api/core/class/Task/) or a test scenario
|
|
8
8
|
* can't be executed due to no items are found in a list.
|
|
9
9
|
*
|
|
10
10
|
* For example, it's not possible to get the first() or the last() item of a list
|
|
@@ -20,7 +20,7 @@ class ListItemNotFoundError extends RuntimeError_1.RuntimeError {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* @param message - Human-readable description of the error
|
|
23
|
-
* @param [cause] - The root cause of this
|
|
23
|
+
* @param [cause] - The root cause of this [`ListItemNotFoundError`](https://serenity-js.org/api/core/class/ListItemNotFoundError/), if any
|
|
24
24
|
*/
|
|
25
25
|
constructor(message, cause) {
|
|
26
26
|
super(ListItemNotFoundError, message, cause);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JSONObject } from 'tiny-types';
|
|
2
2
|
import { RuntimeError } from './RuntimeError';
|
|
3
3
|
/**
|
|
4
|
-
* Thrown to indicate that an
|
|
4
|
+
* Thrown to indicate that an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/), a [`Task`](https://serenity-js.org/api/core/class/Task/) or a test scenario
|
|
5
5
|
* can't be executed due to a logical error.
|
|
6
6
|
*
|
|
7
7
|
* For example, it's not possible to assert on the last HTTP Response if the request
|
|
@@ -13,7 +13,7 @@ export declare class LogicError extends RuntimeError {
|
|
|
13
13
|
static fromJSON(serialised: JSONObject): LogicError;
|
|
14
14
|
/**
|
|
15
15
|
* @param message - Human-readable description of the error
|
|
16
|
-
* @param [cause] - The root cause of this
|
|
16
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
17
17
|
*/
|
|
18
18
|
constructor(message: string, cause?: Error);
|
|
19
19
|
}
|
|
@@ -4,7 +4,7 @@ exports.LogicError = void 0;
|
|
|
4
4
|
const ErrorSerialiser_1 = require("../ErrorSerialiser");
|
|
5
5
|
const RuntimeError_1 = require("./RuntimeError");
|
|
6
6
|
/**
|
|
7
|
-
* Thrown to indicate that an
|
|
7
|
+
* Thrown to indicate that an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/), a [`Task`](https://serenity-js.org/api/core/class/Task/) or a test scenario
|
|
8
8
|
* can't be executed due to a logical error.
|
|
9
9
|
*
|
|
10
10
|
* For example, it's not possible to assert on the last HTTP Response if the request
|
|
@@ -20,7 +20,7 @@ class LogicError extends RuntimeError_1.RuntimeError {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* @param message - Human-readable description of the error
|
|
23
|
-
* @param [cause] - The root cause of this
|
|
23
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
24
24
|
*/
|
|
25
25
|
constructor(message, cause) {
|
|
26
26
|
super(LogicError, message, cause);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JSONObject } from 'tiny-types';
|
|
2
2
|
import { RuntimeError } from './RuntimeError';
|
|
3
3
|
/**
|
|
4
|
-
* Thrown to indicate that a
|
|
4
|
+
* Thrown to indicate that a [scheduled operation](https://serenity-js.org/api/core/class/Scheduler/)
|
|
5
5
|
* has been stopped before it was completed.
|
|
6
6
|
*
|
|
7
7
|
* @group Errors
|
|
@@ -13,7 +13,7 @@ export declare class OperationInterruptedError extends RuntimeError {
|
|
|
13
13
|
* Human-readable description of the error
|
|
14
14
|
*
|
|
15
15
|
* @param [cause]
|
|
16
|
-
* The root cause of this
|
|
16
|
+
* The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
17
17
|
*/
|
|
18
18
|
constructor(message: string, cause?: Error);
|
|
19
19
|
}
|
|
@@ -4,7 +4,7 @@ exports.OperationInterruptedError = void 0;
|
|
|
4
4
|
const ErrorSerialiser_1 = require("../ErrorSerialiser");
|
|
5
5
|
const RuntimeError_1 = require("./RuntimeError");
|
|
6
6
|
/**
|
|
7
|
-
* Thrown to indicate that a
|
|
7
|
+
* Thrown to indicate that a [scheduled operation](https://serenity-js.org/api/core/class/Scheduler/)
|
|
8
8
|
* has been stopped before it was completed.
|
|
9
9
|
*
|
|
10
10
|
* @group Errors
|
|
@@ -20,7 +20,7 @@ class OperationInterruptedError extends RuntimeError_1.RuntimeError {
|
|
|
20
20
|
* Human-readable description of the error
|
|
21
21
|
*
|
|
22
22
|
* @param [cause]
|
|
23
|
-
* The root cause of this
|
|
23
|
+
* The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
24
24
|
*/
|
|
25
25
|
constructor(message, cause) {
|
|
26
26
|
super(OperationInterruptedError, message, cause);
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* })
|
|
35
35
|
* ```
|
|
36
36
|
*
|
|
37
|
-
* ## Registering a custom error with
|
|
37
|
+
* ## Registering a custom error with [`ErrorSerialiser`](https://serenity-js.org/api/core/class/ErrorSerialiser/)
|
|
38
38
|
*
|
|
39
39
|
* ```ts
|
|
40
40
|
* import { RuntimeError } from '@serenity-js/core'
|
|
@@ -68,7 +68,7 @@ export declare abstract class RuntimeError extends Error {
|
|
|
68
68
|
/**
|
|
69
69
|
* @param type - Constructor function used to instantiate a subclass of a RuntimeError
|
|
70
70
|
* @param message - Human-readable description of the error
|
|
71
|
-
* @param [cause] - The root cause of this
|
|
71
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
72
72
|
*/
|
|
73
73
|
protected constructor(type: new (...args: any[]) => RuntimeError, message: string, cause?: Error);
|
|
74
74
|
/**
|
|
@@ -38,7 +38,7 @@ const tiny_types_1 = require("tiny-types");
|
|
|
38
38
|
* })
|
|
39
39
|
* ```
|
|
40
40
|
*
|
|
41
|
-
* ## Registering a custom error with
|
|
41
|
+
* ## Registering a custom error with [`ErrorSerialiser`](https://serenity-js.org/api/core/class/ErrorSerialiser/)
|
|
42
42
|
*
|
|
43
43
|
* ```ts
|
|
44
44
|
* import { RuntimeError } from '@serenity-js/core'
|
|
@@ -72,7 +72,7 @@ class RuntimeError extends Error {
|
|
|
72
72
|
/**
|
|
73
73
|
* @param type - Constructor function used to instantiate a subclass of a RuntimeError
|
|
74
74
|
* @param message - Human-readable description of the error
|
|
75
|
-
* @param [cause] - The root cause of this
|
|
75
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
76
76
|
*/
|
|
77
77
|
constructor(type, message, cause) {
|
|
78
78
|
const errorMessage = message || '';
|
|
@@ -24,7 +24,7 @@ export declare class TestCompromisedError extends RuntimeError {
|
|
|
24
24
|
static fromJSON(serialised: JSONObject): TestCompromisedError;
|
|
25
25
|
/**
|
|
26
26
|
* @param message - Human-readable description of the error
|
|
27
|
-
* @param [cause] - The root cause of this
|
|
27
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
28
28
|
*/
|
|
29
29
|
constructor(message: string, cause?: Error);
|
|
30
30
|
}
|
|
@@ -31,7 +31,7 @@ class TestCompromisedError extends RuntimeError_1.RuntimeError {
|
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* @param message - Human-readable description of the error
|
|
34
|
-
* @param [cause] - The root cause of this
|
|
34
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
35
35
|
*/
|
|
36
36
|
constructor(message, cause) {
|
|
37
37
|
super(TestCompromisedError, message, cause);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JSONObject } from 'tiny-types';
|
|
2
2
|
import { RuntimeError } from './RuntimeError';
|
|
3
3
|
/**
|
|
4
|
-
* Thrown to indicate that an
|
|
4
|
+
* Thrown to indicate that an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/), a [`Task`](https://serenity-js.org/api/core/class/Task/) or a test scenario
|
|
5
5
|
* took longer to execute than the expected timeout.
|
|
6
6
|
*
|
|
7
7
|
* @group Errors
|
|
@@ -13,7 +13,7 @@ export declare class TimeoutExpiredError extends RuntimeError {
|
|
|
13
13
|
* Human-readable description of the error
|
|
14
14
|
*
|
|
15
15
|
* @param [cause]
|
|
16
|
-
* The root cause of this
|
|
16
|
+
* The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
17
17
|
*/
|
|
18
18
|
constructor(message: string, cause?: Error);
|
|
19
19
|
}
|
|
@@ -4,7 +4,7 @@ exports.TimeoutExpiredError = void 0;
|
|
|
4
4
|
const ErrorSerialiser_1 = require("../ErrorSerialiser");
|
|
5
5
|
const RuntimeError_1 = require("./RuntimeError");
|
|
6
6
|
/**
|
|
7
|
-
* Thrown to indicate that an
|
|
7
|
+
* Thrown to indicate that an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/), a [`Task`](https://serenity-js.org/api/core/class/Task/) or a test scenario
|
|
8
8
|
* took longer to execute than the expected timeout.
|
|
9
9
|
*
|
|
10
10
|
* @group Errors
|
|
@@ -20,7 +20,7 @@ class TimeoutExpiredError extends RuntimeError_1.RuntimeError {
|
|
|
20
20
|
* Human-readable description of the error
|
|
21
21
|
*
|
|
22
22
|
* @param [cause]
|
|
23
|
-
* The root cause of this
|
|
23
|
+
* The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
24
24
|
*/
|
|
25
25
|
constructor(message, cause) {
|
|
26
26
|
super(TimeoutExpiredError, message, cause);
|
|
@@ -9,7 +9,7 @@ export declare class UnknownError extends RuntimeError {
|
|
|
9
9
|
static fromJSON(serialised: JSONObject): UnknownError;
|
|
10
10
|
/**
|
|
11
11
|
* @param message - Human-readable description of the error
|
|
12
|
-
* @param [cause] - The root cause of this
|
|
12
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
13
13
|
*/
|
|
14
14
|
constructor(message: string, cause?: Error);
|
|
15
15
|
}
|
|
@@ -16,7 +16,7 @@ class UnknownError extends RuntimeError_1.RuntimeError {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* @param message - Human-readable description of the error
|
|
19
|
-
* @param [cause] - The root cause of this
|
|
19
|
+
* @param [cause] - The root cause of this [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/), if any
|
|
20
20
|
*/
|
|
21
21
|
constructor(message, cause) {
|
|
22
22
|
super(UnknownError, message, cause);
|
|
@@ -2,7 +2,7 @@ import type { ActivityDetails, CorrelationId, Outcome } from '../model';
|
|
|
2
2
|
import type { Timestamp } from '../screenplay';
|
|
3
3
|
import { DomainEvent } from './DomainEvent';
|
|
4
4
|
/**
|
|
5
|
-
* Emitted when an
|
|
5
|
+
* Emitted when an [`Activity`](https://serenity-js.org/api/core/class/Activity/) is finished.
|
|
6
6
|
*
|
|
7
7
|
* @group Events
|
|
8
8
|
*/
|
|
@@ -4,7 +4,7 @@ exports.ActivityFinished = void 0;
|
|
|
4
4
|
const tiny_types_1 = require("tiny-types");
|
|
5
5
|
const DomainEvent_1 = require("./DomainEvent");
|
|
6
6
|
/**
|
|
7
|
-
* Emitted when an
|
|
7
|
+
* Emitted when an [`Activity`](https://serenity-js.org/api/core/class/Activity/) is finished.
|
|
8
8
|
*
|
|
9
9
|
* @group Events
|
|
10
10
|
*/
|
|
@@ -2,7 +2,7 @@ import type { ActivityDetails, CorrelationId } from '../model';
|
|
|
2
2
|
import type { Timestamp } from '../screenplay';
|
|
3
3
|
import { DomainEvent } from './DomainEvent';
|
|
4
4
|
/**
|
|
5
|
-
* Emitted when an
|
|
5
|
+
* Emitted when an [`Activity`](https://serenity-js.org/api/core/class/Activity/) starts.
|
|
6
6
|
*
|
|
7
7
|
* @group Events
|
|
8
8
|
*/
|
|
@@ -4,7 +4,7 @@ exports.ActivityStarts = void 0;
|
|
|
4
4
|
const tiny_types_1 = require("tiny-types");
|
|
5
5
|
const DomainEvent_1 = require("./DomainEvent");
|
|
6
6
|
/**
|
|
7
|
-
* Emitted when an
|
|
7
|
+
* Emitted when an [`Activity`](https://serenity-js.org/api/core/class/Activity/) starts.
|
|
8
8
|
*
|
|
9
9
|
* @group Events
|
|
10
10
|
*/
|
|
@@ -3,7 +3,7 @@ import { BusinessRule, CorrelationId, ScenarioDetails } from '../model';
|
|
|
3
3
|
import { Timestamp } from '../screenplay';
|
|
4
4
|
import { DomainEvent } from './DomainEvent';
|
|
5
5
|
/**
|
|
6
|
-
* Emitted by [@serenity-js/cucumber](/api/cucumber)
|
|
6
|
+
* Emitted by [@serenity-js/cucumber](https://serenity-js.org/api/cucumber)
|
|
7
7
|
* when a [business rule](https://cucumber.io/docs/gherkin/reference/#rule) is detected.
|
|
8
8
|
*
|
|
9
9
|
* @group Events
|
|
@@ -6,7 +6,7 @@ const model_1 = require("../model");
|
|
|
6
6
|
const screenplay_1 = require("../screenplay");
|
|
7
7
|
const DomainEvent_1 = require("./DomainEvent");
|
|
8
8
|
/**
|
|
9
|
-
* Emitted by [@serenity-js/cucumber](/api/cucumber)
|
|
9
|
+
* Emitted by [@serenity-js/cucumber](https://serenity-js.org/api/cucumber)
|
|
10
10
|
* when a [business rule](https://cucumber.io/docs/gherkin/reference/#rule) is detected.
|
|
11
11
|
*
|
|
12
12
|
* @group Events
|
|
@@ -4,7 +4,8 @@ import { Timestamp } from '../screenplay';
|
|
|
4
4
|
import { DomainEvent } from './DomainEvent';
|
|
5
5
|
/**
|
|
6
6
|
* Emitted by a Serenity/JS test runner adapter, right before a test and all its associated test hooks finish.
|
|
7
|
-
* Triggers any clean-up operations that might be required, such as discarding of
|
|
7
|
+
* Triggers any clean-up operations that might be required, such as discarding of
|
|
8
|
+
* the [discardable](https://serenity-js.org/api/core/interface/Discardable/) abilities.
|
|
8
9
|
*
|
|
9
10
|
* @group Events
|
|
10
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneFinishes.d.ts","sourceRoot":"","sources":["../../src/events/SceneFinishes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"SceneFinishes.d.ts","sourceRoot":"","sources":["../../src/events/SceneFinishes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,WAAW;aAStB,OAAO,EAAE,aAAa;IAR1C,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,UAAU,GAAG,aAAa;gBAQzB,OAAO,EAAE,aAAa,EACtC,SAAS,CAAC,EAAE,SAAS;CAK5B"}
|
|
@@ -7,7 +7,8 @@ const screenplay_1 = require("../screenplay");
|
|
|
7
7
|
const DomainEvent_1 = require("./DomainEvent");
|
|
8
8
|
/**
|
|
9
9
|
* Emitted by a Serenity/JS test runner adapter, right before a test and all its associated test hooks finish.
|
|
10
|
-
* Triggers any clean-up operations that might be required, such as discarding of
|
|
10
|
+
* Triggers any clean-up operations that might be required, such as discarding of
|
|
11
|
+
* the [discardable](https://serenity-js.org/api/core/interface/Discardable/) abilities.
|
|
11
12
|
*
|
|
12
13
|
* @group Events
|
|
13
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneFinishes.js","sourceRoot":"","sources":["../../src/events/SceneFinishes.ts"],"names":[],"mappings":";;;AACA,2CAA+C;AAE/C,oCAAyC;AACzC,8CAA0C;AAC1C,+CAA4C;AAE5C
|
|
1
|
+
{"version":3,"file":"SceneFinishes.js","sourceRoot":"","sources":["../../src/events/SceneFinishes.ts"],"names":[],"mappings":";;;AACA,2CAA+C;AAE/C,oCAAyC;AACzC,8CAA0C;AAC1C,+CAA4C;AAE5C;;;;;;GAMG;AACH,MAAa,aAAc,SAAQ,yBAAW;IAStB;IARpB,MAAM,CAAC,QAAQ,CAAC,CAAa;QACzB,OAAO,IAAI,aAAa,CACpB,qBAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAiB,CAAC,EAC3C,sBAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAmB,CAAC,CAC5C,CAAC;IACN,CAAC;IAED,YACoB,OAAsB,EACtC,SAAqB;QAErB,KAAK,CAAC,SAAS,CAAC,CAAC;QAHD,YAAO,GAAP,OAAO,CAAe;QAItC,IAAA,mBAAM,EAAC,SAAS,EAAE,OAAO,EAAE,IAAA,sBAAS,GAAE,CAAC,CAAC;IAC5C,CAAC;CACJ;AAfD,sCAeC"}
|
package/lib/instance.d.ts
CHANGED
|
@@ -14,10 +14,10 @@ export declare const serenity: Serenity;
|
|
|
14
14
|
* so this function should be called exactly once
|
|
15
15
|
* in your test suite.
|
|
16
16
|
*
|
|
17
|
-
* This function is an alias for
|
|
17
|
+
* This function is an alias for [`Serenity.configure`](https://serenity-js.org/api/core/class/Serenity/#configure).
|
|
18
18
|
*
|
|
19
19
|
* :::tip configure vs engage
|
|
20
|
-
* If you want to retain the configuration but reset the
|
|
20
|
+
* If you want to retain the configuration but reset the [cast of actors](https://serenity-js.org/api/core/class/Cast/), use [`engage`](https://serenity-js.org/api/core/function/engage/) instead.
|
|
21
21
|
* :::
|
|
22
22
|
*
|
|
23
23
|
* @param config
|
|
@@ -26,26 +26,26 @@ export declare const serenity: Serenity;
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function configure(config: SerenityConfig): void;
|
|
28
28
|
/**
|
|
29
|
-
* Re-configures Serenity/JS with a new
|
|
30
|
-
* you want to use in any subsequent calls to
|
|
29
|
+
* Re-configures Serenity/JS with a new [cast](https://serenity-js.org/api/core/class/Cast/) of [actors](https://serenity-js.org/api/core/class/Actor/)
|
|
30
|
+
* you want to use in any subsequent calls to [`actorCalled`](https://serenity-js.org/api/core/function/actorCalled/).
|
|
31
31
|
*
|
|
32
|
-
* This function is an alias for
|
|
33
|
-
* which provides an alternative to calling
|
|
32
|
+
* This function is an alias for [`Serenity.engage`](https://serenity-js.org/api/core/class/Serenity/#engage),
|
|
33
|
+
* which provides an alternative to calling [`Actor.whoCan`](https://serenity-js.org/api/core/class/Actor/#whoCan) directly in your tests
|
|
34
34
|
* and is typically invoked in a "before all" or "before each" hook of your test runner of choice.
|
|
35
35
|
*
|
|
36
36
|
* :::tip configure vs engage
|
|
37
|
-
* Calling
|
|
37
|
+
* Calling [`engage`](https://serenity-js.org/api/core/function/engage/) replaces the currently configured [cast of actors](https://serenity-js.org/api/core/class/Cast/),
|
|
38
38
|
* but doesn't affect any other configuration.
|
|
39
|
-
* If you want to reset the Serenity/JS configuration completely, use
|
|
39
|
+
* If you want to reset the Serenity/JS configuration completely, use [`configure`](https://serenity-js.org/api/core/function/configure/) instead.
|
|
40
40
|
* :::
|
|
41
41
|
*
|
|
42
|
-
* If your implementation of the
|
|
42
|
+
* If your implementation of the [cast](https://serenity-js.org/api/core/class/Cast/) interface is stateless,
|
|
43
43
|
* you can invoke this function just once before your entire test suite is executed, see
|
|
44
44
|
* - [`beforeAll`](https://jasmine.github.io/api/3.6/global.html#beforeAll) in Jasmine,
|
|
45
45
|
* - [`before`](https://mochajs.org/#hooks) in Mocha,
|
|
46
46
|
* - [`BeforeAll`](https://github.com/cucumber/cucumber-js/blob/master/docs/support_files/hooks.md#beforeall--afterall) in Cucumber.js
|
|
47
47
|
*
|
|
48
|
-
* However, if your
|
|
48
|
+
* However, if your [cast](https://serenity-js.org/api/core/class/Cast/) holds state that you want to reset before each scenario,
|
|
49
49
|
* it's better to invoke `engage` before each test using:
|
|
50
50
|
* - [`beforeEach`](https://jasmine.github.io/api/3.6/global.html#beforeEach) in Jasmine
|
|
51
51
|
* - [`beforeEach`](https://mochajs.org/#hooks) in Mocha,
|
|
@@ -108,8 +108,8 @@ export declare function configure(config: SerenityConfig): void;
|
|
|
108
108
|
*
|
|
109
109
|
* ### Using with Playwright Test runner
|
|
110
110
|
*
|
|
111
|
-
* [Serenity/JS Playwright Test module](/api/playwright-test) will configure the cast on your behalf,
|
|
112
|
-
* so you don't need to call
|
|
111
|
+
* [Serenity/JS Playwright Test module](https://serenity-js.org/api/playwright-test) will configure the cast on your behalf,
|
|
112
|
+
* so you don't need to call [`engage`](https://serenity-js.org/api/core/function/engage/).
|
|
113
113
|
*
|
|
114
114
|
* ```ts
|
|
115
115
|
* import { describe, it, test } from '@serenity-js/playwright-test'
|
|
@@ -126,9 +126,9 @@ export declare function configure(config: SerenityConfig): void;
|
|
|
126
126
|
* ```
|
|
127
127
|
*
|
|
128
128
|
* ## Learn more
|
|
129
|
-
* -
|
|
130
|
-
* -
|
|
131
|
-
* -
|
|
129
|
+
* - [`Actor`](https://serenity-js.org/api/core/class/Actor/)
|
|
130
|
+
* - [`Cast`](https://serenity-js.org/api/core/class/Cast/)
|
|
131
|
+
* - [`Serenity.engage`](https://serenity-js.org/api/core/class/Serenity/#engage)
|
|
132
132
|
*
|
|
133
133
|
* @param actors
|
|
134
134
|
*
|
|
@@ -136,10 +136,10 @@ export declare function configure(config: SerenityConfig): void;
|
|
|
136
136
|
*/
|
|
137
137
|
export declare function engage(actors: Cast): void;
|
|
138
138
|
/**
|
|
139
|
-
* Instantiates or retrieves an
|
|
139
|
+
* Instantiates or retrieves an [`Actor`](https://serenity-js.org/api/core/class/Actor/)
|
|
140
140
|
* called `name` if one has already been instantiated.
|
|
141
141
|
*
|
|
142
|
-
* This method is an alias for
|
|
142
|
+
* This method is an alias for [`Serenity.theActorCalled`](https://serenity-js.org/api/core/class/Serenity/#theActorCalled).
|
|
143
143
|
*
|
|
144
144
|
* ## Usage with Cucumber
|
|
145
145
|
*
|
|
@@ -188,9 +188,9 @@ export declare function engage(actors: Cast): void;
|
|
|
188
188
|
*
|
|
189
189
|
* ## Usage with Playwright Test
|
|
190
190
|
*
|
|
191
|
-
* When using [Serenity/JS with Playwright Test](/api/playwright-test/), you should use either
|
|
192
|
-
* the default [`actor`](/api/playwright-test/interface/SerenityFixtures/#actorCalled) fixture
|
|
193
|
-
* or the injected [`actorCalled`](/api/playwright-test/interface/SerenityFixtures/#actorCalled) function
|
|
191
|
+
* When using [Serenity/JS with Playwright Test](https://serenity-js.org/api/playwright-test/), you should use either
|
|
192
|
+
* the default [`actor`](https://serenity-js.org/api/playwright-test/interface/SerenityFixtures/#actorCalled) fixture
|
|
193
|
+
* or the injected [`actorCalled`](https://serenity-js.org/api/playwright-test/interface/SerenityFixtures/#actorCalled) function
|
|
194
194
|
* instead of importing it from `@serenity-js/core`.
|
|
195
195
|
*
|
|
196
196
|
* ```typescript
|
|
@@ -208,10 +208,10 @@ export declare function engage(actors: Cast): void;
|
|
|
208
208
|
*
|
|
209
209
|
* ## Learn more
|
|
210
210
|
*
|
|
211
|
-
* -
|
|
212
|
-
* -
|
|
213
|
-
* -
|
|
214
|
-
* -
|
|
211
|
+
* - [`engage`](https://serenity-js.org/api/core/function/engage/)
|
|
212
|
+
* - [`Actor`](https://serenity-js.org/api/core/class/Actor/)
|
|
213
|
+
* - [`Cast`](https://serenity-js.org/api/core/class/Cast/)
|
|
214
|
+
* - [`Serenity.theActorCalled`](https://serenity-js.org/api/core/class/Serenity/#theActorCalled)
|
|
215
215
|
*
|
|
216
216
|
* @param name
|
|
217
217
|
* The name of the actor to instantiate or retrieve
|
|
@@ -221,11 +221,11 @@ export declare function engage(actors: Cast): void;
|
|
|
221
221
|
export declare function actorCalled(name: string): Actor;
|
|
222
222
|
/**
|
|
223
223
|
* Retrieves an actor who was last instantiated or retrieved
|
|
224
|
-
* using
|
|
224
|
+
* using [`actorCalled`](https://serenity-js.org/api/core/function/actorCalled/).
|
|
225
225
|
*
|
|
226
226
|
* This function is particularly useful when automating Cucumber scenarios.
|
|
227
227
|
*
|
|
228
|
-
* This function is an alias for
|
|
228
|
+
* This function is an alias for [`Serenity.theActorInTheSpotlight`](https://serenity-js.org/api/core/class/Serenity/#theActorInTheSpotlight).
|
|
229
229
|
*
|
|
230
230
|
* ## Usage with Cucumber
|
|
231
231
|
*
|
|
@@ -246,10 +246,10 @@ export declare function actorCalled(name: string): Actor;
|
|
|
246
246
|
*
|
|
247
247
|
* ## Learn more
|
|
248
248
|
*
|
|
249
|
-
* -
|
|
250
|
-
* -
|
|
251
|
-
* -
|
|
252
|
-
* -
|
|
249
|
+
* - [`engage`](https://serenity-js.org/api/core/function/engage/)
|
|
250
|
+
* - [`actorCalled`](https://serenity-js.org/api/core/function/actorCalled/)
|
|
251
|
+
* - [`Actor`](https://serenity-js.org/api/core/class/Actor/)
|
|
252
|
+
* - [`Cast`](https://serenity-js.org/api/core/class/Cast/)
|
|
253
253
|
*
|
|
254
254
|
* @group Actors
|
|
255
255
|
*/
|