@serenity-js/core 3.0.0-rc.8 → 3.0.0
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 +207 -2135
- 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 -77
- 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 -116
- 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
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { UsesAbilities } from '../../abilities';
|
|
2
|
+
import { Answerable } from '../../Answerable';
|
|
3
|
+
import { Interaction } from '../../Interaction';
|
|
4
|
+
import { AnswersQuestions, Expectation } from '../../questions';
|
|
5
|
+
import { Duration } from '../models';
|
|
6
|
+
/**
|
|
7
|
+
* `Wait` is a synchronisation statement that instructs the {@apilink Actor|actor}
|
|
8
|
+
* to wait before proceeding with their next {@apilink Activity|activity},
|
|
9
|
+
* either for a set {@apilink Duration|duration}, or until a given {@apilink Expectation|expectation} is met.
|
|
10
|
+
*
|
|
11
|
+
* You can configure the timeout of the interaction to {@apilink Wait.until}:
|
|
12
|
+
* - globally, using {@apilink SerenityConfig.interactionTimeout}
|
|
13
|
+
* - locally, on a per-interaction basis using {@apilink Wait.upTo}
|
|
14
|
+
*
|
|
15
|
+
* :::tip Portable waiting
|
|
16
|
+
* Serenity/JS implements `Wait` from scratch, so that the behaviour is consistent no matter the integration tool you use (Playwright, WebdriverIO, Selenium, etc.)
|
|
17
|
+
* or the type of testing you do (Web, REST API, component testing, etc.)
|
|
18
|
+
* :::
|
|
19
|
+
*
|
|
20
|
+
* ## Wait with Web-based tests
|
|
21
|
+
*
|
|
22
|
+
* ### Example widget
|
|
23
|
+
*
|
|
24
|
+
* ```html
|
|
25
|
+
* <!--
|
|
26
|
+
* After about 1 second, the text will change from 'Loading...' to 'Ready!'
|
|
27
|
+
* -->
|
|
28
|
+
* <h1 id="status">Loading...</h1>
|
|
29
|
+
* <script>
|
|
30
|
+
* (function () {
|
|
31
|
+
* setTimeout(function () {
|
|
32
|
+
* document.getElementById('status').textContent = 'Ready!'
|
|
33
|
+
* }, 1000);
|
|
34
|
+
* })();
|
|
35
|
+
* </script>
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* ### Lean Page Object describing the widget
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* import { By, PageElement, Text } from '@serenity-js/web'
|
|
42
|
+
*
|
|
43
|
+
* class App {
|
|
44
|
+
* static status = () =>
|
|
45
|
+
* Text.of(PageElement.located(By.id('status'))
|
|
46
|
+
* .describedAs('status widget'))
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* ### Waiting for a set duration
|
|
51
|
+
*
|
|
52
|
+
* ```ts
|
|
53
|
+
* import { actorCalled, Duration, Wait } from '@serenity-js/core'
|
|
54
|
+
* import { BrowseTheWebWithPlaywright } from '@serenity-js/playwright'
|
|
55
|
+
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
56
|
+
* import { Browser, chromium } from 'playwright'
|
|
57
|
+
*
|
|
58
|
+
* const browser = await chromium.launch({ headless: true })
|
|
59
|
+
*
|
|
60
|
+
* await actorCalled('Inês')
|
|
61
|
+
* .whoCan(BrowseTheWebWithPlaywright.using(browser))
|
|
62
|
+
* .attemptsTo(
|
|
63
|
+
* Wait.for(Duration.ofMilliseconds(1_500)),
|
|
64
|
+
* Ensure.that(App.status(), equals('Ready!')),
|
|
65
|
+
* );
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* **Please note** that while the above implementation works,
|
|
69
|
+
* this approach is inefficient because at best
|
|
70
|
+
* the actor might wait too long and at worst the test
|
|
71
|
+
* might become "flaky" if any external interference
|
|
72
|
+
* (like network glitches, animations taking a bit too long etc.)
|
|
73
|
+
* makes the actor wait not long enough.
|
|
74
|
+
*
|
|
75
|
+
* ### Waiting until a condition is met
|
|
76
|
+
*
|
|
77
|
+
* ```ts
|
|
78
|
+
* import { actorCalled, Wait } from '@serenity-js/core'
|
|
79
|
+
* import { BrowseTheWebWithPlaywright } from '@serenity-js/playwright'
|
|
80
|
+
* import { equals } from '@serenity-js/assertions'
|
|
81
|
+
* import { Browser, chromium } from 'playwright'
|
|
82
|
+
*
|
|
83
|
+
* const browser = await chromium.launch({ headless: true })
|
|
84
|
+
*
|
|
85
|
+
* await actorCalled('Wendy')
|
|
86
|
+
* .whoCan(BrowseTheWebWithPlaywright.using(browser))
|
|
87
|
+
* .attemptsTo(
|
|
88
|
+
* Wait.until(App.status(), equals('Ready!')),
|
|
89
|
+
* // app is ready, proceed with the scenario
|
|
90
|
+
* );
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* `Wait.until` makes the {@apilink Actor} keep asking the {@apilink Question},
|
|
94
|
+
* in this case `Text.of(App.status)`, until the answer meets
|
|
95
|
+
* the expectation, or a timeout expires (default: 5s).
|
|
96
|
+
*
|
|
97
|
+
* **Please note** that both Ensure and Wait can be used with
|
|
98
|
+
* the same expectations, like `equals` or `includes`.
|
|
99
|
+
*
|
|
100
|
+
* ### Changing the default timeout
|
|
101
|
+
*
|
|
102
|
+
* ```ts
|
|
103
|
+
* import { actorCalled, Duration, Wait } from '@serenity-js/core';
|
|
104
|
+
* import { BrowseTheWebWithPlaywright } from '@serenity-js/playwright';
|
|
105
|
+
* import { equals } from '@serenity-js/assertions';
|
|
106
|
+
* import { Browser, chromium } from 'playwright';
|
|
107
|
+
*
|
|
108
|
+
* const browser: Browser = await chromium.launch({ headless: true });
|
|
109
|
+
*
|
|
110
|
+
* await actorCalled('Polly')
|
|
111
|
+
* .whoCan(BrowseTheWebWithPlaywright.using(browser))
|
|
112
|
+
* .attemptsTo(
|
|
113
|
+
* Wait.upTo(Duration.ofSeconds(3))
|
|
114
|
+
* .until(App.status(), equals('Ready!')),
|
|
115
|
+
* // app is ready, proceed with the scenario
|
|
116
|
+
* );
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* ## Learn more
|
|
120
|
+
* - {@apilink SerenityConfig.interactionTimeout}
|
|
121
|
+
* - {@apilink Duration}
|
|
122
|
+
* - {@apilink Expectation}
|
|
123
|
+
*
|
|
124
|
+
* @group Time
|
|
125
|
+
*/
|
|
126
|
+
export declare class Wait {
|
|
127
|
+
/**
|
|
128
|
+
* Minimum timeout that can be used with {@apilink Wait.until},
|
|
129
|
+
* defaults to 250 milliseconds,
|
|
130
|
+
*/
|
|
131
|
+
static readonly minimumTimeout: Duration;
|
|
132
|
+
/**
|
|
133
|
+
* The amount of time {@apilink Wait.until} should wait between condition checks,
|
|
134
|
+
* defaults to 500ms.
|
|
135
|
+
*
|
|
136
|
+
* Use {@apilink WaitUntil.pollingEvery} to override it for a given interaction.
|
|
137
|
+
*
|
|
138
|
+
* @type {Duration}
|
|
139
|
+
*/
|
|
140
|
+
static readonly defaultPollingInterval: Duration;
|
|
141
|
+
/**
|
|
142
|
+
* Minimum polling interval of 50ms between condition checks, used with {@apilink Wait.until}.
|
|
143
|
+
*/
|
|
144
|
+
static readonly minimumPollingInterval: Duration;
|
|
145
|
+
/**
|
|
146
|
+
* Instantiates a version of this {@apilink Interaction}
|
|
147
|
+
* configured to wait for a set duration.
|
|
148
|
+
*
|
|
149
|
+
* @param duration
|
|
150
|
+
* A set duration the {@apilink Actor} should wait for before proceeding.
|
|
151
|
+
*/
|
|
152
|
+
static for(duration: Answerable<Duration>): Interaction;
|
|
153
|
+
/**
|
|
154
|
+
* Instantiates a version of this {@apilink Interaction}
|
|
155
|
+
* configured to wait until the answer to the question `actual` meets the `expectation`,
|
|
156
|
+
* or the `timeout` expires.
|
|
157
|
+
*
|
|
158
|
+
* @param timeout
|
|
159
|
+
* Custom timeout to override {@apilink SerenityConfig.interactionTimeout}
|
|
160
|
+
*/
|
|
161
|
+
static upTo(timeout: Duration): {
|
|
162
|
+
until: <Actual>(actual: Answerable<Actual>, expectation: Expectation<Actual>) => WaitUntil<Actual>;
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* Instantiates a version of this {@apilink Interaction} configured to
|
|
166
|
+
* poll every {@apilink Wait.defaultPollingInterval} for the result of the provided
|
|
167
|
+
* question (`actual`) until it meets the `expectation`,
|
|
168
|
+
* or the timeout expires.
|
|
169
|
+
*
|
|
170
|
+
* @param actual
|
|
171
|
+
* An {@apilink Answerable} that the {@apilink Actor} will keep answering
|
|
172
|
+
* until the answer meets the {@apilink Expectation} provided, or the timeout expires.
|
|
173
|
+
*
|
|
174
|
+
* @param expectation
|
|
175
|
+
* An {@apilink Expectation} to be met before proceeding
|
|
176
|
+
*/
|
|
177
|
+
static until<Actual>(actual: Answerable<Actual>, expectation: Expectation<Actual>): WaitUntil<Actual>;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Synchronisation statement that instructs the {@apilink Actor} to wait before proceeding until a given {@apilink Expectation} is met.
|
|
181
|
+
*
|
|
182
|
+
* :::tip
|
|
183
|
+
* To instantiate {@apilink Interaction|interaction} to {@apilink WaitUntil}, use the factory method {@apilink Wait.until}.
|
|
184
|
+
* :::
|
|
185
|
+
*
|
|
186
|
+
* ## Learn more
|
|
187
|
+
* * {@apilink Wait.until}
|
|
188
|
+
*
|
|
189
|
+
* @group Time
|
|
190
|
+
*/
|
|
191
|
+
export declare class WaitUntil<Actual> extends Interaction {
|
|
192
|
+
private readonly actual;
|
|
193
|
+
private readonly expectation;
|
|
194
|
+
private readonly pollingInterval;
|
|
195
|
+
private readonly timeout?;
|
|
196
|
+
constructor(actual: Answerable<Actual>, expectation: Expectation<Actual>, pollingInterval: Duration, timeout?: Duration);
|
|
197
|
+
/**
|
|
198
|
+
* Configure how frequently the {@apilink Actor} should check if the answer meets the expectation.
|
|
199
|
+
*
|
|
200
|
+
* Note that the polling interval defines the delay between subsequent attempts
|
|
201
|
+
* to evaluate the expected value, and doesn't include the amount of time
|
|
202
|
+
* it take the actor to evaluate the value itself.
|
|
203
|
+
*
|
|
204
|
+
* @param interval
|
|
205
|
+
*/
|
|
206
|
+
pollingEvery(interval: Duration): Interaction;
|
|
207
|
+
/**
|
|
208
|
+
* @inheritDoc
|
|
209
|
+
*/
|
|
210
|
+
performAs(actor: UsesAbilities & AnswersQuestions): Promise<void>;
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=Wait.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Wait.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/time/activities/Wait.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAsC,MAAM,iBAAiB,CAAC;AAEpG,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuHG;AACH,qBAAa,IAAI;IAEb;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,cAAc,WAAgC;IAE9D;;;;;;;OAOG;IACH,MAAM,CAAC,QAAQ,CAAC,sBAAsB,WAAgC;IAEtE;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,sBAAsB,WAA+B;IAErE;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,WAAW;IAIvD;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,GAAG;QAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC,MAAM,CAAC,CAAA;KAAE;IAOtI;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;CAGxG;AAiBD;;;;;;;;;;;GAWG;AACH,qBAAa,SAAS,CAAC,MAAM,CAAE,SAAQ,WAAW;IAE1C,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAHR,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAC1B,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,eAAe,EAAE,QAAQ,EACzB,OAAO,CAAC,EAAE,QAAQ;IAYvC;;;;;;;;OAQG;IACH,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW;IAI7C;;OAEG;IACG,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAmC1E"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WaitUntil = exports.Wait = void 0;
|
|
4
|
+
const tiny_types_1 = require("tiny-types");
|
|
5
|
+
const errors_1 = require("../../../errors");
|
|
6
|
+
const io_1 = require("../../../io");
|
|
7
|
+
const Interaction_1 = require("../../Interaction");
|
|
8
|
+
const questions_1 = require("../../questions");
|
|
9
|
+
const abilities_1 = require("../abilities");
|
|
10
|
+
const models_1 = require("../models");
|
|
11
|
+
/**
|
|
12
|
+
* `Wait` is a synchronisation statement that instructs the {@apilink Actor|actor}
|
|
13
|
+
* to wait before proceeding with their next {@apilink Activity|activity},
|
|
14
|
+
* either for a set {@apilink Duration|duration}, or until a given {@apilink Expectation|expectation} is met.
|
|
15
|
+
*
|
|
16
|
+
* You can configure the timeout of the interaction to {@apilink Wait.until}:
|
|
17
|
+
* - globally, using {@apilink SerenityConfig.interactionTimeout}
|
|
18
|
+
* - locally, on a per-interaction basis using {@apilink Wait.upTo}
|
|
19
|
+
*
|
|
20
|
+
* :::tip Portable waiting
|
|
21
|
+
* Serenity/JS implements `Wait` from scratch, so that the behaviour is consistent no matter the integration tool you use (Playwright, WebdriverIO, Selenium, etc.)
|
|
22
|
+
* or the type of testing you do (Web, REST API, component testing, etc.)
|
|
23
|
+
* :::
|
|
24
|
+
*
|
|
25
|
+
* ## Wait with Web-based tests
|
|
26
|
+
*
|
|
27
|
+
* ### Example widget
|
|
28
|
+
*
|
|
29
|
+
* ```html
|
|
30
|
+
* <!--
|
|
31
|
+
* After about 1 second, the text will change from 'Loading...' to 'Ready!'
|
|
32
|
+
* -->
|
|
33
|
+
* <h1 id="status">Loading...</h1>
|
|
34
|
+
* <script>
|
|
35
|
+
* (function () {
|
|
36
|
+
* setTimeout(function () {
|
|
37
|
+
* document.getElementById('status').textContent = 'Ready!'
|
|
38
|
+
* }, 1000);
|
|
39
|
+
* })();
|
|
40
|
+
* </script>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* ### Lean Page Object describing the widget
|
|
44
|
+
*
|
|
45
|
+
* ```ts
|
|
46
|
+
* import { By, PageElement, Text } from '@serenity-js/web'
|
|
47
|
+
*
|
|
48
|
+
* class App {
|
|
49
|
+
* static status = () =>
|
|
50
|
+
* Text.of(PageElement.located(By.id('status'))
|
|
51
|
+
* .describedAs('status widget'))
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* ### Waiting for a set duration
|
|
56
|
+
*
|
|
57
|
+
* ```ts
|
|
58
|
+
* import { actorCalled, Duration, Wait } from '@serenity-js/core'
|
|
59
|
+
* import { BrowseTheWebWithPlaywright } from '@serenity-js/playwright'
|
|
60
|
+
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
61
|
+
* import { Browser, chromium } from 'playwright'
|
|
62
|
+
*
|
|
63
|
+
* const browser = await chromium.launch({ headless: true })
|
|
64
|
+
*
|
|
65
|
+
* await actorCalled('Inês')
|
|
66
|
+
* .whoCan(BrowseTheWebWithPlaywright.using(browser))
|
|
67
|
+
* .attemptsTo(
|
|
68
|
+
* Wait.for(Duration.ofMilliseconds(1_500)),
|
|
69
|
+
* Ensure.that(App.status(), equals('Ready!')),
|
|
70
|
+
* );
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* **Please note** that while the above implementation works,
|
|
74
|
+
* this approach is inefficient because at best
|
|
75
|
+
* the actor might wait too long and at worst the test
|
|
76
|
+
* might become "flaky" if any external interference
|
|
77
|
+
* (like network glitches, animations taking a bit too long etc.)
|
|
78
|
+
* makes the actor wait not long enough.
|
|
79
|
+
*
|
|
80
|
+
* ### Waiting until a condition is met
|
|
81
|
+
*
|
|
82
|
+
* ```ts
|
|
83
|
+
* import { actorCalled, Wait } from '@serenity-js/core'
|
|
84
|
+
* import { BrowseTheWebWithPlaywright } from '@serenity-js/playwright'
|
|
85
|
+
* import { equals } from '@serenity-js/assertions'
|
|
86
|
+
* import { Browser, chromium } from 'playwright'
|
|
87
|
+
*
|
|
88
|
+
* const browser = await chromium.launch({ headless: true })
|
|
89
|
+
*
|
|
90
|
+
* await actorCalled('Wendy')
|
|
91
|
+
* .whoCan(BrowseTheWebWithPlaywright.using(browser))
|
|
92
|
+
* .attemptsTo(
|
|
93
|
+
* Wait.until(App.status(), equals('Ready!')),
|
|
94
|
+
* // app is ready, proceed with the scenario
|
|
95
|
+
* );
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* `Wait.until` makes the {@apilink Actor} keep asking the {@apilink Question},
|
|
99
|
+
* in this case `Text.of(App.status)`, until the answer meets
|
|
100
|
+
* the expectation, or a timeout expires (default: 5s).
|
|
101
|
+
*
|
|
102
|
+
* **Please note** that both Ensure and Wait can be used with
|
|
103
|
+
* the same expectations, like `equals` or `includes`.
|
|
104
|
+
*
|
|
105
|
+
* ### Changing the default timeout
|
|
106
|
+
*
|
|
107
|
+
* ```ts
|
|
108
|
+
* import { actorCalled, Duration, Wait } from '@serenity-js/core';
|
|
109
|
+
* import { BrowseTheWebWithPlaywright } from '@serenity-js/playwright';
|
|
110
|
+
* import { equals } from '@serenity-js/assertions';
|
|
111
|
+
* import { Browser, chromium } from 'playwright';
|
|
112
|
+
*
|
|
113
|
+
* const browser: Browser = await chromium.launch({ headless: true });
|
|
114
|
+
*
|
|
115
|
+
* await actorCalled('Polly')
|
|
116
|
+
* .whoCan(BrowseTheWebWithPlaywright.using(browser))
|
|
117
|
+
* .attemptsTo(
|
|
118
|
+
* Wait.upTo(Duration.ofSeconds(3))
|
|
119
|
+
* .until(App.status(), equals('Ready!')),
|
|
120
|
+
* // app is ready, proceed with the scenario
|
|
121
|
+
* );
|
|
122
|
+
* ```
|
|
123
|
+
*
|
|
124
|
+
* ## Learn more
|
|
125
|
+
* - {@apilink SerenityConfig.interactionTimeout}
|
|
126
|
+
* - {@apilink Duration}
|
|
127
|
+
* - {@apilink Expectation}
|
|
128
|
+
*
|
|
129
|
+
* @group Time
|
|
130
|
+
*/
|
|
131
|
+
class Wait {
|
|
132
|
+
/**
|
|
133
|
+
* Instantiates a version of this {@apilink Interaction}
|
|
134
|
+
* configured to wait for a set duration.
|
|
135
|
+
*
|
|
136
|
+
* @param duration
|
|
137
|
+
* A set duration the {@apilink Actor} should wait for before proceeding.
|
|
138
|
+
*/
|
|
139
|
+
static for(duration) {
|
|
140
|
+
return new WaitFor(duration);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Instantiates a version of this {@apilink Interaction}
|
|
144
|
+
* configured to wait until the answer to the question `actual` meets the `expectation`,
|
|
145
|
+
* or the `timeout` expires.
|
|
146
|
+
*
|
|
147
|
+
* @param timeout
|
|
148
|
+
* Custom timeout to override {@apilink SerenityConfig.interactionTimeout}
|
|
149
|
+
*/
|
|
150
|
+
static upTo(timeout) {
|
|
151
|
+
return {
|
|
152
|
+
until: (actual, expectation) => new WaitUntil(actual, expectation, Wait.defaultPollingInterval.isLessThan(timeout) ? Wait.defaultPollingInterval : timeout, timeout),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Instantiates a version of this {@apilink Interaction} configured to
|
|
157
|
+
* poll every {@apilink Wait.defaultPollingInterval} for the result of the provided
|
|
158
|
+
* question (`actual`) until it meets the `expectation`,
|
|
159
|
+
* or the timeout expires.
|
|
160
|
+
*
|
|
161
|
+
* @param actual
|
|
162
|
+
* An {@apilink Answerable} that the {@apilink Actor} will keep answering
|
|
163
|
+
* until the answer meets the {@apilink Expectation} provided, or the timeout expires.
|
|
164
|
+
*
|
|
165
|
+
* @param expectation
|
|
166
|
+
* An {@apilink Expectation} to be met before proceeding
|
|
167
|
+
*/
|
|
168
|
+
static until(actual, expectation) {
|
|
169
|
+
return new WaitUntil(actual, expectation, Wait.defaultPollingInterval);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
exports.Wait = Wait;
|
|
173
|
+
/**
|
|
174
|
+
* Minimum timeout that can be used with {@apilink Wait.until},
|
|
175
|
+
* defaults to 250 milliseconds,
|
|
176
|
+
*/
|
|
177
|
+
Wait.minimumTimeout = models_1.Duration.ofMilliseconds(250);
|
|
178
|
+
/**
|
|
179
|
+
* The amount of time {@apilink Wait.until} should wait between condition checks,
|
|
180
|
+
* defaults to 500ms.
|
|
181
|
+
*
|
|
182
|
+
* Use {@apilink WaitUntil.pollingEvery} to override it for a given interaction.
|
|
183
|
+
*
|
|
184
|
+
* @type {Duration}
|
|
185
|
+
*/
|
|
186
|
+
Wait.defaultPollingInterval = models_1.Duration.ofMilliseconds(500);
|
|
187
|
+
/**
|
|
188
|
+
* Minimum polling interval of 50ms between condition checks, used with {@apilink Wait.until}.
|
|
189
|
+
*/
|
|
190
|
+
Wait.minimumPollingInterval = models_1.Duration.ofMilliseconds(50);
|
|
191
|
+
/**
|
|
192
|
+
* @package
|
|
193
|
+
*/
|
|
194
|
+
class WaitFor extends Interaction_1.Interaction {
|
|
195
|
+
constructor(duration) {
|
|
196
|
+
super((0, io_1.d) `#actor waits for ${duration}`);
|
|
197
|
+
this.duration = duration;
|
|
198
|
+
}
|
|
199
|
+
async performAs(actor) {
|
|
200
|
+
const duration = await actor.answer(this.duration);
|
|
201
|
+
return abilities_1.ScheduleWork.as(actor).waitFor(duration);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Synchronisation statement that instructs the {@apilink Actor} to wait before proceeding until a given {@apilink Expectation} is met.
|
|
206
|
+
*
|
|
207
|
+
* :::tip
|
|
208
|
+
* To instantiate {@apilink Interaction|interaction} to {@apilink WaitUntil}, use the factory method {@apilink Wait.until}.
|
|
209
|
+
* :::
|
|
210
|
+
*
|
|
211
|
+
* ## Learn more
|
|
212
|
+
* * {@apilink Wait.until}
|
|
213
|
+
*
|
|
214
|
+
* @group Time
|
|
215
|
+
*/
|
|
216
|
+
class WaitUntil extends Interaction_1.Interaction {
|
|
217
|
+
constructor(actual, expectation, pollingInterval, timeout) {
|
|
218
|
+
super((0, io_1.d) `#actor waits until ${actual} does ${expectation}`);
|
|
219
|
+
this.actual = actual;
|
|
220
|
+
this.expectation = expectation;
|
|
221
|
+
this.pollingInterval = pollingInterval;
|
|
222
|
+
this.timeout = timeout;
|
|
223
|
+
if (timeout) {
|
|
224
|
+
(0, tiny_types_1.ensure)('Timeout', timeout.inMilliseconds(), (0, tiny_types_1.isGreaterThanOrEqualTo)(Wait.minimumTimeout.inMilliseconds()));
|
|
225
|
+
(0, tiny_types_1.ensure)('Polling interval', pollingInterval.inMilliseconds(), (0, tiny_types_1.isInRange)(Wait.minimumPollingInterval.inMilliseconds(), timeout.inMilliseconds()));
|
|
226
|
+
}
|
|
227
|
+
(0, tiny_types_1.ensure)('Polling interval', pollingInterval.inMilliseconds(), (0, tiny_types_1.isGreaterThanOrEqualTo)(Wait.minimumPollingInterval.inMilliseconds()));
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Configure how frequently the {@apilink Actor} should check if the answer meets the expectation.
|
|
231
|
+
*
|
|
232
|
+
* Note that the polling interval defines the delay between subsequent attempts
|
|
233
|
+
* to evaluate the expected value, and doesn't include the amount of time
|
|
234
|
+
* it take the actor to evaluate the value itself.
|
|
235
|
+
*
|
|
236
|
+
* @param interval
|
|
237
|
+
*/
|
|
238
|
+
pollingEvery(interval) {
|
|
239
|
+
return new WaitUntil(this.actual, this.expectation, interval, this.timeout);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* @inheritDoc
|
|
243
|
+
*/
|
|
244
|
+
async performAs(actor) {
|
|
245
|
+
await abilities_1.ScheduleWork.as(actor).repeatUntil(() => actor.answer(this.expectation.isMetFor(this.actual)), {
|
|
246
|
+
exitCondition: outcome => outcome instanceof questions_1.ExpectationMet,
|
|
247
|
+
delayBetweenInvocations: (invocation) => invocation === 0
|
|
248
|
+
? models_1.Duration.ofMilliseconds(0)
|
|
249
|
+
: this.pollingInterval,
|
|
250
|
+
timeout: this.timeout,
|
|
251
|
+
errorHandler: (error, outcome) => {
|
|
252
|
+
if (error instanceof errors_1.ListItemNotFoundError) {
|
|
253
|
+
return; // ignore, lists might get populated later
|
|
254
|
+
}
|
|
255
|
+
if (error instanceof errors_1.TimeoutExpiredError) {
|
|
256
|
+
throw errors_1.RaiseErrors.as(actor).create(errors_1.AssertionError, {
|
|
257
|
+
message: error.message + (0, io_1.d) ` while waiting for ${this.actual} to ${this.expectation}`,
|
|
258
|
+
expectation: outcome === null || outcome === void 0 ? void 0 : outcome.expectation,
|
|
259
|
+
diff: outcome && { expected: outcome === null || outcome === void 0 ? void 0 : outcome.expected, actual: outcome === null || outcome === void 0 ? void 0 : outcome.actual },
|
|
260
|
+
location: this.instantiationLocation(),
|
|
261
|
+
cause: error,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
throw error;
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
exports.WaitUntil = WaitUntil;
|
|
270
|
+
//# sourceMappingURL=Wait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Wait.js","sourceRoot":"","sources":["../../../../src/screenplay/time/activities/Wait.ts"],"names":[],"mappings":";;;AAAA,2CAAuE;AAEvE,4CAA0G;AAC1G,oCAAgC;AAGhC,mDAAgD;AAChD,+CAAoG;AACpG,4CAA4C;AAC5C,sCAAqC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuHG;AACH,MAAa,IAAI;IAuBb;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,CAAC,QAA8B;QACrC,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,CAAC,OAAiB;QACzB,OAAO;YACH,KAAK,EAAE,CAAS,MAA0B,EAAE,WAAgC,EAAqB,EAAE,CAC/F,IAAI,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,sBAAsB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC;SAC3I,CAAC;IACN,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,KAAK,CAAS,MAA0B,EAAE,WAAgC;QAC7E,OAAO,IAAI,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAC3E,CAAC;;AAhEL,oBAiEC;AA/DG;;;GAGG;AACa,mBAAc,GAAG,iBAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AAE9D;;;;;;;GAOG;AACa,2BAAsB,GAAG,iBAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AAEtE;;GAEG;AACa,2BAAsB,GAAG,iBAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;AA8CzE;;GAEG;AACH,MAAM,OAAQ,SAAQ,yBAAW;IAC7B,YAA6B,QAA8B;QACvD,KAAK,CAAC,IAAA,MAAC,EAAA,oBAAqB,QAAS,EAAE,CAAC,CAAC;QADhB,aAAQ,GAAR,QAAQ,CAAsB;IAE3D,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,KAAuC;QACnD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEnD,OAAO,wBAAY,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC;CACJ;AAED;;;;;;;;;;;GAWG;AACH,MAAa,SAAkB,SAAQ,yBAAW;IAC9C,YACqB,MAA0B,EAC1B,WAAgC,EAChC,eAAyB,EACzB,OAAkB;QAEnC,KAAK,CAAC,IAAA,MAAC,EAAA,sBAAuB,MAAO,SAAU,WAAY,EAAE,CAAC,CAAC;QAL9C,WAAM,GAAN,MAAM,CAAoB;QAC1B,gBAAW,GAAX,WAAW,CAAqB;QAChC,oBAAe,GAAf,eAAe,CAAU;QACzB,YAAO,GAAP,OAAO,CAAW;QAInC,IAAI,OAAO,EAAE;YACT,IAAA,mBAAM,EAAC,SAAS,EAAE,OAAO,CAAC,cAAc,EAAE,EAAE,IAAA,mCAAsB,EAAC,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;YAC1G,IAAA,mBAAM,EAAC,kBAAkB,EAAE,eAAe,CAAC,cAAc,EAAE,EAAE,IAAA,sBAAS,EAAC,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;SACnJ;QAED,IAAA,mBAAM,EAAC,kBAAkB,EAAE,eAAe,CAAC,cAAc,EAAE,EAAE,IAAA,mCAAsB,EAAC,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IACvI,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,QAAkB;QAC3B,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,SAAS,CAAC,KAAuC;QAEnD,MAAM,wBAAY,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,WAAW,CACpC,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAC1D;YACI,aAAa,EAAE,OAAO,CAAC,EAAE,CACrB,OAAO,YAAY,0BAAc;YAErC,uBAAuB,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,KAAK,CAAC;gBACrD,CAAC,CAAC,iBAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;gBAC5B,CAAC,CAAC,IAAI,CAAC,eAAe;YAE1B,OAAO,EAAE,IAAI,CAAC,OAAO;YAErB,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;gBAC7B,IAAI,KAAK,YAAY,8BAAqB,EAAE;oBACxC,OAAO,CAAC,0CAA0C;iBACrD;gBAED,IAAI,KAAK,YAAY,4BAAmB,EAAE;oBAEtC,MAAM,oBAAW,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,uBAAc,EAAE;wBAC/C,OAAO,EAAE,KAAK,CAAC,OAAO,GAAG,IAAA,MAAC,EAAA,sBAAuB,IAAI,CAAC,MAAO,OAAQ,IAAI,CAAC,WAAY,EAAE;wBACxF,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW;wBACjC,IAAI,EAAE,OAAO,IAAI,EAAE,QAAQ,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAE;wBACzE,QAAQ,EAAE,IAAI,CAAC,qBAAqB,EAAE;wBACtC,KAAK,EAAE,KAAK;qBACf,CAAC,CAAC;iBACN;gBAED,MAAM,KAAK,CAAC;YAChB,CAAC;SACJ,CACJ,CAAC;IACN,CAAC;CACJ;AApED,8BAoEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/time/activities/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -10,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./
|
|
14
|
-
__exportStar(require("./TakeNote"), exports);
|
|
17
|
+
__exportStar(require("./Wait"), exports);
|
|
15
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/screenplay/time/activities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/screenplay/time/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./abilities"), exports);
|
|
18
|
+
__exportStar(require("./activities"), exports);
|
|
19
|
+
__exportStar(require("./models"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/time/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,+CAA6B;AAC7B,2CAAyB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Timestamp } from './Timestamp';
|
|
2
|
+
/**
|
|
3
|
+
* A {@apilink Clock} tells the time. This abstraction allows Serenity/JS to have a single place
|
|
4
|
+
* in the framework responsible for telling the time, and one that can be easily mocked for internal testing.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* const now: Timestamp = new Clock().now()
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* ## Learn more
|
|
11
|
+
* - {@apilink Timestamp}
|
|
12
|
+
* - {@apilink Duration}
|
|
13
|
+
*
|
|
14
|
+
* @group Time
|
|
15
|
+
*/
|
|
16
|
+
export declare class Clock {
|
|
17
|
+
private readonly checkTime;
|
|
18
|
+
constructor(checkTime?: () => Date);
|
|
19
|
+
/**
|
|
20
|
+
* Returns current time
|
|
21
|
+
*/
|
|
22
|
+
now(): Timestamp;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=Clock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Clock.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/time/models/Clock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,qBAAa,KAAK;IAEF,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,GAAE,MAAM,IAAuB;IAGrE;;OAEG;IACH,GAAG,IAAI,SAAS;CAGnB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Clock = void 0;
|
|
4
|
+
const Timestamp_1 = require("./Timestamp");
|
|
5
|
+
/**
|
|
6
|
+
* A {@apilink Clock} tells the time. This abstraction allows Serenity/JS to have a single place
|
|
7
|
+
* in the framework responsible for telling the time, and one that can be easily mocked for internal testing.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* const now: Timestamp = new Clock().now()
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* ## Learn more
|
|
14
|
+
* - {@apilink Timestamp}
|
|
15
|
+
* - {@apilink Duration}
|
|
16
|
+
*
|
|
17
|
+
* @group Time
|
|
18
|
+
*/
|
|
19
|
+
class Clock {
|
|
20
|
+
constructor(checkTime = () => new Date()) {
|
|
21
|
+
this.checkTime = checkTime;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns current time
|
|
25
|
+
*/
|
|
26
|
+
now() {
|
|
27
|
+
return new Timestamp_1.Timestamp(this.checkTime());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.Clock = Clock;
|
|
31
|
+
//# sourceMappingURL=Clock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Clock.js","sourceRoot":"","sources":["../../../../src/screenplay/time/models/Clock.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAExC;;;;;;;;;;;;;GAaG;AACH,MAAa,KAAK;IAEd,YAA6B,YAAwB,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAAxC,cAAS,GAAT,SAAS,CAA+B;IACrE,CAAC;IAED;;OAEG;IACH,GAAG;QACC,OAAO,IAAI,qBAAS,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAC3C,CAAC;CACJ;AAXD,sBAWC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DelayedCallback.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/time/models/DelayedCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,MAAM;IACnC,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,SAAS,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DelayedCallback.js","sourceRoot":"","sources":["../../../../src/screenplay/time/models/DelayedCallback.ts"],"names":[],"mappings":""}
|