@serenity-js/core 3.0.0-rc.9 → 3.0.1
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 +208 -2139
- package/README.md +8 -10
- package/lib/Serenity.d.ts +145 -80
- package/lib/Serenity.d.ts.map +1 -0
- package/lib/Serenity.js +159 -86
- package/lib/Serenity.js.map +1 -1
- package/lib/adapter/OutputStream.d.ts +14 -0
- package/lib/adapter/OutputStream.d.ts.map +1 -0
- package/lib/{io → adapter}/OutputStream.js.map +1 -1
- package/lib/adapter/TestRunnerAdapter.d.ts +33 -0
- package/lib/adapter/TestRunnerAdapter.d.ts.map +1 -0
- package/lib/adapter/TestRunnerAdapter.js.map +1 -0
- package/lib/adapter/index.d.ts +3 -0
- package/lib/adapter/index.d.ts.map +1 -0
- package/lib/adapter/index.js +19 -0
- package/lib/adapter/index.js.map +1 -0
- package/lib/config/ClassDescription.d.ts +60 -0
- package/lib/config/ClassDescription.d.ts.map +1 -0
- package/lib/config/ClassDescription.js +3 -0
- package/lib/config/ClassDescription.js.map +1 -0
- package/lib/config/SerenityConfig.d.ts +73 -0
- package/lib/config/SerenityConfig.d.ts.map +1 -0
- package/lib/config/SerenityConfig.js +20 -0
- package/lib/config/SerenityConfig.js.map +1 -0
- package/lib/config/index.d.ts +3 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/config/index.js +19 -0
- package/lib/config/index.js.map +1 -0
- package/lib/errors/ErrorFactory.d.ts +16 -0
- package/lib/errors/ErrorFactory.d.ts.map +1 -0
- package/lib/errors/ErrorFactory.js +241 -0
- package/lib/errors/ErrorFactory.js.map +1 -0
- package/lib/errors/ErrorOptions.d.ts +16 -0
- package/lib/errors/ErrorOptions.d.ts.map +1 -0
- package/lib/errors/ErrorOptions.js +3 -0
- package/lib/errors/ErrorOptions.js.map +1 -0
- package/lib/errors/ErrorSerialiser.d.ts +14 -0
- package/lib/errors/ErrorSerialiser.d.ts.map +1 -0
- package/lib/{io → errors}/ErrorSerialiser.js +33 -7
- package/lib/errors/ErrorSerialiser.js.map +1 -0
- package/lib/errors/ErrorStackParser.d.ts +13 -0
- package/lib/errors/ErrorStackParser.d.ts.map +1 -0
- package/lib/errors/ErrorStackParser.js +42 -0
- package/lib/errors/ErrorStackParser.js.map +1 -0
- package/lib/errors/RaiseErrors.d.ts +57 -0
- package/lib/errors/RaiseErrors.d.ts.map +1 -0
- package/lib/errors/RaiseErrors.js +62 -0
- package/lib/errors/RaiseErrors.js.map +1 -0
- package/lib/errors/diff/AnsiDiffFormatter.d.ts +28 -0
- package/lib/errors/diff/AnsiDiffFormatter.d.ts.map +1 -0
- package/lib/errors/diff/AnsiDiffFormatter.js +38 -0
- package/lib/errors/diff/AnsiDiffFormatter.js.map +1 -0
- package/lib/errors/diff/DiffFormatter.d.ts +13 -0
- package/lib/errors/diff/DiffFormatter.d.ts.map +1 -0
- package/lib/errors/diff/DiffFormatter.js +3 -0
- package/lib/errors/diff/DiffFormatter.js.map +1 -0
- package/lib/errors/diff/NoOpDiffFormatter.d.ts +12 -0
- package/lib/errors/diff/NoOpDiffFormatter.d.ts.map +1 -0
- package/lib/errors/diff/NoOpDiffFormatter.js +21 -0
- package/lib/errors/diff/NoOpDiffFormatter.js.map +1 -0
- package/lib/errors/diff/index.d.ts +4 -0
- package/lib/errors/diff/index.d.ts.map +1 -0
- package/lib/errors/diff/index.js +20 -0
- package/lib/errors/diff/index.js.map +1 -0
- package/lib/errors/index.d.ts +8 -7
- package/lib/errors/index.d.ts.map +1 -0
- package/lib/errors/index.js +23 -8
- package/lib/errors/index.js.map +1 -1
- package/lib/errors/model/AssertionError.d.ts +16 -0
- package/lib/errors/model/AssertionError.d.ts.map +1 -0
- package/lib/errors/model/AssertionError.js +26 -0
- package/lib/errors/model/AssertionError.js.map +1 -0
- package/lib/errors/model/ConfigurationError.d.ts +16 -0
- package/lib/errors/model/ConfigurationError.d.ts.map +1 -0
- package/lib/errors/model/ConfigurationError.js +26 -0
- package/lib/errors/model/ConfigurationError.js.map +1 -0
- package/lib/errors/model/ImplementationPendingError.d.ts +37 -0
- package/lib/errors/model/ImplementationPendingError.d.ts.map +1 -0
- package/lib/errors/model/ImplementationPendingError.js +47 -0
- package/lib/errors/model/ImplementationPendingError.js.map +1 -0
- package/lib/errors/model/ListItemNotFoundError.d.ts +20 -0
- package/lib/errors/model/ListItemNotFoundError.d.ts.map +1 -0
- package/lib/errors/model/ListItemNotFoundError.js +30 -0
- package/lib/errors/model/ListItemNotFoundError.js.map +1 -0
- package/lib/errors/model/LogicError.d.ts +20 -0
- package/lib/errors/model/LogicError.d.ts.map +1 -0
- package/lib/errors/model/LogicError.js +30 -0
- package/lib/errors/model/LogicError.js.map +1 -0
- package/lib/errors/model/OperationInterruptedError.d.ts +20 -0
- package/lib/errors/model/OperationInterruptedError.d.ts.map +1 -0
- package/lib/errors/model/OperationInterruptedError.js +30 -0
- package/lib/errors/model/OperationInterruptedError.js.map +1 -0
- package/lib/errors/model/RuntimeError.d.ts +80 -0
- package/lib/errors/model/RuntimeError.d.ts.map +1 -0
- package/lib/errors/model/RuntimeError.js +97 -0
- package/lib/errors/model/RuntimeError.js.map +1 -0
- package/lib/errors/model/TestCompromisedError.d.ts +31 -0
- package/lib/errors/model/TestCompromisedError.d.ts.map +1 -0
- package/lib/errors/model/TestCompromisedError.js +41 -0
- package/lib/errors/model/TestCompromisedError.js.map +1 -0
- package/lib/errors/model/TimeoutExpiredError.d.ts +20 -0
- package/lib/errors/model/TimeoutExpiredError.d.ts.map +1 -0
- package/lib/errors/model/TimeoutExpiredError.js +30 -0
- package/lib/errors/model/TimeoutExpiredError.js.map +1 -0
- package/lib/errors/model/UnknownError.d.ts +16 -0
- package/lib/errors/model/UnknownError.d.ts.map +1 -0
- package/lib/errors/model/UnknownError.js +26 -0
- package/lib/errors/model/UnknownError.js.map +1 -0
- package/lib/errors/model/index.d.ts +11 -0
- package/lib/errors/model/index.d.ts.map +1 -0
- package/lib/errors/model/index.js +27 -0
- package/lib/errors/model/index.js.map +1 -0
- package/lib/events/ActivityFinished.d.ts +5 -5
- package/lib/events/ActivityFinished.d.ts.map +1 -0
- package/lib/events/ActivityFinished.js +2 -4
- package/lib/events/ActivityFinished.js.map +1 -1
- package/lib/events/ActivityRelatedArtifactArchived.d.ts +6 -1
- package/lib/events/ActivityRelatedArtifactArchived.d.ts.map +1 -0
- package/lib/events/ActivityRelatedArtifactArchived.js +7 -3
- package/lib/events/ActivityRelatedArtifactArchived.js.map +1 -1
- package/lib/events/ActivityRelatedArtifactGenerated.d.ts +6 -1
- package/lib/events/ActivityRelatedArtifactGenerated.d.ts.map +1 -0
- package/lib/events/ActivityRelatedArtifactGenerated.js +7 -3
- package/lib/events/ActivityRelatedArtifactGenerated.js.map +1 -1
- package/lib/events/ActivityStarts.d.ts +5 -5
- package/lib/events/ActivityStarts.d.ts.map +1 -0
- package/lib/events/ActivityStarts.js +2 -4
- package/lib/events/ActivityStarts.js.map +1 -1
- package/lib/events/ArtifactArchived.d.ts +6 -1
- package/lib/events/ArtifactArchived.d.ts.map +1 -0
- package/lib/events/ArtifactArchived.js +7 -3
- package/lib/events/ArtifactArchived.js.map +1 -1
- package/lib/events/ArtifactGenerated.d.ts +6 -1
- package/lib/events/ArtifactGenerated.d.ts.map +1 -0
- package/lib/events/ArtifactGenerated.js +7 -3
- package/lib/events/ArtifactGenerated.js.map +1 -1
- package/lib/events/AsyncOperationAborted.d.ts +14 -0
- package/lib/events/AsyncOperationAborted.d.ts.map +1 -0
- package/lib/events/AsyncOperationAborted.js +24 -0
- package/lib/events/AsyncOperationAborted.js.map +1 -0
- package/lib/events/AsyncOperationAttempted.d.ts +9 -3
- package/lib/events/AsyncOperationAttempted.d.ts.map +1 -0
- package/lib/events/AsyncOperationAttempted.js +12 -6
- package/lib/events/AsyncOperationAttempted.js.map +1 -1
- package/lib/events/AsyncOperationCompleted.d.ts +7 -3
- package/lib/events/AsyncOperationCompleted.d.ts.map +1 -0
- package/lib/events/AsyncOperationCompleted.js +8 -6
- package/lib/events/AsyncOperationCompleted.js.map +1 -1
- package/lib/events/AsyncOperationFailed.d.ts +6 -1
- package/lib/events/AsyncOperationFailed.d.ts.map +1 -0
- package/lib/events/AsyncOperationFailed.js +9 -5
- package/lib/events/AsyncOperationFailed.js.map +1 -1
- package/lib/events/BusinessRuleDetected.d.ts +6 -5
- package/lib/events/BusinessRuleDetected.d.ts.map +1 -0
- package/lib/events/BusinessRuleDetected.js +7 -7
- package/lib/events/BusinessRuleDetected.js.map +1 -1
- package/lib/events/DomainEvent.d.ts +5 -7
- package/lib/events/DomainEvent.d.ts.map +1 -0
- package/lib/events/DomainEvent.js +5 -8
- package/lib/events/DomainEvent.js.map +1 -1
- package/lib/events/FeatureNarrativeDetected.d.ts +6 -1
- package/lib/events/FeatureNarrativeDetected.d.ts.map +1 -0
- package/lib/events/FeatureNarrativeDetected.js +7 -3
- package/lib/events/FeatureNarrativeDetected.js.map +1 -1
- package/lib/events/InteractionFinished.d.ts +4 -0
- package/lib/events/InteractionFinished.d.ts.map +1 -0
- package/lib/events/InteractionFinished.js +5 -1
- package/lib/events/InteractionFinished.js.map +1 -1
- package/lib/events/InteractionStarts.d.ts +4 -0
- package/lib/events/InteractionStarts.d.ts.map +1 -0
- package/lib/events/InteractionStarts.js +5 -1
- package/lib/events/InteractionStarts.js.map +1 -1
- package/lib/events/RetryableSceneDetected.d.ts +9 -10
- package/lib/events/RetryableSceneDetected.d.ts.map +1 -0
- package/lib/events/RetryableSceneDetected.js +13 -15
- package/lib/events/RetryableSceneDetected.js.map +1 -1
- package/lib/events/SceneBackgroundDetected.d.ts +6 -1
- package/lib/events/SceneBackgroundDetected.d.ts.map +1 -0
- package/lib/events/SceneBackgroundDetected.js +8 -5
- package/lib/events/SceneBackgroundDetected.js.map +1 -1
- package/lib/events/SceneDescriptionDetected.d.ts +6 -1
- package/lib/events/SceneDescriptionDetected.d.ts.map +1 -0
- package/lib/events/SceneDescriptionDetected.js +7 -3
- package/lib/events/SceneDescriptionDetected.js.map +1 -1
- package/lib/events/SceneFinished.d.ts +6 -1
- package/lib/events/SceneFinished.d.ts.map +1 -0
- package/lib/events/SceneFinished.js +7 -3
- package/lib/events/SceneFinished.js.map +1 -1
- package/lib/events/SceneFinishes.d.ts +10 -4
- package/lib/events/SceneFinishes.d.ts.map +1 -0
- package/lib/events/SceneFinishes.js +11 -8
- package/lib/events/SceneFinishes.js.map +1 -1
- package/lib/events/SceneParametersDetected.d.ts +6 -1
- package/lib/events/SceneParametersDetected.d.ts.map +1 -0
- package/lib/events/SceneParametersDetected.js +7 -3
- package/lib/events/SceneParametersDetected.js.map +1 -1
- package/lib/events/SceneSequenceDetected.d.ts +6 -1
- package/lib/events/SceneSequenceDetected.d.ts.map +1 -0
- package/lib/events/SceneSequenceDetected.js +7 -3
- package/lib/events/SceneSequenceDetected.js.map +1 -1
- package/lib/events/SceneStarts.d.ts +6 -1
- package/lib/events/SceneStarts.d.ts.map +1 -0
- package/lib/events/SceneStarts.js +7 -3
- package/lib/events/SceneStarts.js.map +1 -1
- package/lib/events/SceneTagged.d.ts +6 -1
- package/lib/events/SceneTagged.d.ts.map +1 -0
- package/lib/events/SceneTagged.js +7 -3
- package/lib/events/SceneTagged.js.map +1 -1
- package/lib/events/SceneTemplateDetected.d.ts +6 -1
- package/lib/events/SceneTemplateDetected.d.ts.map +1 -0
- package/lib/events/SceneTemplateDetected.js +7 -3
- package/lib/events/SceneTemplateDetected.js.map +1 -1
- package/lib/events/TaskFinished.d.ts +4 -0
- package/lib/events/TaskFinished.d.ts.map +1 -0
- package/lib/events/TaskFinished.js +5 -1
- package/lib/events/TaskFinished.js.map +1 -1
- package/lib/events/TaskStarts.d.ts +4 -0
- package/lib/events/TaskStarts.d.ts.map +1 -0
- package/lib/events/TaskStarts.js +5 -1
- package/lib/events/TaskStarts.js.map +1 -1
- package/lib/events/TestRunFinished.d.ts +10 -5
- package/lib/events/TestRunFinished.d.ts.map +1 -0
- package/lib/events/TestRunFinished.js +8 -5
- package/lib/events/TestRunFinished.js.map +1 -1
- package/lib/events/TestRunFinishes.d.ts +6 -4
- package/lib/events/TestRunFinishes.d.ts.map +1 -0
- package/lib/events/TestRunFinishes.js +6 -5
- package/lib/events/TestRunFinishes.js.map +1 -1
- package/lib/events/TestRunStarts.d.ts +4 -4
- package/lib/events/TestRunStarts.d.ts.map +1 -0
- package/lib/events/TestRunStarts.js +4 -5
- package/lib/events/TestRunStarts.js.map +1 -1
- package/lib/events/TestRunnerDetected.d.ts +6 -2
- package/lib/events/TestRunnerDetected.d.ts.map +1 -0
- package/lib/events/TestRunnerDetected.js +9 -7
- package/lib/events/TestRunnerDetected.js.map +1 -1
- package/lib/events/TestSuiteFinished.d.ts +6 -1
- package/lib/events/TestSuiteFinished.d.ts.map +1 -0
- package/lib/events/TestSuiteFinished.js +7 -3
- package/lib/events/TestSuiteFinished.js.map +1 -1
- package/lib/events/TestSuiteStarts.d.ts +6 -1
- package/lib/events/TestSuiteStarts.d.ts.map +1 -0
- package/lib/events/TestSuiteStarts.js +7 -3
- package/lib/events/TestSuiteStarts.js.map +1 -1
- package/lib/events/index.d.ts +2 -0
- package/lib/events/index.d.ts.map +1 -0
- package/lib/events/index.js +6 -1
- package/lib/events/index.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +7 -7
- package/lib/index.js.map +1 -1
- package/lib/instance.d.ts +180 -90
- package/lib/instance.d.ts.map +1 -0
- package/lib/instance.js +179 -90
- package/lib/instance.js.map +1 -1
- package/lib/io/Config.d.ts +2 -1
- package/lib/io/Config.d.ts.map +1 -0
- package/lib/io/FileFinder.d.ts +1 -0
- package/lib/io/FileFinder.d.ts.map +1 -0
- package/lib/io/FileFinder.js +5 -2
- package/lib/io/FileFinder.js.map +1 -1
- package/lib/io/FileSystem.d.ts +3 -0
- package/lib/io/FileSystem.d.ts.map +1 -0
- package/lib/io/FileSystem.js +30 -4
- package/lib/io/FileSystem.js.map +1 -1
- package/lib/io/FileSystemLocation.d.ts +1 -0
- package/lib/io/FileSystemLocation.d.ts.map +1 -0
- package/lib/io/FileSystemLocation.js +3 -3
- package/lib/io/FileSystemLocation.js.map +1 -1
- package/lib/io/Path.d.ts +2 -0
- package/lib/io/Path.d.ts.map +1 -0
- package/lib/io/Path.js +22 -16
- package/lib/io/Path.js.map +1 -1
- package/lib/io/asyncMap.d.ts +4 -4
- package/lib/io/asyncMap.d.ts.map +1 -0
- package/lib/io/asyncMap.js +5 -5
- package/lib/io/asyncMap.js.map +1 -1
- package/lib/io/commaSeparated.d.ts +6 -6
- package/lib/io/commaSeparated.d.ts.map +1 -0
- package/lib/io/commaSeparated.js +8 -9
- package/lib/io/commaSeparated.js.map +1 -1
- package/lib/io/format.d.ts +46 -19
- package/lib/io/format.d.ts.map +1 -0
- package/lib/io/format.js +48 -22
- package/lib/io/format.js.map +1 -1
- package/lib/io/index.d.ts +4 -9
- package/lib/io/index.d.ts.map +1 -0
- package/lib/io/index.js +8 -10
- package/lib/io/index.js.map +1 -1
- package/lib/io/inspected.d.ts +4 -19
- package/lib/io/inspected.d.ts.map +1 -0
- package/lib/io/inspected.js +11 -222
- package/lib/io/inspected.js.map +1 -1
- package/lib/io/inspectedObject.d.ts +4 -0
- package/lib/io/inspectedObject.d.ts.map +1 -0
- package/lib/io/inspectedObject.js +55 -0
- package/lib/io/inspectedObject.js.map +1 -0
- package/lib/io/loader/ClassDescriptionParser.d.ts +8 -0
- package/lib/io/loader/ClassDescriptionParser.d.ts.map +1 -0
- package/lib/io/loader/ClassDescriptionParser.js +52 -0
- package/lib/io/loader/ClassDescriptionParser.js.map +1 -0
- package/lib/io/loader/ClassDescriptor.d.ts +7 -0
- package/lib/io/loader/ClassDescriptor.d.ts.map +1 -0
- package/lib/io/loader/ClassDescriptor.js +3 -0
- package/lib/io/loader/ClassDescriptor.js.map +1 -0
- package/lib/io/loader/ClassLoader.d.ts +11 -0
- package/lib/io/loader/ClassLoader.d.ts.map +1 -0
- package/lib/io/loader/ClassLoader.js +34 -0
- package/lib/io/loader/ClassLoader.js.map +1 -0
- package/lib/io/{ModuleLoader.d.ts → loader/ModuleLoader.d.ts} +11 -18
- package/lib/io/loader/ModuleLoader.d.ts.map +1 -0
- package/lib/io/loader/ModuleLoader.js +96 -0
- package/lib/io/loader/ModuleLoader.js.map +1 -0
- package/lib/io/{Version.d.ts → loader/Version.d.ts} +2 -4
- package/lib/io/loader/Version.d.ts.map +1 -0
- package/lib/io/{Version.js → loader/Version.js} +14 -14
- package/lib/io/loader/Version.js.map +1 -0
- package/lib/io/loader/index.d.ts +6 -0
- package/lib/io/loader/index.d.ts.map +1 -0
- package/lib/io/loader/index.js +22 -0
- package/lib/io/loader/index.js.map +1 -0
- package/lib/io/proxies.d.ts +1 -0
- package/lib/io/proxies.d.ts.map +1 -0
- package/lib/io/reflection/has.d.ts +4 -5
- package/lib/io/reflection/has.d.ts.map +1 -0
- package/lib/io/reflection/has.js +3 -5
- package/lib/io/reflection/has.js.map +1 -1
- package/lib/io/reflection/index.d.ts +3 -0
- package/lib/io/reflection/index.d.ts.map +1 -0
- package/lib/io/reflection/index.js +7 -1
- package/lib/io/reflection/index.js.map +1 -1
- package/lib/io/reflection/isPrimitive.d.ts +8 -0
- package/lib/io/reflection/isPrimitive.d.ts.map +1 -0
- package/lib/io/reflection/isPrimitive.js +24 -0
- package/lib/io/reflection/isPrimitive.js.map +1 -0
- package/lib/io/reflection/typeOf.d.ts +7 -0
- package/lib/io/reflection/typeOf.d.ts.map +1 -0
- package/lib/io/reflection/typeOf.js +35 -0
- package/lib/io/reflection/typeOf.js.map +1 -0
- package/lib/io/stringified.d.ts +24 -0
- package/lib/io/stringified.d.ts.map +1 -0
- package/lib/io/stringified.js +220 -0
- package/lib/io/stringified.js.map +1 -0
- package/lib/io/trimmed.d.ts +6 -7
- package/lib/io/trimmed.d.ts.map +1 -0
- package/lib/io/trimmed.js +6 -8
- package/lib/io/trimmed.js.map +1 -1
- package/lib/model/ActivityDetails.d.ts +9 -1
- package/lib/model/ActivityDetails.d.ts.map +1 -0
- package/lib/model/ActivityDetails.js +9 -4
- package/lib/model/ActivityDetails.js.map +1 -1
- package/lib/model/Artifact.d.ts +2 -1
- package/lib/model/Artifact.d.ts.map +1 -0
- package/lib/model/Artifact.js +29 -6
- package/lib/model/Artifact.js.map +1 -1
- package/lib/model/BusinessRule.d.ts +1 -0
- package/lib/model/BusinessRule.d.ts.map +1 -0
- package/lib/model/BusinessRule.js +3 -3
- package/lib/model/BusinessRule.js.map +1 -1
- package/lib/model/Category.d.ts +1 -0
- package/lib/model/Category.d.ts.map +1 -0
- package/lib/model/Category.js +3 -3
- package/lib/model/Category.js.map +1 -1
- package/lib/model/CorrelationId.d.ts +1 -0
- package/lib/model/CorrelationId.d.ts.map +1 -0
- package/lib/model/CorrelationId.js +5 -2
- package/lib/model/CorrelationId.js.map +1 -1
- package/lib/model/Description.d.ts +1 -0
- package/lib/model/Description.d.ts.map +1 -0
- package/lib/model/Description.js +3 -3
- package/lib/model/Description.js.map +1 -1
- package/lib/model/Name.d.ts +1 -0
- package/lib/model/Name.d.ts.map +1 -0
- package/lib/model/Name.js +3 -3
- package/lib/model/Name.js.map +1 -1
- package/lib/model/ScenarioDetails.d.ts +1 -0
- package/lib/model/ScenarioDetails.d.ts.map +1 -0
- package/lib/model/ScenarioDetails.js +6 -3
- package/lib/model/ScenarioDetails.js.map +1 -1
- package/lib/model/ScenarioParameters.d.ts +1 -0
- package/lib/model/ScenarioParameters.d.ts.map +1 -0
- package/lib/model/ScenarioParameters.js +3 -3
- package/lib/model/ScenarioParameters.js.map +1 -1
- package/lib/model/TestSuiteDetails.d.ts +1 -0
- package/lib/model/TestSuiteDetails.d.ts.map +1 -0
- package/lib/model/TestSuiteDetails.js +3 -3
- package/lib/model/TestSuiteDetails.js.map +1 -1
- package/lib/model/artifacts/HTTPRequestResponse.d.ts +6 -13
- package/lib/model/artifacts/HTTPRequestResponse.d.ts.map +1 -0
- package/lib/model/artifacts/HTTPRequestResponse.js +1 -4
- package/lib/model/artifacts/HTTPRequestResponse.js.map +1 -1
- package/lib/model/artifacts/JSONData.d.ts +1 -0
- package/lib/model/artifacts/JSONData.d.ts.map +1 -0
- package/lib/model/artifacts/LogEntry.d.ts +1 -0
- package/lib/model/artifacts/LogEntry.d.ts.map +1 -0
- package/lib/model/artifacts/Photo.d.ts +1 -8
- package/lib/model/artifacts/Photo.d.ts.map +1 -0
- package/lib/model/artifacts/Photo.js +0 -8
- package/lib/model/artifacts/Photo.js.map +1 -1
- package/lib/model/artifacts/TestReport.d.ts +1 -0
- package/lib/model/artifacts/TestReport.d.ts.map +1 -0
- package/lib/model/artifacts/TextData.d.ts +1 -0
- package/lib/model/artifacts/TextData.d.ts.map +1 -0
- package/lib/model/artifacts/index.d.ts +1 -1
- package/lib/model/artifacts/index.d.ts.map +1 -0
- package/lib/model/artifacts/index.js +5 -2
- package/lib/model/artifacts/index.js.map +1 -1
- package/lib/model/index.d.ts +1 -2
- package/lib/model/index.d.ts.map +1 -0
- package/lib/model/index.js +5 -3
- package/lib/model/index.js.map +1 -1
- package/lib/model/outcomes.d.ts +1 -0
- package/lib/model/outcomes.d.ts.map +1 -0
- package/lib/model/outcomes.js +7 -7
- package/lib/model/outcomes.js.map +1 -1
- package/lib/model/tags/ArbitraryTag.d.ts +3 -5
- package/lib/model/tags/ArbitraryTag.d.ts.map +1 -0
- package/lib/model/tags/ArbitraryTag.js +2 -5
- package/lib/model/tags/ArbitraryTag.js.map +1 -1
- package/lib/model/tags/BrowserTag.d.ts +1 -0
- package/lib/model/tags/BrowserTag.d.ts.map +1 -0
- package/lib/model/tags/BrowserTag.js +3 -3
- package/lib/model/tags/BrowserTag.js.map +1 -1
- package/lib/model/tags/CapabilityTag.d.ts +1 -0
- package/lib/model/tags/CapabilityTag.d.ts.map +1 -0
- package/lib/model/tags/ExecutionRetriedTag.d.ts +3 -5
- package/lib/model/tags/ExecutionRetriedTag.d.ts.map +1 -0
- package/lib/model/tags/ExecutionRetriedTag.js +5 -8
- package/lib/model/tags/ExecutionRetriedTag.js.map +1 -1
- package/lib/model/tags/FeatureTag.d.ts +1 -0
- package/lib/model/tags/FeatureTag.d.ts.map +1 -0
- package/lib/model/tags/IssueTag.d.ts +1 -0
- package/lib/model/tags/IssueTag.d.ts.map +1 -0
- package/lib/model/tags/ManualTag.d.ts +1 -0
- package/lib/model/tags/ManualTag.d.ts.map +1 -0
- package/lib/model/tags/PlatformTag.d.ts +1 -0
- package/lib/model/tags/PlatformTag.d.ts.map +1 -0
- package/lib/model/tags/PlatformTag.js +3 -3
- package/lib/model/tags/PlatformTag.js.map +1 -1
- package/lib/model/tags/Tag.d.ts +1 -0
- package/lib/model/tags/Tag.d.ts.map +1 -0
- package/lib/model/tags/Tag.js +31 -8
- package/lib/model/tags/Tag.js.map +1 -1
- package/lib/model/tags/Tags.d.ts +1 -0
- package/lib/model/tags/Tags.d.ts.map +1 -0
- package/lib/model/tags/ThemeTag.d.ts +1 -0
- package/lib/model/tags/ThemeTag.d.ts.map +1 -0
- package/lib/model/tags/index.d.ts +1 -1
- package/lib/model/tags/index.d.ts.map +1 -0
- package/lib/model/tags/index.js +5 -2
- package/lib/model/tags/index.js.map +1 -1
- package/lib/screenplay/Activity.d.ts +35 -19
- package/lib/screenplay/Activity.d.ts.map +1 -0
- package/lib/screenplay/Activity.js +74 -0
- package/lib/screenplay/Activity.js.map +1 -1
- package/lib/screenplay/Actor.d.ts +146 -0
- package/lib/screenplay/Actor.d.ts.map +1 -0
- package/lib/screenplay/Actor.js +283 -0
- package/lib/screenplay/Actor.js.map +1 -0
- package/lib/screenplay/Answerable.d.ts +5 -7
- package/lib/screenplay/Answerable.d.ts.map +1 -0
- package/lib/screenplay/Answered.d.ts +13 -0
- package/lib/screenplay/Answered.d.ts.map +1 -0
- package/lib/screenplay/{Ability.js → Answered.js} +1 -1
- package/lib/screenplay/Answered.js.map +1 -0
- package/lib/screenplay/Interaction.d.ts +81 -18
- package/lib/screenplay/Interaction.d.ts.map +1 -0
- package/lib/screenplay/Interaction.js +70 -28
- package/lib/screenplay/Interaction.js.map +1 -1
- package/lib/screenplay/Optional.d.ts +15 -18
- package/lib/screenplay/Optional.d.ts.map +1 -0
- package/lib/screenplay/Question.d.ts +201 -70
- package/lib/screenplay/Question.d.ts.map +1 -0
- package/lib/screenplay/Question.js +295 -75
- package/lib/screenplay/Question.js.map +1 -1
- package/lib/screenplay/RecursivelyAnswered.d.ts +40 -0
- package/lib/screenplay/RecursivelyAnswered.d.ts.map +1 -0
- package/lib/screenplay/RecursivelyAnswered.js +3 -0
- package/lib/screenplay/RecursivelyAnswered.js.map +1 -0
- package/lib/screenplay/Task.d.ts +180 -40
- package/lib/screenplay/Task.d.ts.map +1 -0
- package/lib/screenplay/Task.js +175 -76
- package/lib/screenplay/Task.js.map +1 -1
- package/lib/screenplay/WithAnswerableProperties.d.ts +33 -0
- package/lib/screenplay/WithAnswerableProperties.d.ts.map +1 -0
- package/lib/screenplay/WithAnswerableProperties.js +3 -0
- package/lib/screenplay/WithAnswerableProperties.js.map +1 -0
- package/lib/screenplay/abilities/Ability.d.ts +397 -0
- package/lib/screenplay/abilities/Ability.d.ts.map +1 -0
- package/lib/screenplay/abilities/Ability.js +401 -0
- package/lib/screenplay/abilities/Ability.js.map +1 -0
- package/lib/screenplay/abilities/AbilityType.d.ts +45 -0
- package/lib/screenplay/abilities/AbilityType.d.ts.map +1 -0
- package/lib/screenplay/abilities/AbilityType.js.map +1 -0
- package/lib/screenplay/abilities/CanHaveAbilities.d.ts +19 -0
- package/lib/screenplay/abilities/CanHaveAbilities.d.ts.map +1 -0
- package/lib/screenplay/abilities/CanHaveAbilities.js.map +1 -0
- package/lib/screenplay/abilities/Discardable.d.ts +19 -7
- package/lib/screenplay/abilities/Discardable.d.ts.map +1 -0
- package/lib/screenplay/abilities/Initialisable.d.ts +18 -16
- package/lib/screenplay/abilities/Initialisable.d.ts.map +1 -0
- package/lib/screenplay/abilities/UsesAbilities.d.ts +23 -0
- package/lib/screenplay/abilities/UsesAbilities.d.ts.map +1 -0
- package/lib/screenplay/abilities/UsesAbilities.js.map +1 -0
- package/lib/screenplay/abilities/index.d.ts +5 -1
- package/lib/screenplay/abilities/index.d.ts.map +1 -0
- package/lib/screenplay/abilities/index.js +9 -2
- package/lib/screenplay/abilities/index.js.map +1 -1
- package/lib/screenplay/activities/PerformsActivities.d.ts +20 -0
- package/lib/screenplay/activities/PerformsActivities.d.ts.map +1 -0
- package/lib/screenplay/activities/PerformsActivities.js.map +1 -0
- package/lib/screenplay/activities/index.d.ts +2 -1
- package/lib/screenplay/activities/index.d.ts.map +1 -0
- package/lib/screenplay/activities/index.js +6 -2
- package/lib/screenplay/activities/index.js.map +1 -1
- package/lib/screenplay/artifacts/CollectsArtifacts.d.ts +24 -0
- package/lib/screenplay/artifacts/CollectsArtifacts.d.ts.map +1 -0
- package/lib/screenplay/artifacts/CollectsArtifacts.js.map +1 -0
- package/lib/screenplay/artifacts/index.d.ts +2 -0
- package/lib/screenplay/artifacts/index.d.ts.map +1 -0
- package/lib/screenplay/{actor → artifacts}/index.js +5 -6
- package/lib/screenplay/artifacts/index.js.map +1 -0
- package/lib/screenplay/debugging/Debug.d.ts +107 -0
- package/lib/screenplay/debugging/Debug.d.ts.map +1 -0
- package/lib/screenplay/debugging/Debug.js +131 -0
- package/lib/screenplay/debugging/Debug.js.map +1 -0
- package/lib/screenplay/debugging/DebuggingResult.d.ts +11 -0
- package/lib/screenplay/debugging/DebuggingResult.d.ts.map +1 -0
- package/lib/screenplay/debugging/DebuggingResult.js +3 -0
- package/lib/screenplay/debugging/DebuggingResult.js.map +1 -0
- package/lib/screenplay/debugging/Log.d.ts +47 -0
- package/lib/screenplay/debugging/Log.d.ts.map +1 -0
- package/lib/screenplay/debugging/Log.js +59 -0
- package/lib/screenplay/debugging/Log.js.map +1 -0
- package/lib/screenplay/debugging/index.d.ts +4 -0
- package/lib/screenplay/debugging/index.d.ts.map +1 -0
- package/lib/screenplay/debugging/index.js +20 -0
- package/lib/screenplay/debugging/index.js.map +1 -0
- package/lib/screenplay/index.d.ts +10 -4
- package/lib/screenplay/index.d.ts.map +1 -0
- package/lib/screenplay/index.js +14 -5
- package/lib/screenplay/index.js.map +1 -1
- package/lib/screenplay/notes/ChainableSetter.d.ts +9 -0
- package/lib/screenplay/notes/ChainableSetter.d.ts.map +1 -0
- package/lib/screenplay/notes/ChainableSetter.js +3 -0
- package/lib/screenplay/notes/ChainableSetter.js.map +1 -0
- package/lib/screenplay/notes/Notepad.d.ts +164 -0
- package/lib/screenplay/notes/Notepad.d.ts.map +1 -0
- package/lib/screenplay/notes/Notepad.js +200 -0
- package/lib/screenplay/notes/Notepad.js.map +1 -0
- package/lib/screenplay/notes/NotepadAdapter.d.ts +245 -0
- package/lib/screenplay/notes/NotepadAdapter.d.ts.map +1 -0
- package/lib/screenplay/notes/NotepadAdapter.js +298 -0
- package/lib/screenplay/notes/NotepadAdapter.js.map +1 -0
- package/lib/screenplay/notes/TakeNotes.d.ts +249 -0
- package/lib/screenplay/notes/TakeNotes.d.ts.map +1 -0
- package/lib/screenplay/notes/TakeNotes.js +259 -0
- package/lib/screenplay/notes/TakeNotes.js.map +1 -0
- package/lib/screenplay/notes/index.d.ts +6 -0
- package/lib/screenplay/notes/index.d.ts.map +1 -0
- package/lib/screenplay/notes/index.js +22 -0
- package/lib/screenplay/notes/index.js.map +1 -0
- package/lib/screenplay/notes/notes.d.ts +117 -0
- package/lib/screenplay/notes/notes.d.ts.map +1 -0
- package/lib/screenplay/notes/notes.js +123 -0
- package/lib/screenplay/notes/notes.js.map +1 -0
- package/lib/screenplay/questions/AnswersQuestions.d.ts +19 -0
- package/lib/screenplay/questions/AnswersQuestions.d.ts.map +1 -0
- package/lib/screenplay/questions/AnswersQuestions.js.map +1 -0
- package/lib/screenplay/questions/Check.d.ts +39 -57
- package/lib/screenplay/questions/Check.d.ts.map +1 -0
- package/lib/screenplay/questions/Check.js +41 -63
- package/lib/screenplay/questions/Check.js.map +1 -1
- package/lib/screenplay/questions/Expectation.d.ts +155 -44
- package/lib/screenplay/questions/Expectation.d.ts.map +1 -0
- package/lib/screenplay/questions/Expectation.js +172 -46
- package/lib/screenplay/questions/Expectation.js.map +1 -1
- package/lib/screenplay/questions/List.d.ts +14 -2
- package/lib/screenplay/questions/List.d.ts.map +1 -0
- package/lib/screenplay/questions/List.js +14 -11
- package/lib/screenplay/questions/List.js.map +1 -1
- package/lib/screenplay/questions/MetaQuestion.d.ts +18 -22
- package/lib/screenplay/questions/MetaQuestion.d.ts.map +1 -0
- package/lib/screenplay/questions/Unanswered.d.ts +20 -0
- package/lib/screenplay/questions/Unanswered.d.ts.map +1 -0
- package/lib/screenplay/questions/Unanswered.js +52 -0
- package/lib/screenplay/questions/Unanswered.js.map +1 -0
- package/lib/screenplay/questions/expectations/ExpectationDetails.d.ts +24 -0
- package/lib/screenplay/questions/expectations/ExpectationDetails.d.ts.map +1 -0
- package/lib/screenplay/questions/expectations/ExpectationDetails.js +55 -0
- package/lib/screenplay/questions/expectations/ExpectationDetails.js.map +1 -0
- package/lib/screenplay/questions/expectations/ExpectationMet.d.ts +7 -1
- package/lib/screenplay/questions/expectations/ExpectationMet.d.ts.map +1 -0
- package/lib/screenplay/questions/expectations/ExpectationMet.js +5 -0
- package/lib/screenplay/questions/expectations/ExpectationMet.js.map +1 -1
- package/lib/screenplay/questions/expectations/ExpectationNotMet.d.ts +7 -1
- package/lib/screenplay/questions/expectations/ExpectationNotMet.d.ts.map +1 -0
- package/lib/screenplay/questions/expectations/ExpectationNotMet.js +5 -0
- package/lib/screenplay/questions/expectations/ExpectationNotMet.js.map +1 -1
- package/lib/screenplay/questions/expectations/ExpectationOutcome.d.ts +13 -4
- package/lib/screenplay/questions/expectations/ExpectationOutcome.d.ts.map +1 -0
- package/lib/screenplay/questions/expectations/ExpectationOutcome.js +8 -1
- package/lib/screenplay/questions/expectations/ExpectationOutcome.js.map +1 -1
- package/lib/screenplay/questions/expectations/index.d.ts +2 -0
- package/lib/screenplay/questions/expectations/index.d.ts.map +1 -0
- package/lib/screenplay/questions/expectations/index.js +6 -1
- package/lib/screenplay/questions/expectations/index.js.map +1 -1
- package/lib/screenplay/questions/index.d.ts +3 -1
- package/lib/screenplay/questions/index.d.ts.map +1 -0
- package/lib/screenplay/questions/index.js +7 -2
- package/lib/screenplay/questions/index.js.map +1 -1
- package/lib/screenplay/questions/q.d.ts +56 -25
- package/lib/screenplay/questions/q.d.ts.map +1 -0
- package/lib/screenplay/questions/q.js +53 -23
- package/lib/screenplay/questions/q.js.map +1 -1
- package/lib/screenplay/time/abilities/ScheduleWork.d.ts +26 -0
- package/lib/screenplay/time/abilities/ScheduleWork.d.ts.map +1 -0
- package/lib/screenplay/time/abilities/ScheduleWork.js +45 -0
- package/lib/screenplay/time/abilities/ScheduleWork.js.map +1 -0
- package/lib/screenplay/time/abilities/index.d.ts +2 -0
- package/lib/screenplay/time/abilities/index.d.ts.map +1 -0
- package/lib/{io/json → screenplay/time/abilities}/index.js +6 -2
- package/lib/screenplay/time/abilities/index.js.map +1 -0
- package/lib/screenplay/time/activities/Wait.d.ts +212 -0
- package/lib/screenplay/time/activities/Wait.d.ts.map +1 -0
- package/lib/screenplay/time/activities/Wait.js +270 -0
- package/lib/screenplay/time/activities/Wait.js.map +1 -0
- package/lib/screenplay/time/activities/index.d.ts +2 -0
- package/lib/screenplay/time/activities/index.d.ts.map +1 -0
- package/lib/screenplay/{interactions → time/activities}/index.js +6 -3
- package/lib/screenplay/time/activities/index.js.map +1 -0
- package/lib/screenplay/time/index.d.ts +4 -0
- package/lib/screenplay/time/index.d.ts.map +1 -0
- package/lib/screenplay/time/index.js +20 -0
- package/lib/screenplay/time/index.js.map +1 -0
- package/lib/screenplay/time/models/Clock.d.ts +24 -0
- package/lib/screenplay/time/models/Clock.d.ts.map +1 -0
- package/lib/screenplay/time/models/Clock.js +31 -0
- package/lib/screenplay/time/models/Clock.js.map +1 -0
- package/lib/screenplay/time/models/DelayedCallback.d.ts +11 -0
- package/lib/screenplay/time/models/DelayedCallback.d.ts.map +1 -0
- package/lib/screenplay/time/models/DelayedCallback.js +3 -0
- package/lib/screenplay/time/models/DelayedCallback.js.map +1 -0
- package/lib/{model → screenplay/time/models}/Duration.d.ts +11 -1
- package/lib/screenplay/time/models/Duration.d.ts.map +1 -0
- package/lib/{model → screenplay/time/models}/Duration.js +14 -0
- package/lib/screenplay/time/models/Duration.js.map +1 -0
- package/lib/screenplay/time/models/RepeatUntilLimits.d.ts +12 -0
- package/lib/screenplay/time/models/RepeatUntilLimits.d.ts.map +1 -0
- package/lib/screenplay/time/models/RepeatUntilLimits.js +3 -0
- package/lib/screenplay/time/models/RepeatUntilLimits.js.map +1 -0
- package/lib/screenplay/time/models/Scheduler.d.ts +43 -0
- package/lib/screenplay/time/models/Scheduler.d.ts.map +1 -0
- package/lib/screenplay/time/models/Scheduler.js +166 -0
- package/lib/screenplay/time/models/Scheduler.js.map +1 -0
- package/lib/{model → screenplay/time/models}/Timestamp.d.ts +16 -0
- package/lib/screenplay/time/models/Timestamp.d.ts.map +1 -0
- package/lib/screenplay/time/models/Timestamp.js +81 -0
- package/lib/screenplay/time/models/Timestamp.js.map +1 -0
- package/lib/screenplay/time/models/index.d.ts +7 -0
- package/lib/screenplay/time/models/index.d.ts.map +1 -0
- package/lib/screenplay/time/models/index.js +23 -0
- package/lib/screenplay/time/models/index.js.map +1 -0
- package/lib/stage/Cast.d.ts +142 -49
- package/lib/stage/Cast.d.ts.map +1 -0
- package/lib/stage/Cast.js +141 -55
- package/lib/stage/Cast.js.map +1 -1
- package/lib/stage/Extras.d.ts +2 -4
- package/lib/stage/Extras.d.ts.map +1 -0
- package/lib/stage/Extras.js +1 -4
- package/lib/stage/Extras.js.map +1 -1
- package/lib/stage/ListensToDomainEvents.d.ts +14 -11
- package/lib/stage/ListensToDomainEvents.d.ts.map +1 -0
- package/lib/stage/Stage.d.ts +81 -100
- package/lib/stage/Stage.d.ts.map +1 -0
- package/lib/stage/Stage.js +122 -119
- package/lib/stage/Stage.js.map +1 -1
- package/lib/stage/StageCrewMember.d.ts +67 -15
- package/lib/stage/StageCrewMember.d.ts.map +1 -0
- package/lib/stage/StageCrewMemberBuilder.d.ts +14 -12
- package/lib/stage/StageCrewMemberBuilder.d.ts.map +1 -0
- package/lib/stage/StageCrewMemberBuilderDependencies.d.ts +6 -13
- package/lib/stage/StageCrewMemberBuilderDependencies.d.ts.map +1 -0
- package/lib/stage/StageManager.d.ts +6 -2
- package/lib/stage/StageManager.d.ts.map +1 -0
- package/lib/stage/StageManager.js +22 -20
- package/lib/stage/StageManager.js.map +1 -1
- package/lib/stage/crew/artifact-archiver/ArtifactArchiver.d.ts +70 -47
- package/lib/stage/crew/artifact-archiver/ArtifactArchiver.d.ts.map +1 -0
- package/lib/stage/crew/artifact-archiver/ArtifactArchiver.js +80 -56
- package/lib/stage/crew/artifact-archiver/ArtifactArchiver.js.map +1 -1
- package/lib/stage/crew/artifact-archiver/Hash.d.ts +1 -0
- package/lib/stage/crew/artifact-archiver/Hash.d.ts.map +1 -0
- package/lib/stage/crew/artifact-archiver/Hash.js +3 -3
- package/lib/stage/crew/artifact-archiver/Hash.js.map +1 -1
- package/lib/stage/crew/artifact-archiver/index.d.ts +1 -0
- package/lib/stage/crew/artifact-archiver/index.d.ts.map +1 -0
- package/lib/stage/crew/artifact-archiver/index.js +5 -1
- package/lib/stage/crew/artifact-archiver/index.js.map +1 -1
- package/lib/stage/crew/index.d.ts +1 -0
- package/lib/stage/crew/index.d.ts.map +1 -0
- package/lib/stage/crew/index.js +5 -1
- package/lib/stage/crew/index.js.map +1 -1
- package/lib/stage/crew/stream-reporter/StreamReporter.d.ts +82 -54
- package/lib/stage/crew/stream-reporter/StreamReporter.d.ts.map +1 -0
- package/lib/stage/crew/stream-reporter/StreamReporter.js +81 -54
- package/lib/stage/crew/stream-reporter/StreamReporter.js.map +1 -1
- package/lib/stage/crew/stream-reporter/index.d.ts +1 -0
- package/lib/stage/crew/stream-reporter/index.d.ts.map +1 -0
- package/lib/stage/crew/stream-reporter/index.js +5 -1
- package/lib/stage/crew/stream-reporter/index.js.map +1 -1
- package/lib/stage/index.d.ts +2 -1
- package/lib/stage/index.d.ts.map +1 -0
- package/lib/stage/index.js +6 -2
- package/lib/stage/index.js.map +1 -1
- package/lib/stage/queues/DomainEventQueue.d.ts +25 -0
- package/lib/stage/queues/DomainEventQueue.d.ts.map +1 -0
- package/lib/stage/queues/DomainEventQueue.js +33 -0
- package/lib/stage/queues/DomainEventQueue.js.map +1 -0
- package/lib/stage/queues/DomainEventQueues.d.ts +22 -0
- package/lib/stage/queues/DomainEventQueues.d.ts.map +1 -0
- package/lib/stage/queues/DomainEventQueues.js +76 -0
- package/lib/stage/queues/DomainEventQueues.js.map +1 -0
- package/lib/stage/queues/index.d.ts +3 -0
- package/lib/stage/queues/index.d.ts.map +1 -0
- package/lib/stage/queues/index.js +19 -0
- package/lib/stage/queues/index.js.map +1 -0
- package/package.json +31 -51
- package/src/Serenity.ts +183 -88
- package/src/adapter/OutputStream.ts +13 -0
- package/src/adapter/TestRunnerAdapter.ts +35 -0
- package/src/adapter/index.ts +2 -0
- package/src/config/ClassDescription.ts +55 -0
- package/src/config/SerenityConfig.ts +79 -0
- package/src/config/index.ts +2 -0
- package/src/errors/ErrorFactory.ts +329 -0
- package/src/errors/ErrorOptions.ts +16 -0
- package/src/errors/ErrorSerialiser.ts +106 -0
- package/src/{io → errors}/ErrorStackParser.ts +4 -4
- package/src/errors/RaiseErrors.ts +61 -0
- package/src/errors/diff/AnsiDiffFormatter.ts +41 -0
- package/src/errors/diff/DiffFormatter.ts +12 -0
- package/src/errors/diff/NoOpDiffFormatter.ts +20 -0
- package/src/errors/diff/index.ts +3 -0
- package/src/errors/index.ts +28 -7
- package/src/errors/model/AssertionError.ts +31 -0
- package/src/errors/model/ConfigurationError.ts +31 -0
- package/src/errors/model/ImplementationPendingError.ts +52 -0
- package/src/errors/model/ListItemNotFoundError.ts +35 -0
- package/src/errors/model/LogicError.ts +35 -0
- package/src/errors/model/OperationInterruptedError.ts +38 -0
- package/src/errors/model/RuntimeError.ts +101 -0
- package/src/errors/model/TestCompromisedError.ts +46 -0
- package/src/errors/model/TimeoutExpiredError.ts +38 -0
- package/src/errors/model/UnknownError.ts +31 -0
- package/src/errors/model/index.ts +10 -0
- package/src/events/ActivityFinished.ts +4 -5
- package/src/events/ActivityRelatedArtifactArchived.ts +6 -1
- package/src/events/ActivityRelatedArtifactGenerated.ts +5 -1
- package/src/events/ActivityStarts.ts +4 -5
- package/src/events/ArtifactArchived.ts +5 -1
- package/src/events/ArtifactGenerated.ts +5 -1
- package/src/events/AsyncOperationAborted.ts +28 -0
- package/src/events/AsyncOperationAttempted.ts +11 -4
- package/src/events/AsyncOperationCompleted.ts +5 -4
- package/src/events/AsyncOperationFailed.ts +6 -2
- package/src/events/BusinessRuleDetected.ts +5 -5
- package/src/events/DomainEvent.ts +4 -7
- package/src/events/FeatureNarrativeDetected.ts +5 -1
- package/src/events/InteractionFinished.ts +5 -1
- package/src/events/InteractionStarts.ts +5 -1
- package/src/events/RetryableSceneDetected.ts +8 -10
- package/src/events/SceneBackgroundDetected.ts +6 -1
- package/src/events/SceneDescriptionDetected.ts +5 -1
- package/src/events/SceneFinished.ts +5 -1
- package/src/events/SceneFinishes.ts +8 -7
- package/src/events/SceneParametersDetected.ts +5 -1
- package/src/events/SceneSequenceDetected.ts +5 -1
- package/src/events/SceneStarts.ts +5 -1
- package/src/events/SceneTagged.ts +5 -1
- package/src/events/SceneTemplateDetected.ts +5 -1
- package/src/events/TaskFinished.ts +5 -1
- package/src/events/TaskStarts.ts +5 -1
- package/src/events/TestRunFinished.ts +14 -6
- package/src/events/TestRunFinishes.ts +5 -4
- package/src/events/TestRunStarts.ts +3 -4
- package/src/events/TestRunnerDetected.ts +7 -4
- package/src/events/TestSuiteFinished.ts +5 -1
- package/src/events/TestSuiteStarts.ts +5 -1
- package/src/events/index.ts +1 -0
- package/src/index.ts +1 -2
- package/src/instance.ts +180 -91
- package/src/io/FileFinder.ts +2 -1
- package/src/io/FileSystem.ts +1 -1
- package/src/io/Path.ts +6 -3
- package/src/io/asyncMap.ts +6 -5
- package/src/io/commaSeparated.ts +8 -9
- package/src/io/format.ts +49 -22
- package/src/io/index.ts +3 -9
- package/src/io/inspected.ts +13 -271
- package/src/io/inspectedObject.ts +38 -0
- package/src/io/loader/ClassDescriptionParser.ts +67 -0
- package/src/io/loader/ClassDescriptor.ts +7 -0
- package/src/io/loader/ClassLoader.ts +42 -0
- package/src/io/{ModuleLoader.ts → loader/ModuleLoader.ts} +11 -19
- package/src/io/{Version.ts → loader/Version.ts} +2 -5
- package/src/io/loader/index.ts +5 -0
- package/src/io/reflection/has.ts +3 -5
- package/src/io/reflection/index.ts +2 -0
- package/src/io/reflection/isPrimitive.ts +20 -0
- package/src/io/reflection/typeOf.ts +31 -0
- package/src/io/stringified.ts +266 -0
- package/src/io/trimmed.ts +7 -9
- package/src/model/ActivityDetails.ts +8 -2
- package/src/model/CorrelationId.ts +1 -1
- package/src/model/ScenarioDetails.ts +4 -1
- package/src/model/artifacts/HTTPRequestResponse.ts +6 -10
- package/src/model/artifacts/Photo.ts +0 -8
- package/src/model/artifacts/index.ts +0 -1
- package/src/model/index.ts +0 -2
- package/src/model/outcomes.ts +5 -4
- package/src/model/tags/ArbitraryTag.ts +2 -5
- package/src/model/tags/ExecutionRetriedTag.ts +2 -5
- package/src/model/tags/index.ts +0 -1
- package/src/screenplay/Activity.ts +78 -20
- package/src/screenplay/Actor.ts +370 -0
- package/src/screenplay/Answerable.ts +3 -6
- package/src/screenplay/Answered.ts +16 -0
- package/src/screenplay/Interaction.ts +85 -42
- package/src/screenplay/Optional.ts +14 -18
- package/src/screenplay/Question.ts +369 -114
- package/src/screenplay/RecursivelyAnswered.ts +43 -0
- package/src/screenplay/Task.ts +185 -88
- package/src/screenplay/WithAnswerableProperties.ts +36 -0
- package/src/screenplay/abilities/Ability.ts +403 -0
- package/src/screenplay/abilities/AbilityType.ts +46 -0
- package/src/screenplay/abilities/CanHaveAbilities.ts +20 -0
- package/src/screenplay/abilities/Discardable.ts +19 -7
- package/src/screenplay/abilities/Initialisable.ts +17 -16
- package/src/screenplay/abilities/UsesAbilities.ts +24 -0
- package/src/screenplay/abilities/index.ts +4 -1
- package/src/screenplay/activities/PerformsActivities.ts +21 -0
- package/src/screenplay/activities/index.ts +1 -1
- package/src/screenplay/artifacts/CollectsArtifacts.ts +25 -0
- package/src/screenplay/artifacts/index.ts +1 -0
- package/src/screenplay/debugging/Debug.ts +161 -0
- package/src/screenplay/debugging/DebuggingResult.ts +10 -0
- package/src/screenplay/debugging/Log.ts +68 -0
- package/src/screenplay/debugging/index.ts +3 -0
- package/src/screenplay/index.ts +9 -4
- package/src/screenplay/notes/ChainableSetter.ts +9 -0
- package/src/screenplay/notes/Notepad.ts +208 -0
- package/src/screenplay/notes/NotepadAdapter.ts +317 -0
- package/src/screenplay/notes/TakeNotes.ts +257 -0
- package/src/screenplay/notes/index.ts +5 -0
- package/src/screenplay/notes/notes.ts +120 -0
- package/src/screenplay/questions/AnswersQuestions.ts +20 -0
- package/src/screenplay/questions/Check.ts +41 -62
- package/src/screenplay/questions/Expectation.ts +211 -65
- package/src/screenplay/questions/List.ts +18 -11
- package/src/screenplay/questions/MetaQuestion.ts +18 -22
- package/src/screenplay/questions/Unanswered.ts +27 -0
- package/src/screenplay/questions/expectations/ExpectationDetails.ts +64 -0
- package/src/screenplay/questions/expectations/ExpectationMet.ts +6 -1
- package/src/screenplay/questions/expectations/ExpectationNotMet.ts +6 -1
- package/src/screenplay/questions/expectations/ExpectationOutcome.ts +12 -3
- package/src/screenplay/questions/expectations/index.ts +1 -0
- package/src/screenplay/questions/index.ts +2 -1
- package/src/screenplay/questions/q.ts +55 -25
- package/src/screenplay/time/abilities/ScheduleWork.ts +52 -0
- package/src/screenplay/time/abilities/index.ts +1 -0
- package/src/screenplay/time/activities/Wait.ts +294 -0
- package/src/screenplay/time/activities/index.ts +1 -0
- package/src/screenplay/time/index.ts +3 -0
- package/src/screenplay/time/models/Clock.ts +28 -0
- package/src/screenplay/time/models/DelayedCallback.ts +8 -0
- package/src/{model → screenplay/time/models}/Duration.ts +17 -1
- package/src/screenplay/time/models/RepeatUntilLimits.ts +12 -0
- package/src/screenplay/time/models/Scheduler.ts +226 -0
- package/src/{model → screenplay/time/models}/Timestamp.ts +36 -2
- package/src/screenplay/time/models/index.ts +6 -0
- package/src/stage/Cast.ts +147 -62
- package/src/stage/Extras.ts +1 -4
- package/src/stage/ListensToDomainEvents.ts +13 -11
- package/src/stage/Stage.ts +140 -130
- package/src/stage/StageCrewMember.ts +66 -15
- package/src/stage/StageCrewMemberBuilder.ts +13 -12
- package/src/stage/StageCrewMemberBuilderDependencies.ts +5 -15
- package/src/stage/StageManager.ts +44 -44
- package/src/stage/crew/artifact-archiver/ArtifactArchiver.ts +81 -53
- package/src/stage/crew/stream-reporter/StreamReporter.ts +81 -54
- package/src/stage/index.ts +1 -1
- package/src/stage/queues/DomainEventQueue.ts +41 -0
- package/src/stage/queues/DomainEventQueues.ts +88 -0
- package/src/stage/queues/index.ts +2 -0
- package/tsconfig.build.json +10 -0
- package/lib/SerenityConfig.d.ts +0 -45
- package/lib/SerenityConfig.js +0 -12
- package/lib/SerenityConfig.js.map +0 -1
- package/lib/errors/AssertionError.d.ts +0 -18
- package/lib/errors/AssertionError.js +0 -25
- package/lib/errors/AssertionError.js.map +0 -1
- package/lib/errors/ConfigurationError.d.ts +0 -14
- package/lib/errors/ConfigurationError.js +0 -21
- package/lib/errors/ConfigurationError.js.map +0 -1
- package/lib/errors/ImplementationPendingError.d.ts +0 -29
- package/lib/errors/ImplementationPendingError.js +0 -36
- package/lib/errors/ImplementationPendingError.js.map +0 -1
- package/lib/errors/LogicError.d.ts +0 -17
- package/lib/errors/LogicError.js +0 -24
- package/lib/errors/LogicError.js.map +0 -1
- package/lib/errors/RuntimeError.d.ts +0 -43
- package/lib/errors/RuntimeError.js +0 -58
- package/lib/errors/RuntimeError.js.map +0 -1
- package/lib/errors/TestCompromisedError.d.ts +0 -26
- package/lib/errors/TestCompromisedError.js +0 -33
- package/lib/errors/TestCompromisedError.js.map +0 -1
- package/lib/errors/UnknownError.d.ts +0 -14
- package/lib/errors/UnknownError.js +0 -21
- package/lib/errors/UnknownError.js.map +0 -1
- package/lib/io/AssertionReportDiffer.d.ts +0 -12
- package/lib/io/AssertionReportDiffer.js +0 -34
- package/lib/io/AssertionReportDiffer.js.map +0 -1
- package/lib/io/ErrorSerialiser.d.ts +0 -27
- package/lib/io/ErrorSerialiser.js.map +0 -1
- package/lib/io/ErrorStackParser.d.ts +0 -12
- package/lib/io/ErrorStackParser.js +0 -19
- package/lib/io/ErrorStackParser.js.map +0 -1
- package/lib/io/ModuleLoader.js +0 -81
- package/lib/io/ModuleLoader.js.map +0 -1
- package/lib/io/OutputStream.d.ts +0 -16
- package/lib/io/TestRunnerAdapter.d.ts +0 -47
- package/lib/io/TestRunnerAdapter.js.map +0 -1
- package/lib/io/Version.js.map +0 -1
- package/lib/io/formatted.d.ts +0 -16
- package/lib/io/formatted.js +0 -23
- package/lib/io/formatted.js.map +0 -1
- package/lib/io/json/cycle.d.ts +0 -11
- package/lib/io/json/cycle.js +0 -165
- package/lib/io/json/cycle.js.map +0 -1
- package/lib/io/json/index.d.ts +0 -1
- package/lib/io/json/index.js.map +0 -1
- package/lib/model/Duration.js.map +0 -1
- package/lib/model/Timestamp.js +0 -48
- package/lib/model/Timestamp.js.map +0 -1
- package/lib/model/artifacts/AssertionReport.d.ts +0 -7
- package/lib/model/artifacts/AssertionReport.js +0 -11
- package/lib/model/artifacts/AssertionReport.js.map +0 -1
- package/lib/model/tags/ContextTag.d.ts +0 -17
- package/lib/model/tags/ContextTag.js +0 -24
- package/lib/model/tags/ContextTag.js.map +0 -1
- package/lib/screenplay/Ability.d.ts +0 -100
- package/lib/screenplay/Ability.js.map +0 -1
- package/lib/screenplay/AbilityType.d.ts +0 -42
- package/lib/screenplay/AbilityType.js.map +0 -1
- package/lib/screenplay/abilities/TakeNotes.d.ts +0 -151
- package/lib/screenplay/abilities/TakeNotes.js +0 -205
- package/lib/screenplay/abilities/TakeNotes.js.map +0 -1
- package/lib/screenplay/activities/ActivityDescriber.d.ts +0 -9
- package/lib/screenplay/activities/ActivityDescriber.js +0 -18
- package/lib/screenplay/activities/ActivityDescriber.js.map +0 -1
- package/lib/screenplay/activities/OutcomeMatcher.d.ts +0 -5
- package/lib/screenplay/activities/OutcomeMatcher.js +0 -21
- package/lib/screenplay/activities/OutcomeMatcher.js.map +0 -1
- package/lib/screenplay/activities/TrackedActivity.d.ts +0 -17
- package/lib/screenplay/activities/TrackedActivity.js +0 -40
- package/lib/screenplay/activities/TrackedActivity.js.map +0 -1
- package/lib/screenplay/actor/Actor.d.ts +0 -106
- package/lib/screenplay/actor/Actor.js +0 -189
- package/lib/screenplay/actor/Actor.js.map +0 -1
- package/lib/screenplay/actor/AnswersQuestions.d.ts +0 -10
- package/lib/screenplay/actor/AnswersQuestions.js.map +0 -1
- package/lib/screenplay/actor/CanHaveAbilities.d.ts +0 -15
- package/lib/screenplay/actor/CanHaveAbilities.js.map +0 -1
- package/lib/screenplay/actor/CollectsArtifacts.d.ts +0 -17
- package/lib/screenplay/actor/CollectsArtifacts.js.map +0 -1
- package/lib/screenplay/actor/PerformsActivities.d.ts +0 -10
- package/lib/screenplay/actor/PerformsActivities.js.map +0 -1
- package/lib/screenplay/actor/UsesAbilities.d.ts +0 -18
- package/lib/screenplay/actor/UsesAbilities.js.map +0 -1
- package/lib/screenplay/actor/index.d.ts +0 -6
- package/lib/screenplay/actor/index.js.map +0 -1
- package/lib/screenplay/interactions/Log.d.ts +0 -57
- package/lib/screenplay/interactions/Log.js +0 -74
- package/lib/screenplay/interactions/Log.js.map +0 -1
- package/lib/screenplay/interactions/TakeNote.d.ts +0 -87
- package/lib/screenplay/interactions/TakeNote.js +0 -103
- package/lib/screenplay/interactions/TakeNote.js.map +0 -1
- package/lib/screenplay/interactions/index.d.ts +0 -2
- package/lib/screenplay/interactions/index.js.map +0 -1
- package/lib/screenplay/questions/Note.d.ts +0 -79
- package/lib/screenplay/questions/Note.js +0 -96
- package/lib/screenplay/questions/Note.js.map +0 -1
- package/lib/stage/Clock.d.ts +0 -15
- package/lib/stage/Clock.js +0 -23
- package/lib/stage/Clock.js.map +0 -1
- package/src/SerenityConfig.ts +0 -49
- package/src/errors/AssertionError.ts +0 -20
- package/src/errors/ConfigurationError.ts +0 -18
- package/src/errors/ImplementationPendingError.ts +0 -33
- package/src/errors/LogicError.ts +0 -21
- package/src/errors/RuntimeError.ts +0 -60
- package/src/errors/TestCompromisedError.ts +0 -30
- package/src/errors/UnknownError.ts +0 -18
- package/src/io/AssertionReportDiffer.ts +0 -43
- package/src/io/ErrorSerialiser.ts +0 -78
- package/src/io/OutputStream.ts +0 -16
- package/src/io/TestRunnerAdapter.ts +0 -50
- package/src/io/formatted.ts +0 -20
- package/src/io/json/cycle.ts +0 -177
- package/src/io/json/index.ts +0 -1
- package/src/model/artifacts/AssertionReport.ts +0 -7
- package/src/model/tags/ContextTag.ts +0 -21
- package/src/screenplay/Ability.ts +0 -100
- package/src/screenplay/AbilityType.ts +0 -44
- package/src/screenplay/abilities/TakeNotes.ts +0 -216
- package/src/screenplay/activities/ActivityDescriber.ts +0 -20
- package/src/screenplay/activities/OutcomeMatcher.ts +0 -25
- package/src/screenplay/activities/TrackedActivity.ts +0 -50
- package/src/screenplay/actor/Actor.ts +0 -243
- package/src/screenplay/actor/AnswersQuestions.ts +0 -11
- package/src/screenplay/actor/CanHaveAbilities.ts +0 -16
- package/src/screenplay/actor/CollectsArtifacts.ts +0 -18
- package/src/screenplay/actor/PerformsActivities.ts +0 -11
- package/src/screenplay/actor/UsesAbilities.ts +0 -20
- package/src/screenplay/actor/index.ts +0 -6
- package/src/screenplay/interactions/Log.ts +0 -81
- package/src/screenplay/interactions/TakeNote.ts +0 -107
- package/src/screenplay/interactions/index.ts +0 -2
- package/src/screenplay/questions/Note.ts +0 -99
- package/src/stage/Clock.ts +0 -19
- package/tsconfig.eslint.json +0 -10
- /package/lib/{io → adapter}/OutputStream.js +0 -0
- /package/lib/{io → adapter}/TestRunnerAdapter.js +0 -0
- /package/lib/screenplay/{AbilityType.js → abilities/AbilityType.js} +0 -0
- /package/lib/screenplay/{actor → abilities}/CanHaveAbilities.js +0 -0
- /package/lib/screenplay/{actor → abilities}/UsesAbilities.js +0 -0
- /package/lib/screenplay/{actor → activities}/PerformsActivities.js +0 -0
- /package/lib/screenplay/{actor → artifacts}/CollectsArtifacts.js +0 -0
- /package/lib/screenplay/{actor → questions}/AnswersQuestions.js +0 -0
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Actor = void 0;
|
|
4
|
-
const errors_1 = require("../../errors");
|
|
5
|
-
const events_1 = require("../../events");
|
|
6
|
-
const model_1 = require("../../model");
|
|
7
|
-
const activities_1 = require("../activities");
|
|
8
|
-
const Question_1 = require("../Question");
|
|
9
|
-
class Actor {
|
|
10
|
-
// todo: Actor should have execution strategies
|
|
11
|
-
// todo: the default one executes every activity
|
|
12
|
-
// todo: there could be a dry-run mode that default to skip strategy
|
|
13
|
-
constructor(name, stage, abilities = new Map()) {
|
|
14
|
-
this.name = name;
|
|
15
|
-
this.stage = stage;
|
|
16
|
-
this.abilities = abilities;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @desc
|
|
20
|
-
* Retrieves actor's {@link Ability} to `doSomething`.
|
|
21
|
-
*
|
|
22
|
-
* Please note that this method performs an [`instancepf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof)
|
|
23
|
-
* check against abilities given to this actor via {@link Actor#whoCan}. Please also note that {@link Actor#whoCan} performs
|
|
24
|
-
* the same check when abilities are assigned to the actor to ensure the actor has at most one instance of a given ability type.
|
|
25
|
-
*
|
|
26
|
-
* @param doSomething
|
|
27
|
-
*/
|
|
28
|
-
abilityTo(doSomething) {
|
|
29
|
-
const found = this.findAbilityTo(doSomething);
|
|
30
|
-
if (!found) {
|
|
31
|
-
throw new errors_1.ConfigurationError(`${this.name} can't ${doSomething.name} yet. ` +
|
|
32
|
-
`Did you give them the ability to do so?`);
|
|
33
|
-
}
|
|
34
|
-
return found;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @desc
|
|
38
|
-
* Instructs the actor to attempt to perform a number of activities
|
|
39
|
-
* (see {@link Activity}, so either {@link Task}s or {@link Interaction}s)
|
|
40
|
-
* one by one.
|
|
41
|
-
*
|
|
42
|
-
* @param {...activities: Activity[]} activities
|
|
43
|
-
* @return {Promise<void>}
|
|
44
|
-
*/
|
|
45
|
-
attemptsTo(...activities) {
|
|
46
|
-
return activities
|
|
47
|
-
.map(activity => new activities_1.TrackedActivity(activity, this.stage))
|
|
48
|
-
.reduce((previous, current) => {
|
|
49
|
-
return previous
|
|
50
|
-
// synchronise async operations like taking screenshots
|
|
51
|
-
.then(() => this.stage.waitForNextCue())
|
|
52
|
-
.then(() => {
|
|
53
|
-
/* todo: add an execution strategy */
|
|
54
|
-
return current.performAs(this);
|
|
55
|
-
});
|
|
56
|
-
}, this.initialiseAbilities());
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @desc
|
|
60
|
-
* Gives this Actor a list of abilities (see {@link Ability}) they can use
|
|
61
|
-
* to interact with the system under test or the test environment.
|
|
62
|
-
*
|
|
63
|
-
* @param {...Ability[]} abilities
|
|
64
|
-
* A vararg list of abilities to give the actor
|
|
65
|
-
*
|
|
66
|
-
* @returns {Actor}
|
|
67
|
-
* The actor with newly gained abilities
|
|
68
|
-
*
|
|
69
|
-
* @throws {ConfigurationError}
|
|
70
|
-
* Throws a ConfigurationError if the actor already has an ability of this type.
|
|
71
|
-
*/
|
|
72
|
-
whoCan(...abilities) {
|
|
73
|
-
abilities.forEach(ability => {
|
|
74
|
-
const abilityType = ability.constructor;
|
|
75
|
-
const found = this.findAbilityTo(abilityType);
|
|
76
|
-
if (found) {
|
|
77
|
-
const description = found.constructor.name === abilityType.name
|
|
78
|
-
? found.constructor.name
|
|
79
|
-
: `${found.constructor.name} (which extends ${abilityType.name})`;
|
|
80
|
-
throw new errors_1.ConfigurationError(`${this.name} already has an ability to ${description}, so you don't need to give it to them again.`);
|
|
81
|
-
}
|
|
82
|
-
this.abilities.set(ability.constructor, ability);
|
|
83
|
-
});
|
|
84
|
-
return this;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* @param {Answerable<T>} answerable - a Question<Promise<T>>, Question<T>, Promise<T> or T
|
|
88
|
-
* @returns {Promise<T>} The answer to the Answerable
|
|
89
|
-
*/
|
|
90
|
-
answer(answerable) {
|
|
91
|
-
function isAPromise(v) {
|
|
92
|
-
return Object.prototype.hasOwnProperty.call(v, 'then');
|
|
93
|
-
}
|
|
94
|
-
function isDefined(v) {
|
|
95
|
-
return !(v === undefined || v === null);
|
|
96
|
-
}
|
|
97
|
-
if (isDefined(answerable) && isAPromise(answerable)) {
|
|
98
|
-
return answerable;
|
|
99
|
-
}
|
|
100
|
-
if (isDefined(answerable) && Question_1.Question.isAQuestion(answerable)) {
|
|
101
|
-
return this.answer(answerable.answeredBy(this));
|
|
102
|
-
}
|
|
103
|
-
return Promise.resolve(answerable);
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* @desc
|
|
107
|
-
* Announce collection of an {@link Artifact} so that it can be picked up by a {@link StageCrewMember}.
|
|
108
|
-
*
|
|
109
|
-
* @param {Artifact} artifact
|
|
110
|
-
* @param {?(string | Name)} name
|
|
111
|
-
*
|
|
112
|
-
* @returns {void}
|
|
113
|
-
*/
|
|
114
|
-
collect(artifact, name) {
|
|
115
|
-
this.stage.announce(new events_1.ActivityRelatedArtifactGenerated(this.stage.currentSceneId(), this.stage.currentActivityId(), this.nameFrom(name || new model_1.Name(artifact.constructor.name)), artifact, this.stage.currentTime()));
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* @desc
|
|
119
|
-
* Instructs the actor to invoke {@link Discardable#discard} method on any
|
|
120
|
-
* {@link Discardable} {@link Ability} it's been configured with.
|
|
121
|
-
*
|
|
122
|
-
* @returns {Promise<void>}
|
|
123
|
-
*/
|
|
124
|
-
dismiss() {
|
|
125
|
-
return this.findAbilitiesOfType('discard')
|
|
126
|
-
.reduce((previous, ability) => previous.then(() => ability.discard()), Promise.resolve(void 0));
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* @desc
|
|
130
|
-
* Returns a human-readable, string representation of this Actor
|
|
131
|
-
*
|
|
132
|
-
* @returns {string}
|
|
133
|
-
*/
|
|
134
|
-
toString() {
|
|
135
|
-
const abilities = Array.from(this.abilities.keys()).map(type => type.name);
|
|
136
|
-
return `Actor(name=${this.name}, abilities=[${abilities.join(', ')}])`;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* @private
|
|
140
|
-
*/
|
|
141
|
-
initialiseAbilities() {
|
|
142
|
-
return this.findAbilitiesOfType('initialise', 'isInitialised')
|
|
143
|
-
.filter(ability => !ability.isInitialised())
|
|
144
|
-
.reduce((previous, ability) => previous
|
|
145
|
-
.then(() => ability.initialise())
|
|
146
|
-
.catch(error => {
|
|
147
|
-
throw new errors_1.TestCompromisedError(`${this.name} couldn't initialise the ability to ${ability.constructor.name}`, error);
|
|
148
|
-
}), Promise.resolve(void 0));
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* @param {...string[]} methodNames
|
|
152
|
-
* @private
|
|
153
|
-
*/
|
|
154
|
-
findAbilitiesOfType(...methodNames) {
|
|
155
|
-
const abilitiesFrom = (map) => Array.from(map.values());
|
|
156
|
-
const abilitiesWithDesiredMethods = (ability) => methodNames.every(methodName => typeof (ability[methodName]) === 'function');
|
|
157
|
-
return abilitiesFrom(this.abilities)
|
|
158
|
-
.filter(abilitiesWithDesiredMethods);
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* @param {string} doSomething
|
|
162
|
-
* @private
|
|
163
|
-
*/
|
|
164
|
-
findAbilityTo(doSomething) {
|
|
165
|
-
for (const [abilityType_, ability] of this.abilities) {
|
|
166
|
-
if (ability instanceof doSomething) {
|
|
167
|
-
return ability;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return undefined;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* @desc
|
|
174
|
-
* Instantiates a {@link Name} based on the string value of the parameter,
|
|
175
|
-
* or returns the argument if it's already an instance of {@link Name}.
|
|
176
|
-
*
|
|
177
|
-
* @param {string | Name} maybeName
|
|
178
|
-
* @returns {Name}
|
|
179
|
-
*
|
|
180
|
-
* @private
|
|
181
|
-
*/
|
|
182
|
-
nameFrom(maybeName) {
|
|
183
|
-
return typeof maybeName === 'string'
|
|
184
|
-
? new model_1.Name(maybeName)
|
|
185
|
-
: maybeName;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
exports.Actor = Actor;
|
|
189
|
-
//# sourceMappingURL=Actor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Actor.js","sourceRoot":"","sources":["../../../src/screenplay/actor/Actor.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Answerable } from '../Answerable';
|
|
2
|
-
/**
|
|
3
|
-
* @desc
|
|
4
|
-
* Enables the {@link Actor} to answer a {@link Question} about the system under test
|
|
5
|
-
*
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
export interface AnswersQuestions {
|
|
9
|
-
answer<T>(knownUnknown: Answerable<T>): Promise<T>;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnswersQuestions.js","sourceRoot":"","sources":["../../../src/screenplay/actor/AnswersQuestions.ts"],"names":[],"mappings":""}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Ability } from '../Ability';
|
|
2
|
-
import { UsesAbilities } from './UsesAbilities';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Enables the {@link Actor} to have an {@link Ability} or Abilities to perform some {@link Activity}.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export interface CanHaveAbilities<Returned_Type = UsesAbilities> {
|
|
10
|
-
/**
|
|
11
|
-
* @param {Ability[]} abilities
|
|
12
|
-
* @returns {Actor}
|
|
13
|
-
*/
|
|
14
|
-
whoCan(...abilities: Ability[]): Returned_Type;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CanHaveAbilities.js","sourceRoot":"","sources":["../../../src/screenplay/actor/CanHaveAbilities.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Artifact, Name } from '../../model';
|
|
2
|
-
/**
|
|
3
|
-
* @desc
|
|
4
|
-
* Enables the {@link Actor} to collect {@link Artifact}s while the scenario is being executed
|
|
5
|
-
*
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
export interface CollectsArtifacts {
|
|
9
|
-
/**
|
|
10
|
-
* @desc
|
|
11
|
-
* Makes the {@link Actor} collect an {@link Artifact} so that it's included in the test report.
|
|
12
|
-
*
|
|
13
|
-
* @param {Artifact} artifact - The artifact to be collected, such as {@link JSONData}
|
|
14
|
-
* @param {Name} [name] - The name of the artifact to make it easy to recognise in the test report
|
|
15
|
-
*/
|
|
16
|
-
collect(artifact: Artifact, name?: Name): void;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollectsArtifacts.js","sourceRoot":"","sources":["../../../src/screenplay/actor/CollectsArtifacts.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Activity } from '../Activity';
|
|
2
|
-
/**
|
|
3
|
-
* @desc
|
|
4
|
-
* Enables the {@link Actor} to perform an {@link Activity}, such as a {@link Task} or an {@link Interaction}
|
|
5
|
-
*
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
export interface PerformsActivities {
|
|
9
|
-
attemptsTo(...tasks: Activity[]): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PerformsActivities.js","sourceRoot":"","sources":["../../../src/screenplay/actor/PerformsActivities.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Ability } from '../Ability';
|
|
2
|
-
import { AbilityType } from '../AbilityType';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Enables the {@link Actor} to use an {@link Ability} to perform some {@link Activity}.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export interface UsesAbilities {
|
|
10
|
-
/**
|
|
11
|
-
* @desc
|
|
12
|
-
* Grants access to the Actor's ability
|
|
13
|
-
*
|
|
14
|
-
* @param {AbilityType<T extends Ability>} doSomething
|
|
15
|
-
* @returns {T}
|
|
16
|
-
*/
|
|
17
|
-
abilityTo<T extends Ability>(doSomething: AbilityType<T>): T;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UsesAbilities.js","sourceRoot":"","sources":["../../../src/screenplay/actor/UsesAbilities.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/actor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAwB;AACxB,qDAAmC;AACnC,qDAAmC;AACnC,sDAAoC;AACpC,uDAAqC;AACrC,kDAAgC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { AnswersQuestions, CollectsArtifacts, UsesAbilities } from '../actor';
|
|
2
|
-
import { Answerable } from '../Answerable';
|
|
3
|
-
import { Interaction } from '../Interaction';
|
|
4
|
-
/**
|
|
5
|
-
* @desc
|
|
6
|
-
* Enables the {@link Actor} to log arbitrary static values and answers to {@link Question}s,
|
|
7
|
-
* so that they can be printed to the terminal by the [`ConsoleReporter`](/modules/console-reporter/)
|
|
8
|
-
* and attached to the HTML report by the [`SerenityBDDReporter`](/modules/serenity-bdd/).
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* import { Log } from '@serenity-js/core';
|
|
12
|
-
* import { Website } from '@serenity-js/protractor';
|
|
13
|
-
*
|
|
14
|
-
* actor.attemptsTo(
|
|
15
|
-
* Log.the('Current page', Website.title(), Website.url()),
|
|
16
|
-
* );
|
|
17
|
-
*
|
|
18
|
-
* @extends {Interaction}
|
|
19
|
-
*/
|
|
20
|
-
export declare class Log extends Interaction {
|
|
21
|
-
private readonly items;
|
|
22
|
-
/**
|
|
23
|
-
* @desc
|
|
24
|
-
* Instantiates a new {@link Log} {@link Interaction}.
|
|
25
|
-
*
|
|
26
|
-
* @param {...items: any[]} items
|
|
27
|
-
* The items to be logged
|
|
28
|
-
* @returns {Interaction}
|
|
29
|
-
*/
|
|
30
|
-
static the(...items: Array<Answerable<any>>): Interaction;
|
|
31
|
-
/**
|
|
32
|
-
* @param {...items: any[]} items
|
|
33
|
-
* The items to be logged
|
|
34
|
-
*/
|
|
35
|
-
constructor(items: Array<Answerable<any>>);
|
|
36
|
-
/**
|
|
37
|
-
* @desc
|
|
38
|
-
* Makes the provided {@link Actor}
|
|
39
|
-
* perform this {@link Interaction}.
|
|
40
|
-
*
|
|
41
|
-
* @param {UsesAbilities & AnswersQuestions & CollectsArtifacts} actor
|
|
42
|
-
* @returns {Promise<void>}
|
|
43
|
-
*
|
|
44
|
-
* @see {@link Actor}
|
|
45
|
-
* @see {@link UsesAbilities}
|
|
46
|
-
* @see {@link AnswersQuestions}
|
|
47
|
-
* @see {@link CollectsArtifacts}
|
|
48
|
-
*/
|
|
49
|
-
performAs(actor: UsesAbilities & AnswersQuestions & CollectsArtifacts): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* @desc
|
|
52
|
-
* Generates a description to be used when reporting this {@link Activity}.
|
|
53
|
-
*
|
|
54
|
-
* @returns {string}
|
|
55
|
-
*/
|
|
56
|
-
toString(): string;
|
|
57
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Log = void 0;
|
|
4
|
-
const io_1 = require("../../io");
|
|
5
|
-
const inspected_1 = require("../../io/inspected");
|
|
6
|
-
const model_1 = require("../../model");
|
|
7
|
-
const artifacts_1 = require("../../model/artifacts");
|
|
8
|
-
const Interaction_1 = require("../Interaction");
|
|
9
|
-
/**
|
|
10
|
-
* @desc
|
|
11
|
-
* Enables the {@link Actor} to log arbitrary static values and answers to {@link Question}s,
|
|
12
|
-
* so that they can be printed to the terminal by the [`ConsoleReporter`](/modules/console-reporter/)
|
|
13
|
-
* and attached to the HTML report by the [`SerenityBDDReporter`](/modules/serenity-bdd/).
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* import { Log } from '@serenity-js/core';
|
|
17
|
-
* import { Website } from '@serenity-js/protractor';
|
|
18
|
-
*
|
|
19
|
-
* actor.attemptsTo(
|
|
20
|
-
* Log.the('Current page', Website.title(), Website.url()),
|
|
21
|
-
* );
|
|
22
|
-
*
|
|
23
|
-
* @extends {Interaction}
|
|
24
|
-
*/
|
|
25
|
-
class Log extends Interaction_1.Interaction {
|
|
26
|
-
/**
|
|
27
|
-
* @param {...items: any[]} items
|
|
28
|
-
* The items to be logged
|
|
29
|
-
*/
|
|
30
|
-
constructor(items) {
|
|
31
|
-
super();
|
|
32
|
-
this.items = items;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @desc
|
|
36
|
-
* Instantiates a new {@link Log} {@link Interaction}.
|
|
37
|
-
*
|
|
38
|
-
* @param {...items: any[]} items
|
|
39
|
-
* The items to be logged
|
|
40
|
-
* @returns {Interaction}
|
|
41
|
-
*/
|
|
42
|
-
static the(...items) {
|
|
43
|
-
return new Log(items);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* @desc
|
|
47
|
-
* Makes the provided {@link Actor}
|
|
48
|
-
* perform this {@link Interaction}.
|
|
49
|
-
*
|
|
50
|
-
* @param {UsesAbilities & AnswersQuestions & CollectsArtifacts} actor
|
|
51
|
-
* @returns {Promise<void>}
|
|
52
|
-
*
|
|
53
|
-
* @see {@link Actor}
|
|
54
|
-
* @see {@link UsesAbilities}
|
|
55
|
-
* @see {@link AnswersQuestions}
|
|
56
|
-
* @see {@link CollectsArtifacts}
|
|
57
|
-
*/
|
|
58
|
-
performAs(actor) {
|
|
59
|
-
return Promise
|
|
60
|
-
.all(this.items.map(item => actor.answer(item)))
|
|
61
|
-
.then(items => items.forEach((item, i) => actor.collect(artifacts_1.LogEntry.fromJSON({ data: (0, inspected_1.inspected)(item) }), new model_1.Name((0, inspected_1.inspected)(this.items[i])))));
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* @desc
|
|
65
|
-
* Generates a description to be used when reporting this {@link Activity}.
|
|
66
|
-
*
|
|
67
|
-
* @returns {string}
|
|
68
|
-
*/
|
|
69
|
-
toString() {
|
|
70
|
-
return `#actor logs: ${this.items.map(item => (0, io_1.formatted) `${item}`).join(', ')}`;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.Log = Log;
|
|
74
|
-
//# sourceMappingURL=Log.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Log.js","sourceRoot":"","sources":["../../../src/screenplay/interactions/Log.ts"],"names":[],"mappings":";;;AAAA,iCAAqC;AACrC,kDAA+C;AAC/C,uCAAmC;AACnC,qDAAiD;AAGjD,gDAA6C;AAE7C;;;;;;;;;;;;;;;GAeG;AACH,MAAa,GAAI,SAAQ,yBAAW;IAchC;;;OAGG;IACH,YACqB,KAA6B;QAE9C,KAAK,EAAE,CAAC;QAFS,UAAK,GAAL,KAAK,CAAwB;IAGlD,CAAC;IApBD;;;;;;;OAOG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,KAA6B;QACvC,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAYD;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,KAA2D;QACjE,OAAO,OAAO;aACT,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;aAC/C,IAAI,CAAC,KAAK,CAAC,EAAE,CACV,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CACtB,KAAK,CAAC,OAAO,CAAC,oBAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAA,qBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,YAAI,CAAC,IAAA,qBAAS,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAClG,CACJ,CAAC;IACV,CAAC;IAED;;;;;OAKG;IACH,QAAQ;QACJ,OAAO,gBAAiB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAA,cAAS,EAAA,GAAI,IAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAE,EAAE,CAAC;IACvF,CAAC;CACJ;AAxDD,kBAwDC"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { AnswersQuestions, UsesAbilities } from '../actor';
|
|
2
|
-
import { Interaction } from '../Interaction';
|
|
3
|
-
import { Question } from '../Question';
|
|
4
|
-
/**
|
|
5
|
-
* @desc
|
|
6
|
-
* Enables the {@link Actor} to remember an answer to a given {@link Question},
|
|
7
|
-
* and recall it later.
|
|
8
|
-
*
|
|
9
|
-
* @example <caption>Using default subject name based on the name of the question</caption>
|
|
10
|
-
* import { actorCalled, Note, TakeNote, TakeNotes } from '@serenity-js/core'
|
|
11
|
-
* import { BrowseTheWeb, Target, Text } from '@serenity-js/protractor'
|
|
12
|
-
* import { by, protractor } from 'protractor';
|
|
13
|
-
*
|
|
14
|
-
* class Vouchers {
|
|
15
|
-
* static code = Target.the('voucher code').located(by.id('voucher'));
|
|
16
|
-
* static appliedVoucher = Target.the('voucher code').located(by.id('applied-voucher'));
|
|
17
|
-
* }
|
|
18
|
-
*
|
|
19
|
-
* const actor = actorCalled('Noah').whoCan(
|
|
20
|
-
* TakeNotes.usingAnEmptyNotepad(),
|
|
21
|
-
* BrowseTheWeb.using(protractor.browser),
|
|
22
|
-
* );
|
|
23
|
-
*
|
|
24
|
-
* actor.attemptsTo(
|
|
25
|
-
* TakeNote.of(Text.of(Vouchers.code)),
|
|
26
|
-
* // ... add the product to a basket, go to checkout, etc.
|
|
27
|
-
* Ensure.that(Text.of(Vouchers.appliedVoucher), equals(Note.of(Text.of(Vouchers.code)))),
|
|
28
|
-
* );
|
|
29
|
-
*
|
|
30
|
-
* @example <caption>Using custom subject name</caption>
|
|
31
|
-
* actor.attemptsTo(
|
|
32
|
-
* TakeNote.of(Text.of(Vouchers.code)).as('voucher code'),
|
|
33
|
-
* // ... add the product to a basket, go to checkout, etc.
|
|
34
|
-
* Ensure.that(Text.of(Vouchers.appliedVoucher), equals(Note.of('voucher code'))),
|
|
35
|
-
* );
|
|
36
|
-
*
|
|
37
|
-
* @see {@link Note}
|
|
38
|
-
* @see {@link TakeNotes}
|
|
39
|
-
*
|
|
40
|
-
* @extends {Interaction}
|
|
41
|
-
*/
|
|
42
|
-
export declare class TakeNote<Answer> extends Interaction {
|
|
43
|
-
private readonly question;
|
|
44
|
-
private readonly subject;
|
|
45
|
-
/**
|
|
46
|
-
* @desc
|
|
47
|
-
* Instructs the {@link Actor} to remember the answer to a given question
|
|
48
|
-
*
|
|
49
|
-
* @param {Question<Promise<A>> | Question<A>} question
|
|
50
|
-
*
|
|
51
|
-
* @returns {TakeNote<A>}
|
|
52
|
-
*/
|
|
53
|
-
static of<A>(question: Question<Promise<A>> | Question<A>): TakeNote<A>;
|
|
54
|
-
/**
|
|
55
|
-
* @param {Question<Promise<Answer>> | Question<Answer>} question
|
|
56
|
-
* @param {string} subject
|
|
57
|
-
*/
|
|
58
|
-
constructor(question: Question<Promise<Answer>> | Question<Answer>, subject?: string);
|
|
59
|
-
/**
|
|
60
|
-
* @desc
|
|
61
|
-
* Sets a custom subject name to remember the answer as.
|
|
62
|
-
*
|
|
63
|
-
* @param {string} subject
|
|
64
|
-
* @returns {TakeNote<Answer>}
|
|
65
|
-
*/
|
|
66
|
-
as(subject: string): TakeNote<Answer>;
|
|
67
|
-
/**
|
|
68
|
-
* @desc
|
|
69
|
-
* Makes the provided {@link Actor}
|
|
70
|
-
* perform this {@link Interaction}.
|
|
71
|
-
*
|
|
72
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
73
|
-
* @returns {Promise<void>}
|
|
74
|
-
*
|
|
75
|
-
* @see {@link Actor}
|
|
76
|
-
* @see {@link UsesAbilities}
|
|
77
|
-
* @see {@link AnswersQuestions}
|
|
78
|
-
*/
|
|
79
|
-
performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void>;
|
|
80
|
-
/**
|
|
81
|
-
* @desc
|
|
82
|
-
* Generates a description to be used when reporting this {@link Activity}.
|
|
83
|
-
*
|
|
84
|
-
* @returns {string}
|
|
85
|
-
*/
|
|
86
|
-
toString(): string;
|
|
87
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TakeNote = void 0;
|
|
4
|
-
const io_1 = require("../../io");
|
|
5
|
-
const abilities_1 = require("../abilities");
|
|
6
|
-
const Interaction_1 = require("../Interaction");
|
|
7
|
-
/**
|
|
8
|
-
* @desc
|
|
9
|
-
* Enables the {@link Actor} to remember an answer to a given {@link Question},
|
|
10
|
-
* and recall it later.
|
|
11
|
-
*
|
|
12
|
-
* @example <caption>Using default subject name based on the name of the question</caption>
|
|
13
|
-
* import { actorCalled, Note, TakeNote, TakeNotes } from '@serenity-js/core'
|
|
14
|
-
* import { BrowseTheWeb, Target, Text } from '@serenity-js/protractor'
|
|
15
|
-
* import { by, protractor } from 'protractor';
|
|
16
|
-
*
|
|
17
|
-
* class Vouchers {
|
|
18
|
-
* static code = Target.the('voucher code').located(by.id('voucher'));
|
|
19
|
-
* static appliedVoucher = Target.the('voucher code').located(by.id('applied-voucher'));
|
|
20
|
-
* }
|
|
21
|
-
*
|
|
22
|
-
* const actor = actorCalled('Noah').whoCan(
|
|
23
|
-
* TakeNotes.usingAnEmptyNotepad(),
|
|
24
|
-
* BrowseTheWeb.using(protractor.browser),
|
|
25
|
-
* );
|
|
26
|
-
*
|
|
27
|
-
* actor.attemptsTo(
|
|
28
|
-
* TakeNote.of(Text.of(Vouchers.code)),
|
|
29
|
-
* // ... add the product to a basket, go to checkout, etc.
|
|
30
|
-
* Ensure.that(Text.of(Vouchers.appliedVoucher), equals(Note.of(Text.of(Vouchers.code)))),
|
|
31
|
-
* );
|
|
32
|
-
*
|
|
33
|
-
* @example <caption>Using custom subject name</caption>
|
|
34
|
-
* actor.attemptsTo(
|
|
35
|
-
* TakeNote.of(Text.of(Vouchers.code)).as('voucher code'),
|
|
36
|
-
* // ... add the product to a basket, go to checkout, etc.
|
|
37
|
-
* Ensure.that(Text.of(Vouchers.appliedVoucher), equals(Note.of('voucher code'))),
|
|
38
|
-
* );
|
|
39
|
-
*
|
|
40
|
-
* @see {@link Note}
|
|
41
|
-
* @see {@link TakeNotes}
|
|
42
|
-
*
|
|
43
|
-
* @extends {Interaction}
|
|
44
|
-
*/
|
|
45
|
-
class TakeNote extends Interaction_1.Interaction {
|
|
46
|
-
/**
|
|
47
|
-
* @param {Question<Promise<Answer>> | Question<Answer>} question
|
|
48
|
-
* @param {string} subject
|
|
49
|
-
*/
|
|
50
|
-
constructor(question, subject = question.toString()) {
|
|
51
|
-
super();
|
|
52
|
-
this.question = question;
|
|
53
|
-
this.subject = subject;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* @desc
|
|
57
|
-
* Instructs the {@link Actor} to remember the answer to a given question
|
|
58
|
-
*
|
|
59
|
-
* @param {Question<Promise<A>> | Question<A>} question
|
|
60
|
-
*
|
|
61
|
-
* @returns {TakeNote<A>}
|
|
62
|
-
*/
|
|
63
|
-
static of(question) {
|
|
64
|
-
return new TakeNote(question);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* @desc
|
|
68
|
-
* Sets a custom subject name to remember the answer as.
|
|
69
|
-
*
|
|
70
|
-
* @param {string} subject
|
|
71
|
-
* @returns {TakeNote<Answer>}
|
|
72
|
-
*/
|
|
73
|
-
as(subject) {
|
|
74
|
-
return new TakeNote(this.question, subject);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @desc
|
|
78
|
-
* Makes the provided {@link Actor}
|
|
79
|
-
* perform this {@link Interaction}.
|
|
80
|
-
*
|
|
81
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
82
|
-
* @returns {Promise<void>}
|
|
83
|
-
*
|
|
84
|
-
* @see {@link Actor}
|
|
85
|
-
* @see {@link UsesAbilities}
|
|
86
|
-
* @see {@link AnswersQuestions}
|
|
87
|
-
*/
|
|
88
|
-
performAs(actor) {
|
|
89
|
-
return actor.answer(this.question)
|
|
90
|
-
.then(answer => abilities_1.TakeNotes.as(actor).record(this.subject, answer));
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* @desc
|
|
94
|
-
* Generates a description to be used when reporting this {@link Activity}.
|
|
95
|
-
*
|
|
96
|
-
* @returns {string}
|
|
97
|
-
*/
|
|
98
|
-
toString() {
|
|
99
|
-
return (0, io_1.formatted) `#actor takes note of ${this.subject}`;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.TakeNote = TakeNote;
|
|
103
|
-
//# sourceMappingURL=TakeNote.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TakeNote.js","sourceRoot":"","sources":["../../../src/screenplay/interactions/TakeNote.ts"],"names":[],"mappings":";;;AAAA,iCAAqC;AACrC,4CAAyC;AAEzC,gDAA6C;AAG7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAa,QAAiB,SAAQ,yBAAW;IAc7C;;;OAGG;IACH,YACqB,QAAsD,EACtD,UAAkB,QAAQ,CAAC,QAAQ,EAAE;QAEtD,KAAK,EAAE,CAAC;QAHS,aAAQ,GAAR,QAAQ,CAA8C;QACtD,YAAO,GAAP,OAAO,CAA8B;IAG1D,CAAC;IArBD;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,CAAI,QAA4C;QACrD,OAAO,IAAI,QAAQ,CAAI,QAAQ,CAAC,CAAC;IACrC,CAAC;IAaD;;;;;;OAMG;IACH,EAAE,CAAC,OAAe;QACd,OAAO,IAAI,QAAQ,CAAS,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,KAAuC;QAC7C,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;aAC7B,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,qBAAS,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;OAKG;IACH,QAAQ;QACJ,OAAO,IAAA,cAAS,EAAC,wBAAyB,IAAI,CAAC,OAAQ,EAAE,CAAC;IAC9D,CAAC;CACJ;AA9DD,4BA8DC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/interactions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAsB;AACtB,6CAA2B"}
|