@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
|
@@ -4,98 +4,224 @@ exports.Expectation = void 0;
|
|
|
4
4
|
const io_1 = require("../../io");
|
|
5
5
|
const __1 = require("../");
|
|
6
6
|
/**
|
|
7
|
-
* @
|
|
8
|
-
*
|
|
9
|
-
* and {@link Question}s like {@link List}.
|
|
7
|
+
* Defines an expectation to be used with {@apilink @apilink Wait.until}, {@apilink Check.whether}, {@apilink Ensure.that}
|
|
8
|
+
* and as part of the Page Element Query Language with {@apilink PageElements.where} and {@apilink List.where}.
|
|
10
9
|
*
|
|
11
|
-
* @
|
|
10
|
+
* @group Expectations
|
|
12
11
|
*/
|
|
13
12
|
class Expectation {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
/**
|
|
14
|
+
* A factory method to that makes defining custom {@apilink Expectation|expectations} easier
|
|
15
|
+
*
|
|
16
|
+
* #### Defining a custom expectation
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { Expectation } from '@serenity-js/core'
|
|
20
|
+
* import { PageElement } from '@serenity-js/web'
|
|
21
|
+
*
|
|
22
|
+
* const isEmpty = Expectation.define(
|
|
23
|
+
* 'isEmpty', // name of the expectation function to be used when producing an AssertionError
|
|
24
|
+
* 'become empty', // human-readable description of the relationship between expected and actual values
|
|
25
|
+
* async (actual: PageElement) => {
|
|
26
|
+
* const value = await actual.value();
|
|
27
|
+
* return value.length === 0;
|
|
28
|
+
* }
|
|
29
|
+
* )
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* #### Using a custom expectation in an assertion
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* import { Ensure } from '@serenity-js/assertions'
|
|
36
|
+
* import { actorCalled } from '@serenity-js/core'
|
|
37
|
+
* import { By, Clear, PageElement } from '@serenity-js/web'
|
|
38
|
+
*
|
|
39
|
+
* const nameField = () =>
|
|
40
|
+
* PageElement.located(By.css('[data-test-id="name"]')).describedAs('name field');
|
|
41
|
+
*
|
|
42
|
+
* await actorCalled('Izzy').attemptsTo(
|
|
43
|
+
* Clear.the(nameField()),
|
|
44
|
+
* Ensure.that(nameField(), isEmpty())
|
|
45
|
+
* )
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* #### Using a custom expectation in a control flow statement
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* import { not } from '@serenity-js/assertions'
|
|
52
|
+
* import { actorCalled, Check, Duration, Wait } from '@serenity-js/core'
|
|
53
|
+
* import { By, PageElement } from '@serenity-js/web'
|
|
54
|
+
*
|
|
55
|
+
* const nameField = () =>
|
|
56
|
+
* PageElement.located(By.css('[data-test-id="name"]')).describedAs('name field');
|
|
57
|
+
*
|
|
58
|
+
* await actorCalled('Izzy').attemptsTo(
|
|
59
|
+
* Check.whether(nameField(), isEmpty())
|
|
60
|
+
* .andIfSo(
|
|
61
|
+
* Enter.theValue(actorInTheSpotlight().name).into(nameField()),
|
|
62
|
+
* ),
|
|
63
|
+
* )
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* #### Using a custom expectation in a synchronisation statement
|
|
67
|
+
*
|
|
68
|
+
* ```ts
|
|
69
|
+
* import { not } from '@serenity-js/assertions'
|
|
70
|
+
* import { actorCalled, Duration, Wait } from '@serenity-js/core'
|
|
71
|
+
* import { By, PageElement } from '@serenity-js/web'
|
|
72
|
+
*
|
|
73
|
+
* const nameField = () =>
|
|
74
|
+
* PageElement.located(By.css('[data-test-id="name"]')).describedAs('name field');
|
|
75
|
+
*
|
|
76
|
+
* await actorCalled('Izzy').attemptsTo(
|
|
77
|
+
* Enter.theValue(actorInTheSpotlight().name).into(nameField()),
|
|
78
|
+
*
|
|
79
|
+
* Wait.upTo(Duration.ofSeconds(2))
|
|
80
|
+
* .until(nameField(), not(isEmpty())),
|
|
81
|
+
* )
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* #### Learn more
|
|
85
|
+
* - {@apilink Ensure}
|
|
86
|
+
* - {@apilink Check}
|
|
87
|
+
* - {@apilink Wait}
|
|
88
|
+
*
|
|
89
|
+
* @param functionName
|
|
90
|
+
* Name of the expectation function to be used when producing an {@apilink AssertionError}
|
|
91
|
+
*
|
|
92
|
+
* @param relationship
|
|
93
|
+
* Human-readable description of the relationship between the `expected` and the `actual` values.
|
|
94
|
+
* Used when reporting {@apilink Activity|activities} performed by an {@apilink Actor|actor}
|
|
95
|
+
*
|
|
96
|
+
* @param predicate
|
|
97
|
+
*/
|
|
98
|
+
static define(functionName, relationship, predicate) {
|
|
99
|
+
return Object.defineProperty(function (...answerableArguments) {
|
|
100
|
+
const description = typeof relationship === 'function' ? relationship(...answerableArguments)
|
|
101
|
+
: (answerableArguments.length === 1 ? relationship.trim() + (0, io_1.d) ` ${answerableArguments[0]}`
|
|
102
|
+
: relationship);
|
|
103
|
+
return new Expectation(functionName, description, async (actor, actualValue) => {
|
|
104
|
+
const predicateArguments = await (0, io_1.asyncMap)(answerableArguments, answerableArgument => actor.answer(answerableArgument));
|
|
105
|
+
const actual = await actor.answer(actualValue);
|
|
106
|
+
const result = await predicate(actual, ...predicateArguments);
|
|
107
|
+
const expectationDetails = __1.ExpectationDetails.of(functionName, ...predicateArguments);
|
|
108
|
+
const expected = predicateArguments.length > 0
|
|
109
|
+
? predicateArguments[0]
|
|
110
|
+
: true; // the only parameter-less expectations are boolean ones like `isPresent`, `isActive`, etc.
|
|
111
|
+
return result
|
|
112
|
+
? new __1.ExpectationMet(description, expectationDetails, expected, actual)
|
|
113
|
+
: new __1.ExpectationNotMet(description, expectationDetails, expected, actual);
|
|
114
|
+
});
|
|
115
|
+
}, 'name', { value: functionName, writable: false });
|
|
17
116
|
}
|
|
18
117
|
/**
|
|
19
|
-
* @
|
|
20
|
-
*
|
|
118
|
+
* Used to define a simple {@apilink Expectation}
|
|
119
|
+
*
|
|
120
|
+
* #### Simple parameterised expectation
|
|
21
121
|
*
|
|
22
|
-
*
|
|
23
|
-
* import { actorCalled, Expectation } from '@serenity-js/core'
|
|
24
|
-
* import { Ensure } from '@serenity-js/assertions'
|
|
122
|
+
* ```ts
|
|
123
|
+
* import { actorCalled, Expectation } from '@serenity-js/core'
|
|
124
|
+
* import { Ensure } from '@serenity-js/assertions'
|
|
25
125
|
*
|
|
26
126
|
* function isDivisibleBy(expected: Answerable<number>): Expectation<number> {
|
|
27
127
|
* return Expectation.thatActualShould<number, number>('have value divisible by', expected)
|
|
28
128
|
* .soThat((actualValue, expectedValue) => actualValue % expectedValue === 0);
|
|
29
129
|
* }
|
|
30
130
|
*
|
|
31
|
-
* actorCalled('Erica').attemptsTo(
|
|
131
|
+
* await actorCalled('Erica').attemptsTo(
|
|
32
132
|
* Ensure.that(4, isDivisibleBy(2)),
|
|
33
|
-
* )
|
|
133
|
+
* )
|
|
134
|
+
* ```
|
|
34
135
|
*
|
|
35
|
-
* @param
|
|
36
|
-
*
|
|
136
|
+
* @param relationshipName
|
|
137
|
+
* Name of the relationship between the `actual` and the `expected`. Use format `have value <adjective>`
|
|
138
|
+
* so that the description works in both positive and negative contexts, e.g. `Waited until 5 does have value greater than 2`,
|
|
139
|
+
* `Expected 5 to not have value greater than 2`.
|
|
37
140
|
*
|
|
38
|
-
* @
|
|
141
|
+
* @param expectedValue
|
|
39
142
|
*/
|
|
40
143
|
static thatActualShould(relationshipName, expectedValue) {
|
|
41
144
|
return ({
|
|
42
145
|
soThat: (simplifiedPredicate) => {
|
|
43
|
-
const
|
|
44
|
-
return new Expectation(
|
|
146
|
+
const message = relationshipName + ' ' + (0, io_1.d) `${expectedValue}`;
|
|
147
|
+
return new Expectation('unknown', message, async (actor, actualValue) => {
|
|
45
148
|
const expected = await actor.answer(expectedValue);
|
|
46
149
|
const actual = await actor.answer(actualValue);
|
|
47
150
|
const result = await simplifiedPredicate(actual, expected);
|
|
151
|
+
const expectationDetails = __1.ExpectationDetails.of('unknown');
|
|
48
152
|
return result
|
|
49
|
-
? new __1.ExpectationMet(
|
|
50
|
-
: new __1.ExpectationNotMet(
|
|
153
|
+
? new __1.ExpectationMet(message, expectationDetails, expected, actual)
|
|
154
|
+
: new __1.ExpectationNotMet(message, expectationDetails, expected, actual);
|
|
51
155
|
});
|
|
52
156
|
},
|
|
53
157
|
});
|
|
54
158
|
}
|
|
55
159
|
/**
|
|
56
|
-
* @
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
160
|
+
* Used to compose {@apilink Expectation|expectations}.
|
|
161
|
+
*
|
|
162
|
+
* #### Composing {@apilink Expectation|expectations}
|
|
163
|
+
*
|
|
164
|
+
* ```ts
|
|
165
|
+
* import { actorCalled, Expectation } from '@serenity-js/core'
|
|
166
|
+
* import { Ensure, and, or, isGreaterThan, isLessThan, equals } from '@serenity-js/assertions'
|
|
167
|
+
*
|
|
168
|
+
* function isWithin(lowerBound: number, upperBound: number) {
|
|
169
|
+
* return Expectation
|
|
170
|
+
* .to(`have value within ${ lowerBound } and ${ upperBound }`)
|
|
171
|
+
* .soThatActual(
|
|
172
|
+
* and(
|
|
173
|
+
* or(isGreaterThan(lowerBound), equals(lowerBound)),
|
|
174
|
+
* or(isLessThan(upperBound), equals(upperBound)),
|
|
175
|
+
* )
|
|
176
|
+
* )
|
|
70
177
|
* }
|
|
71
178
|
*
|
|
72
|
-
* actorCalled('Erica').attemptsTo(
|
|
179
|
+
* await actorCalled('Erica').attemptsTo(
|
|
73
180
|
* Ensure.that(5, isWithin(3, 6)),
|
|
74
|
-
* )
|
|
75
|
-
*
|
|
76
|
-
* @param {string} relationshipName
|
|
181
|
+
* )
|
|
182
|
+
* ```
|
|
77
183
|
*
|
|
78
|
-
* @
|
|
184
|
+
* @param relationshipName
|
|
185
|
+
* Name of the relationship between the `actual` and the `expected`. Use format `have value <adjective>`
|
|
186
|
+
* so that the description works in both positive and negative contexts, e.g. `Waited until 5 does have value greater than 2`,
|
|
187
|
+
* `Expected 5 to not have value greater than 2`.
|
|
79
188
|
*/
|
|
80
189
|
static to(relationshipName) {
|
|
81
190
|
return {
|
|
82
191
|
soThatActual: (expectation) => {
|
|
83
|
-
return new Expectation(relationshipName, async (actor, actualValue) => {
|
|
84
|
-
|
|
85
|
-
return outcome;
|
|
192
|
+
return new Expectation('unknown', relationshipName, async (actor, actualValue) => {
|
|
193
|
+
return await actor.answer(expectation.isMetFor(actualValue));
|
|
86
194
|
});
|
|
87
195
|
},
|
|
88
196
|
};
|
|
89
197
|
}
|
|
198
|
+
constructor(functionName, description, predicate) {
|
|
199
|
+
this.functionName = functionName;
|
|
200
|
+
this.description = description;
|
|
201
|
+
this.predicate = predicate;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Returns a {@apilink QuestionAdapter} that resolves to {@apilink ExpectationOutcome}
|
|
205
|
+
* indicating that the {@apilink ExpectationMet|expectation was met}
|
|
206
|
+
* or that the {@apilink ExpectationNotMet|expectation was not met}
|
|
207
|
+
*
|
|
208
|
+
* @param actual
|
|
209
|
+
*/
|
|
90
210
|
isMetFor(actual) {
|
|
91
|
-
return __1.Question.about(this.
|
|
211
|
+
return __1.Question.about(this.description, actor => this.predicate(actor, actual));
|
|
92
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* @inheritDoc
|
|
215
|
+
*/
|
|
93
216
|
describedAs(subject) {
|
|
94
|
-
this.
|
|
217
|
+
this.description = subject;
|
|
95
218
|
return this;
|
|
96
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* @inheritDoc
|
|
222
|
+
*/
|
|
97
223
|
toString() {
|
|
98
|
-
return this.
|
|
224
|
+
return this.description;
|
|
99
225
|
}
|
|
100
226
|
}
|
|
101
227
|
exports.Expectation = Expectation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Expectation.js","sourceRoot":"","sources":["../../../src/screenplay/questions/Expectation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Expectation.js","sourceRoot":"","sources":["../../../src/screenplay/questions/Expectation.ts"],"names":[],"mappings":";;;AAEA,iCAAuC;AACvC,2BAAqI;AAWrI;;;;;GAKG;AACH,MAAa,WAAW;IAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoFG;IACH,MAAM,CAAC,MAAM,CACT,YAAoB,EACpB,YAAoG,EACpG,SAAyG;QAGzG,OAAO,MAAM,CAAC,cAAc,CAAC,UAAS,GAAG,mBAA4D;YACjG,MAAM,WAAW,GAAG,OAAO,YAAY,KAAK,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,mBAAmB,CAAC;gBACzF,CAAC,CAAC,CAAC,mBAAmB,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,IAAA,MAAC,EAAA,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;oBACrF,CAAC,CAAC,YAAY,CAAC,CAAC;YAExB,OAAO,IAAI,WAAW,CAClB,YAAY,EACZ,WAAW,EACX,KAAK,EAAE,KAAuB,EAAE,WAAoC,EAA+B,EAAE;gBACjG,MAAM,kBAAkB,GAAG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C,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IACpF,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,OAAe;QACvB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,QAAQ;QACJ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;CACJ;AA9PD,kCA8PC"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UsesAbilities } from '../abilities';
|
|
2
|
+
import { Actor } from '../Actor';
|
|
2
3
|
import { Answerable } from '../Answerable';
|
|
3
4
|
import { Question, QuestionAdapter } from '../Question';
|
|
5
|
+
import { AnswersQuestions } from '../questions';
|
|
4
6
|
import { Task } from '../Task';
|
|
5
7
|
import { Expectation } from './Expectation';
|
|
6
8
|
import { MetaQuestion } from './MetaQuestion';
|
|
9
|
+
/**
|
|
10
|
+
* Serenity/JS Screenplay Pattern-style wrapper around {@apilink Array}
|
|
11
|
+
* and array-like structures - see {@apilink PageElements}.
|
|
12
|
+
*
|
|
13
|
+
* @group Questions
|
|
14
|
+
*/
|
|
7
15
|
export declare class List<Item_Type> extends Question<Promise<Item_Type[]>> {
|
|
8
16
|
protected readonly collection: Answerable<Array<Item_Type>>;
|
|
9
17
|
private subject;
|
|
@@ -15,12 +23,16 @@ export declare class List<Item_Type> extends Question<Promise<Item_Type[]>> {
|
|
|
15
23
|
count(): QuestionAdapter<number>;
|
|
16
24
|
first(): QuestionAdapter<Item_Type>;
|
|
17
25
|
last(): QuestionAdapter<Item_Type>;
|
|
18
|
-
|
|
26
|
+
nth(index: number): QuestionAdapter<Item_Type>;
|
|
19
27
|
answeredBy(actor: AnswersQuestions & UsesAbilities): Promise<Array<Item_Type>>;
|
|
20
28
|
describedAs(subject: string): this;
|
|
21
29
|
toString(): string;
|
|
22
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* @group Questions
|
|
33
|
+
*/
|
|
23
34
|
export interface CurrentItem<Item_Type> {
|
|
24
35
|
item: Item_Type;
|
|
25
36
|
actor: Actor;
|
|
26
37
|
}
|
|
38
|
+
//# sourceMappingURL=List.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/screenplay/questions/List.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;GAKG;AACH,qBAAa,IAAI,CAAC,SAAS,CAAE,SAAQ,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IAQ3D,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAP/D,OAAO,CAAC,OAAO,CAAS;IAExB,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;gBAKnC,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAM/D,YAAY,CAAC,gBAAgB,EACzB,QAAQ,EAAE,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC,GAChF,IAAI,CAAC,gBAAgB,CAAC;IAMzB,OAAO,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI;IAI1H,KAAK,CAAC,WAAW,EACb,QAAQ,EAAE,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,EACrE,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,GACtC,IAAI;IAMP,KAAK,IAAI,eAAe,CAAC,MAAM,CAAC;IAOhC,KAAK,IAAI,eAAe,CAAC,SAAS,CAAC;IAYnC,IAAI,IAAI,eAAe,CAAC,SAAS,CAAC;IAYlC,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC;IAYxC,UAAU,CAAC,KAAK,EAAE,gBAAgB,GAAG,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAUpF,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKlC,QAAQ,IAAI,MAAM;CAGrB;AAyID;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,SAAS;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;CAChB"}
|
|
@@ -6,15 +6,21 @@ const io_1 = require("../../io");
|
|
|
6
6
|
const Question_1 = require("../Question");
|
|
7
7
|
const Task_1 = require("../Task");
|
|
8
8
|
const expectations_1 = require("./expectations");
|
|
9
|
+
/**
|
|
10
|
+
* Serenity/JS Screenplay Pattern-style wrapper around {@apilink Array}
|
|
11
|
+
* and array-like structures - see {@apilink PageElements}.
|
|
12
|
+
*
|
|
13
|
+
* @group Questions
|
|
14
|
+
*/
|
|
9
15
|
class List extends Question_1.Question {
|
|
16
|
+
static of(collection) {
|
|
17
|
+
return new List(collection);
|
|
18
|
+
}
|
|
10
19
|
constructor(collection) {
|
|
11
20
|
super();
|
|
12
21
|
this.collection = collection;
|
|
13
22
|
this.subject = (0, io_1.d) `${collection}`;
|
|
14
23
|
}
|
|
15
|
-
static of(collection) {
|
|
16
|
-
return new List(collection);
|
|
17
|
-
}
|
|
18
24
|
eachMappedTo(question) {
|
|
19
25
|
return new List(new EachMappedTo(this.collection, question, this.subject));
|
|
20
26
|
}
|
|
@@ -34,7 +40,7 @@ class List extends Question_1.Question {
|
|
|
34
40
|
return Question_1.Question.about(`the first of ${this.subject}`, async (actor) => {
|
|
35
41
|
const items = await this.answeredBy(actor);
|
|
36
42
|
if (items.length === 0) {
|
|
37
|
-
throw new errors_1.
|
|
43
|
+
throw new errors_1.ListItemNotFoundError((0, io_1.d) `Can't retrieve the first item from a list with 0 items: ${items}`);
|
|
38
44
|
}
|
|
39
45
|
return items[0];
|
|
40
46
|
});
|
|
@@ -43,16 +49,16 @@ class List extends Question_1.Question {
|
|
|
43
49
|
return Question_1.Question.about(`the last of ${this.subject}`, async (actor) => {
|
|
44
50
|
const items = await this.answeredBy(actor);
|
|
45
51
|
if (items.length === 0) {
|
|
46
|
-
throw new errors_1.
|
|
52
|
+
throw new errors_1.ListItemNotFoundError((0, io_1.d) `Can't retrieve the last item from a list with 0 items: ${items}`);
|
|
47
53
|
}
|
|
48
54
|
return items[items.length - 1];
|
|
49
55
|
});
|
|
50
56
|
}
|
|
51
|
-
|
|
57
|
+
nth(index) {
|
|
52
58
|
return Question_1.Question.about(`the ${ordinal(index + 1)} of ${this.subject}`, async (actor) => {
|
|
53
59
|
const items = await this.answeredBy(actor);
|
|
54
60
|
if (index < 0 || items.length <= index) {
|
|
55
|
-
throw new errors_1.
|
|
61
|
+
throw new errors_1.ListItemNotFoundError(`Can't retrieve the ${ordinal(index)} item from a list with ${items.length} items: ` + (0, io_1.d) `${items}`);
|
|
56
62
|
}
|
|
57
63
|
return items[index];
|
|
58
64
|
});
|
|
@@ -160,7 +166,7 @@ class EachMappedTo extends Question_1.Question {
|
|
|
160
166
|
*/
|
|
161
167
|
class ForEachLoop extends Task_1.Task {
|
|
162
168
|
constructor(collection, subject, fn) {
|
|
163
|
-
super();
|
|
169
|
+
super(`#actor iterates over ${subject}`);
|
|
164
170
|
this.collection = collection;
|
|
165
171
|
this.subject = subject;
|
|
166
172
|
this.fn = fn;
|
|
@@ -171,8 +177,5 @@ class ForEachLoop extends Task_1.Task {
|
|
|
171
177
|
await this.fn({ actor, item }, index, collection);
|
|
172
178
|
}
|
|
173
179
|
}
|
|
174
|
-
toString() {
|
|
175
|
-
return `#actor iterates over ${this.subject}`;
|
|
176
|
-
}
|
|
177
180
|
}
|
|
178
181
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/screenplay/questions/List.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/screenplay/questions/List.ts"],"names":[],"mappings":";;;AAAA,yCAAiE;AACjE,iCAA6B;AAI7B,0CAAwD;AAExD,kCAA+B;AAE/B,iDAAgD;AAGhD;;;;;GAKG;AACH,MAAa,IAAgB,SAAQ,mBAA8B;IAG/D,MAAM,CAAC,EAAE,CAAK,UAAiC;QAC3C,OAAO,IAAI,IAAI,CAAK,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,YACuB,UAAwC;QAE3D,KAAK,EAAE,CAAC;QAFW,eAAU,GAAV,UAAU,CAA8B;QAG3D,IAAI,CAAC,OAAO,GAAG,IAAA,MAAC,EAAA,GAAI,UAAW,EAAE,CAAC;IACtC,CAAC;IAED,YAAY,CACR,QAA+E;QAE/E,OAAO,IAAI,IAAI,CACX,IAAI,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAC5D,CAAC;IACN,CAAC;IAED,OAAO,CAAC,QAA2G;QAC/G,OAAO,IAAI,WAAW,CAAC,I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,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SACzD;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,WAAW,CAAC,OAAe;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,WAAuB,SAAQ,WAAI;IAErC,YACqB,UAAwC,EACxC,OAAe,EACf,EAAqG;QAEtH,KAAK,CAAC,wBAAyB,OAAQ,EAAE,CAAC,CAAC;QAJ1B,eAAU,GAAV,UAAU,CAA8B;QACxC,YAAO,GAAP,OAAO,CAAQ;QACf,OAAE,GAAF,EAAE,CAAmG;IAG1H,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,KAAY;QACxB,MAAM,UAAU,GAAqB,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEzE,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE;YAC9C,MAAM,IAAI,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;SACrD;IACL,CAAC;CACJ"}
|
|
@@ -1,38 +1,34 @@
|
|
|
1
1
|
import { Answerable } from '../Answerable';
|
|
2
2
|
import { Question } from '../Question';
|
|
3
3
|
/**
|
|
4
|
-
* @
|
|
5
|
-
*
|
|
4
|
+
* A "meta question" is a {@apilink Question} about another {@apilink Answerable},
|
|
5
|
+
* used to retrieve a transformed version of the value that answerable holds.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* which is a `Question<ElementFinder>`.
|
|
7
|
+
* For example, the question {@apilink Text.of}
|
|
8
|
+
* returns text content of a {@apilink PageElement}.
|
|
10
9
|
*
|
|
11
|
-
*
|
|
10
|
+
* {@apilink MetaQuestion|Meta questions} are typically used when filtering a {@apilink List}.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
12
|
+
* ## Learn more
|
|
13
|
+
* - {@apilink List}
|
|
14
14
|
*
|
|
15
|
-
* @
|
|
16
|
-
* @interface
|
|
15
|
+
* @group Questions
|
|
17
16
|
*/
|
|
18
17
|
export interface MetaQuestion<Supported_Answerable_Type extends Answerable<any>, Answer> {
|
|
19
18
|
/**
|
|
20
|
-
* @
|
|
21
|
-
* Transforms a given `answerable`
|
|
22
|
-
* to another {@link Question}.
|
|
19
|
+
* Transforms a given `answerable` to another {@apilink Question}.
|
|
23
20
|
*
|
|
24
|
-
*
|
|
25
|
-
* @
|
|
26
|
-
*
|
|
27
|
-
* @see {@link List}
|
|
21
|
+
* #### Learn more
|
|
22
|
+
* - {@apilink List}
|
|
28
23
|
*/
|
|
29
|
-
of
|
|
24
|
+
of(answerable: Supported_Answerable_Type): Question<Answer>;
|
|
30
25
|
/**
|
|
31
|
-
* @
|
|
32
|
-
*
|
|
26
|
+
* Human-readable description of this {@apilink MetaQuestion},
|
|
27
|
+
* typically involving the description of the subject.
|
|
33
28
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
29
|
+
* For example, a description of a meta question obout "the text of an element"
|
|
30
|
+
* would be `text of ${ element.toString() }`
|
|
36
31
|
*/
|
|
37
|
-
toString
|
|
32
|
+
toString(): string;
|
|
38
33
|
}
|
|
34
|
+
//# sourceMappingURL=MetaQuestion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetaQuestion.d.ts","sourceRoot":"","sources":["../../../src/screenplay/questions/MetaQuestion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,YAAY,CAAC,yBAAyB,SAAS,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM;IAEnF;;;;;OAKG;IACH,EAAE,CAAC,UAAU,EAAE,yBAAyB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE5D;;;;;;OAMG;IACH,QAAQ,IAAI,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { JSONValue, TinyType } from 'tiny-types';
|
|
3
|
+
import * as util from 'util';
|
|
4
|
+
/**
|
|
5
|
+
* A placeholder value signifying that a {@apilink Question}
|
|
6
|
+
* has not been answered by an {@apilink Actor} when producing an {@apilink ExpectationOutcome}.
|
|
7
|
+
* This happens when Serenity/JS decides that answering a given question
|
|
8
|
+
* won't affect the outcome.
|
|
9
|
+
*
|
|
10
|
+
* For example, making the actor answer questions about the expected value
|
|
11
|
+
* and the actual value of each list item is unnecessary if we already know that the list itself is empty.
|
|
12
|
+
*
|
|
13
|
+
* @group Questions
|
|
14
|
+
*/
|
|
15
|
+
export declare class Unanswered extends TinyType {
|
|
16
|
+
[util.inspect.custom](): string;
|
|
17
|
+
toString(): string;
|
|
18
|
+
toJSON(): JSONValue;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=Unanswered.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Unanswered.d.ts","sourceRoot":"","sources":["../../../src/screenplay/questions/Unanswered.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B;;;;;;;;;;GAUG;AACH,qBAAa,UAAW,SAAQ,QAAQ;IACpC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM;IAI/B,QAAQ,IAAI,MAAM;IAIlB,MAAM,IAAI,SAAS;CAGtB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Unanswered = void 0;
|
|
27
|
+
const tiny_types_1 = require("tiny-types");
|
|
28
|
+
const util = __importStar(require("util")); // eslint-disable-line unicorn/import-style
|
|
29
|
+
/**
|
|
30
|
+
* A placeholder value signifying that a {@apilink Question}
|
|
31
|
+
* has not been answered by an {@apilink Actor} when producing an {@apilink ExpectationOutcome}.
|
|
32
|
+
* This happens when Serenity/JS decides that answering a given question
|
|
33
|
+
* won't affect the outcome.
|
|
34
|
+
*
|
|
35
|
+
* For example, making the actor answer questions about the expected value
|
|
36
|
+
* and the actual value of each list item is unnecessary if we already know that the list itself is empty.
|
|
37
|
+
*
|
|
38
|
+
* @group Questions
|
|
39
|
+
*/
|
|
40
|
+
class Unanswered extends tiny_types_1.TinyType {
|
|
41
|
+
[util.inspect.custom]() {
|
|
42
|
+
return `<<unanswered>>`;
|
|
43
|
+
}
|
|
44
|
+
toString() {
|
|
45
|
+
return 'unanswered';
|
|
46
|
+
}
|
|
47
|
+
toJSON() {
|
|
48
|
+
return undefined; // eslint-disable-line unicorn/no-useless-undefined
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.Unanswered = Unanswered;
|
|
52
|
+
//# sourceMappingURL=Unanswered.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Unanswered.js","sourceRoot":"","sources":["../../../src/screenplay/questions/Unanswered.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAiD;AACjD,2CAA6B,CAAG,2CAA2C;AAE3E;;;;;;;;;;GAUG;AACH,MAAa,UAAW,SAAQ,qBAAQ;IACpC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;QACjB,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,QAAQ;QACJ,OAAO,YAAY,CAAC;IACxB,CAAC;IAED,MAAM;QACF,OAAO,SAAS,CAAC,CAAG,mDAAmD;IAC3E,CAAC;CACJ;AAZD,gCAYC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSONObject, JSONValue, TinyType } from 'tiny-types';
|
|
2
|
+
import { Name } from '../../../model';
|
|
3
|
+
import { Unanswered } from '../Unanswered';
|
|
4
|
+
/**
|
|
5
|
+
* Used with {@apilink ExpectationOutcome} to describe an {@apilink Expectation} and the arguments it's been executed with.
|
|
6
|
+
*
|
|
7
|
+
* @group Expectations
|
|
8
|
+
*/
|
|
9
|
+
export declare class ExpectationDetails extends TinyType {
|
|
10
|
+
readonly name: Name;
|
|
11
|
+
readonly args: Array<JSONValue | ExpectationDetails | Unanswered>;
|
|
12
|
+
static of(functionName: string, ...functionArguments: Array<JSONValue | ExpectationDetails | Unanswered>): ExpectationDetails;
|
|
13
|
+
static fromJSON(o: JSONObject): ExpectationDetails;
|
|
14
|
+
protected constructor(name: Name, args: Array<JSONValue | ExpectationDetails | Unanswered>);
|
|
15
|
+
toString(): string;
|
|
16
|
+
toJSON(): {
|
|
17
|
+
name: string;
|
|
18
|
+
args: Array<{
|
|
19
|
+
type: string;
|
|
20
|
+
value: JSONValue;
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=ExpectationDetails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpectationDetails.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/questions/expectations/ExpectationDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGzF,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,QAAQ;aAuBxB,IAAI,EAAE,IAAI;aACV,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,kBAAkB,GAAG,UAAU,CAAC;IAtB5E,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,KAAK,CAAC,SAAS,GAAG,kBAAkB,GAAG,UAAU,CAAC,GAAG,kBAAkB;IAI7H,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,UAAU,GAAG,kBAAkB;IAgBlD,SAAS,aACW,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,kBAAkB,GAAG,UAAU,CAAC;IAO5E,QAAQ,IAAI,MAAM;IAUlB,MAAM,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,SAAS,CAAA;SAAE,CAAC,CAAA;KAAE;CAW9E"}
|