@serenity-js/protractor 2.32.3 → 3.0.0-rc.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 +72 -0
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -2
- package/lib/index.js.map +1 -1
- package/lib/screenplay/abilities/{BrowseTheWeb.d.ts → BrowseTheWebWithProtractor.d.ts} +52 -160
- package/lib/screenplay/abilities/{BrowseTheWeb.js → BrowseTheWebWithProtractor.js} +169 -218
- package/lib/screenplay/abilities/BrowseTheWebWithProtractor.js.map +1 -0
- package/lib/screenplay/abilities/index.d.ts +1 -1
- package/lib/screenplay/abilities/index.js +1 -1
- package/lib/screenplay/abilities/index.js.map +1 -1
- package/lib/screenplay/index.d.ts +1 -0
- package/lib/screenplay/index.js +1 -0
- package/lib/screenplay/index.js.map +1 -1
- package/lib/screenplay/interactions/UseAngular.js +2 -2
- package/lib/screenplay/interactions/UseAngular.js.map +1 -1
- package/lib/screenplay/interactions/index.d.ts +0 -19
- package/lib/screenplay/interactions/index.js +0 -19
- package/lib/screenplay/interactions/index.js.map +1 -1
- package/lib/screenplay/models/ProtractorCookie.d.ts +11 -0
- package/lib/screenplay/models/ProtractorCookie.js +39 -0
- package/lib/screenplay/models/ProtractorCookie.js.map +1 -0
- package/lib/screenplay/models/ProtractorModalDialog.d.ts +11 -0
- package/lib/screenplay/models/ProtractorModalDialog.js +43 -0
- package/lib/screenplay/models/ProtractorModalDialog.js.map +1 -0
- package/lib/screenplay/models/ProtractorNativeElementRoot.d.ts +5 -0
- package/lib/screenplay/{interactions/EnterBuilder.js → models/ProtractorNativeElementRoot.js} +1 -1
- package/lib/screenplay/models/ProtractorNativeElementRoot.js.map +1 -0
- package/lib/screenplay/models/ProtractorPage.d.ts +24 -0
- package/lib/screenplay/models/ProtractorPage.js +92 -0
- package/lib/screenplay/models/ProtractorPage.js.map +1 -0
- package/lib/screenplay/models/ProtractorPageElement.d.ts +23 -0
- package/lib/screenplay/models/ProtractorPageElement.js +112 -0
- package/lib/screenplay/models/ProtractorPageElement.js.map +1 -0
- package/lib/screenplay/models/ProtractorPageElements.d.ts +16 -0
- package/lib/screenplay/models/ProtractorPageElements.js +62 -0
- package/lib/screenplay/models/ProtractorPageElements.js.map +1 -0
- package/lib/screenplay/models/index.d.ts +6 -0
- package/lib/{expectations → screenplay/models}/index.js +6 -6
- package/lib/screenplay/models/index.js.map +1 -0
- package/lib/{promiseOf.d.ts → screenplay/promised.d.ts} +1 -1
- package/lib/{promiseOf.js → screenplay/promised.js} +4 -4
- package/lib/screenplay/promised.js.map +1 -0
- package/lib/screenplay/promisedWebElement.d.ts +11 -0
- package/lib/screenplay/promisedWebElement.js +27 -0
- package/lib/screenplay/promisedWebElement.js.map +1 -0
- package/lib/screenplay/questions/ProtractorParam.d.ts +24 -29
- package/lib/screenplay/questions/ProtractorParam.js +26 -33
- package/lib/screenplay/questions/ProtractorParam.js.map +1 -1
- package/lib/screenplay/questions/index.d.ts +0 -13
- package/lib/screenplay/questions/index.js +0 -16
- package/lib/screenplay/questions/index.js.map +1 -1
- package/package.json +21 -23
- package/src/index.ts +0 -2
- package/src/screenplay/abilities/{BrowseTheWeb.ts → BrowseTheWebWithProtractor.ts} +216 -241
- package/src/screenplay/abilities/index.ts +1 -1
- package/src/screenplay/index.ts +1 -0
- package/src/screenplay/interactions/UseAngular.ts +3 -3
- package/src/screenplay/interactions/index.ts +0 -19
- package/src/screenplay/models/ProtractorCookie.ts +41 -0
- package/src/screenplay/models/ProtractorModalDialog.ts +49 -0
- package/src/screenplay/models/ProtractorNativeElementRoot.ts +6 -0
- package/src/screenplay/models/ProtractorPage.ts +116 -0
- package/src/screenplay/models/ProtractorPageElement.ts +167 -0
- package/src/screenplay/models/ProtractorPageElements.ts +86 -0
- package/src/screenplay/models/index.ts +7 -0
- package/src/{promiseOf.ts → screenplay/promised.ts} +1 -1
- package/src/screenplay/promisedWebElement.ts +28 -0
- package/src/screenplay/questions/ProtractorParam.ts +29 -38
- package/src/screenplay/questions/index.ts +0 -13
- package/lib/expectations/ElementFinderExpectation.d.ts +0 -11
- package/lib/expectations/ElementFinderExpectation.js +0 -24
- package/lib/expectations/ElementFinderExpectation.js.map +0 -1
- package/lib/expectations/index.d.ts +0 -6
- package/lib/expectations/index.js.map +0 -1
- package/lib/expectations/isActive.d.ts +0 -13
- package/lib/expectations/isActive.js +0 -19
- package/lib/expectations/isActive.js.map +0 -1
- package/lib/expectations/isClickable.d.ts +0 -13
- package/lib/expectations/isClickable.js +0 -22
- package/lib/expectations/isClickable.js.map +0 -1
- package/lib/expectations/isEnabled.d.ts +0 -13
- package/lib/expectations/isEnabled.js +0 -19
- package/lib/expectations/isEnabled.js.map +0 -1
- package/lib/expectations/isPresent.d.ts +0 -14
- package/lib/expectations/isPresent.js +0 -20
- package/lib/expectations/isPresent.js.map +0 -1
- package/lib/expectations/isSelected.d.ts +0 -13
- package/lib/expectations/isSelected.js +0 -22
- package/lib/expectations/isSelected.js.map +0 -1
- package/lib/expectations/isVisible.d.ts +0 -13
- package/lib/expectations/isVisible.js +0 -25
- package/lib/expectations/isVisible.js.map +0 -1
- package/lib/promiseOf.js.map +0 -1
- package/lib/screenplay/abilities/BrowseTheWeb.js.map +0 -1
- package/lib/screenplay/interactions/Accept.d.ts +0 -81
- package/lib/screenplay/interactions/Accept.js +0 -95
- package/lib/screenplay/interactions/Accept.js.map +0 -1
- package/lib/screenplay/interactions/Clear.d.ts +0 -88
- package/lib/screenplay/interactions/Clear.js +0 -121
- package/lib/screenplay/interactions/Clear.js.map +0 -1
- package/lib/screenplay/interactions/Click.d.ts +0 -81
- package/lib/screenplay/interactions/Click.js +0 -95
- package/lib/screenplay/interactions/Click.js.map +0 -1
- package/lib/screenplay/interactions/Close.d.ts +0 -89
- package/lib/screenplay/interactions/Close.js +0 -169
- package/lib/screenplay/interactions/Close.js.map +0 -1
- package/lib/screenplay/interactions/DeleteCookies.d.ts +0 -72
- package/lib/screenplay/interactions/DeleteCookies.js +0 -149
- package/lib/screenplay/interactions/DeleteCookies.js.map +0 -1
- package/lib/screenplay/interactions/Dismiss.d.ts +0 -85
- package/lib/screenplay/interactions/Dismiss.js +0 -99
- package/lib/screenplay/interactions/Dismiss.js.map +0 -1
- package/lib/screenplay/interactions/DoubleClick.d.ts +0 -99
- package/lib/screenplay/interactions/DoubleClick.js +0 -121
- package/lib/screenplay/interactions/DoubleClick.js.map +0 -1
- package/lib/screenplay/interactions/Enter.d.ts +0 -81
- package/lib/screenplay/interactions/Enter.js +0 -96
- package/lib/screenplay/interactions/Enter.js.map +0 -1
- package/lib/screenplay/interactions/EnterBuilder.d.ts +0 -27
- package/lib/screenplay/interactions/EnterBuilder.js.map +0 -1
- package/lib/screenplay/interactions/ExecuteScript.d.ts +0 -171
- package/lib/screenplay/interactions/ExecuteScript.js +0 -291
- package/lib/screenplay/interactions/ExecuteScript.js.map +0 -1
- package/lib/screenplay/interactions/Hover.d.ts +0 -86
- package/lib/screenplay/interactions/Hover.js +0 -103
- package/lib/screenplay/interactions/Hover.js.map +0 -1
- package/lib/screenplay/interactions/Navigate.d.ts +0 -149
- package/lib/screenplay/interactions/Navigate.js +0 -345
- package/lib/screenplay/interactions/Navigate.js.map +0 -1
- package/lib/screenplay/interactions/Press.d.ts +0 -90
- package/lib/screenplay/interactions/Press.js +0 -127
- package/lib/screenplay/interactions/Press.js.map +0 -1
- package/lib/screenplay/interactions/PressBuilder.d.ts +0 -27
- package/lib/screenplay/interactions/PressBuilder.js +0 -3
- package/lib/screenplay/interactions/PressBuilder.js.map +0 -1
- package/lib/screenplay/interactions/ResizeBrowserWindow.d.ts +0 -69
- package/lib/screenplay/interactions/ResizeBrowserWindow.js +0 -144
- package/lib/screenplay/interactions/ResizeBrowserWindow.js.map +0 -1
- package/lib/screenplay/interactions/RightClick.d.ts +0 -97
- package/lib/screenplay/interactions/RightClick.js +0 -113
- package/lib/screenplay/interactions/RightClick.js.map +0 -1
- package/lib/screenplay/interactions/Scroll.d.ts +0 -83
- package/lib/screenplay/interactions/Scroll.js +0 -98
- package/lib/screenplay/interactions/Scroll.js.map +0 -1
- package/lib/screenplay/interactions/Select.d.ts +0 -212
- package/lib/screenplay/interactions/Select.js +0 -342
- package/lib/screenplay/interactions/Select.js.map +0 -1
- package/lib/screenplay/interactions/SelectBuilder.d.ts +0 -33
- package/lib/screenplay/interactions/SelectBuilder.js +0 -3
- package/lib/screenplay/interactions/SelectBuilder.js.map +0 -1
- package/lib/screenplay/interactions/Switch.d.ts +0 -210
- package/lib/screenplay/interactions/Switch.js +0 -345
- package/lib/screenplay/interactions/Switch.js.map +0 -1
- package/lib/screenplay/interactions/TakeScreenshot.d.ts +0 -67
- package/lib/screenplay/interactions/TakeScreenshot.js +0 -86
- package/lib/screenplay/interactions/TakeScreenshot.js.map +0 -1
- package/lib/screenplay/interactions/Wait.d.ts +0 -147
- package/lib/screenplay/interactions/Wait.js +0 -247
- package/lib/screenplay/interactions/Wait.js.map +0 -1
- package/lib/screenplay/interactions/WaitBuilder.d.ts +0 -33
- package/lib/screenplay/interactions/WaitBuilder.js +0 -3
- package/lib/screenplay/interactions/WaitBuilder.js.map +0 -1
- package/lib/screenplay/questions/Attribute.d.ts +0 -29
- package/lib/screenplay/questions/Attribute.js +0 -56
- package/lib/screenplay/questions/Attribute.js.map +0 -1
- package/lib/screenplay/questions/Browser.d.ts +0 -47
- package/lib/screenplay/questions/Browser.js +0 -55
- package/lib/screenplay/questions/Browser.js.map +0 -1
- package/lib/screenplay/questions/CSSClasses.d.ts +0 -94
- package/lib/screenplay/questions/CSSClasses.js +0 -118
- package/lib/screenplay/questions/CSSClasses.js.map +0 -1
- package/lib/screenplay/questions/Cookie.d.ts +0 -9
- package/lib/screenplay/questions/Cookie.js +0 -65
- package/lib/screenplay/questions/Cookie.js.map +0 -1
- package/lib/screenplay/questions/LastScriptExecution.d.ts +0 -14
- package/lib/screenplay/questions/LastScriptExecution.js +0 -22
- package/lib/screenplay/questions/LastScriptExecution.js.map +0 -1
- package/lib/screenplay/questions/ModalDialog.d.ts +0 -120
- package/lib/screenplay/questions/ModalDialog.js +0 -142
- package/lib/screenplay/questions/ModalDialog.js.map +0 -1
- package/lib/screenplay/questions/Pick.d.ts +0 -72
- package/lib/screenplay/questions/Pick.js +0 -254
- package/lib/screenplay/questions/Pick.js.map +0 -1
- package/lib/screenplay/questions/Selected.d.ts +0 -185
- package/lib/screenplay/questions/Selected.js +0 -254
- package/lib/screenplay/questions/Selected.js.map +0 -1
- package/lib/screenplay/questions/Value.d.ts +0 -47
- package/lib/screenplay/questions/Value.js +0 -67
- package/lib/screenplay/questions/Value.js.map +0 -1
- package/lib/screenplay/questions/Website.d.ts +0 -15
- package/lib/screenplay/questions/Website.js +0 -25
- package/lib/screenplay/questions/Website.js.map +0 -1
- package/lib/screenplay/questions/Window.d.ts +0 -23
- package/lib/screenplay/questions/Window.js +0 -28
- package/lib/screenplay/questions/Window.js.map +0 -1
- package/lib/screenplay/questions/lists/ElementArrayFinderListAdapter.d.ts +0 -89
- package/lib/screenplay/questions/lists/ElementArrayFinderListAdapter.js +0 -138
- package/lib/screenplay/questions/lists/ElementArrayFinderListAdapter.js.map +0 -1
- package/lib/screenplay/questions/lists/index.d.ts +0 -1
- package/lib/screenplay/questions/lists/index.js +0 -14
- package/lib/screenplay/questions/lists/index.js.map +0 -1
- package/lib/screenplay/questions/targets/Target.d.ts +0 -168
- package/lib/screenplay/questions/targets/Target.js +0 -190
- package/lib/screenplay/questions/targets/Target.js.map +0 -1
- package/lib/screenplay/questions/targets/TargetElement.d.ts +0 -50
- package/lib/screenplay/questions/targets/TargetElement.js +0 -62
- package/lib/screenplay/questions/targets/TargetElement.js.map +0 -1
- package/lib/screenplay/questions/targets/TargetElements.d.ts +0 -102
- package/lib/screenplay/questions/targets/TargetElements.js +0 -124
- package/lib/screenplay/questions/targets/TargetElements.js.map +0 -1
- package/lib/screenplay/questions/targets/TargetNestedElement.d.ts +0 -49
- package/lib/screenplay/questions/targets/TargetNestedElement.js +0 -61
- package/lib/screenplay/questions/targets/TargetNestedElement.js.map +0 -1
- package/lib/screenplay/questions/targets/TargetNestedElements.d.ts +0 -101
- package/lib/screenplay/questions/targets/TargetNestedElements.js +0 -123
- package/lib/screenplay/questions/targets/TargetNestedElements.js.map +0 -1
- package/lib/screenplay/questions/targets/builders.d.ts +0 -8
- package/lib/screenplay/questions/targets/builders.js +0 -3
- package/lib/screenplay/questions/targets/builders.js.map +0 -1
- package/lib/screenplay/questions/targets/index.d.ts +0 -5
- package/lib/screenplay/questions/targets/index.js +0 -18
- package/lib/screenplay/questions/targets/index.js.map +0 -1
- package/lib/screenplay/questions/targets/override.d.ts +0 -7
- package/lib/screenplay/questions/targets/override.js +0 -21
- package/lib/screenplay/questions/targets/override.js.map +0 -1
- package/lib/screenplay/questions/text/Text.d.ts +0 -41
- package/lib/screenplay/questions/text/Text.js +0 -50
- package/lib/screenplay/questions/text/Text.js.map +0 -1
- package/lib/screenplay/questions/text/TextOfMultipleElements.d.ts +0 -23
- package/lib/screenplay/questions/text/TextOfMultipleElements.js +0 -37
- package/lib/screenplay/questions/text/TextOfMultipleElements.js.map +0 -1
- package/lib/screenplay/questions/text/TextOfSingleElement.d.ts +0 -23
- package/lib/screenplay/questions/text/TextOfSingleElement.js +0 -35
- package/lib/screenplay/questions/text/TextOfSingleElement.js.map +0 -1
- package/lib/screenplay/questions/text/index.d.ts +0 -1
- package/lib/screenplay/questions/text/index.js +0 -14
- package/lib/screenplay/questions/text/index.js.map +0 -1
- package/lib/screenplay/withAnswerOf.d.ts +0 -8
- package/lib/screenplay/withAnswerOf.js +0 -18
- package/lib/screenplay/withAnswerOf.js.map +0 -1
- package/lib/stage/crew/index.d.ts +0 -1
- package/lib/stage/crew/index.js +0 -14
- package/lib/stage/crew/index.js.map +0 -1
- package/lib/stage/crew/photographer/Photographer.d.ts +0 -83
- package/lib/stage/crew/photographer/Photographer.js +0 -102
- package/lib/stage/crew/photographer/Photographer.js.map +0 -1
- package/lib/stage/crew/photographer/index.d.ts +0 -2
- package/lib/stage/crew/photographer/index.js +0 -15
- package/lib/stage/crew/photographer/index.js.map +0 -1
- package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.d.ts +0 -28
- package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.js +0 -65
- package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.js.map +0 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.d.ts +0 -18
- package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.js +0 -30
- package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.js.map +0 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.d.ts +0 -17
- package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.js +0 -28
- package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.js.map +0 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.d.ts +0 -19
- package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.js +0 -28
- package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.js.map +0 -1
- package/lib/stage/crew/photographer/strategies/index.d.ts +0 -4
- package/lib/stage/crew/photographer/strategies/index.js +0 -17
- package/lib/stage/crew/photographer/strategies/index.js.map +0 -1
- package/lib/stage/index.d.ts +0 -1
- package/lib/stage/index.js +0 -14
- package/lib/stage/index.js.map +0 -1
- package/src/expectations/ElementFinderExpectation.ts +0 -29
- package/src/expectations/index.ts +0 -6
- package/src/expectations/isActive.ts +0 -24
- package/src/expectations/isClickable.ts +0 -20
- package/src/expectations/isEnabled.ts +0 -18
- package/src/expectations/isPresent.ts +0 -19
- package/src/expectations/isSelected.ts +0 -23
- package/src/expectations/isVisible.ts +0 -27
- package/src/screenplay/interactions/Accept.ts +0 -95
- package/src/screenplay/interactions/Clear.ts +0 -130
- package/src/screenplay/interactions/Click.ts +0 -96
- package/src/screenplay/interactions/Close.ts +0 -184
- package/src/screenplay/interactions/DeleteCookies.ts +0 -154
- package/src/screenplay/interactions/Dismiss.ts +0 -99
- package/src/screenplay/interactions/DoubleClick.ts +0 -124
- package/src/screenplay/interactions/Enter.ts +0 -104
- package/src/screenplay/interactions/EnterBuilder.ts +0 -29
- package/src/screenplay/interactions/ExecuteScript.ts +0 -325
- package/src/screenplay/interactions/Hover.ts +0 -106
- package/src/screenplay/interactions/Navigate.ts +0 -363
- package/src/screenplay/interactions/Press.ts +0 -137
- package/src/screenplay/interactions/PressBuilder.ts +0 -29
- package/src/screenplay/interactions/ResizeBrowserWindow.ts +0 -148
- package/src/screenplay/interactions/RightClick.ts +0 -114
- package/src/screenplay/interactions/Scroll.ts +0 -99
- package/src/screenplay/interactions/Select.ts +0 -402
- package/src/screenplay/interactions/SelectBuilder.ts +0 -35
- package/src/screenplay/interactions/Switch.ts +0 -393
- package/src/screenplay/interactions/TakeScreenshot.ts +0 -89
- package/src/screenplay/interactions/Wait.ts +0 -267
- package/src/screenplay/interactions/WaitBuilder.ts +0 -35
- package/src/screenplay/questions/Attribute.ts +0 -67
- package/src/screenplay/questions/Browser.ts +0 -55
- package/src/screenplay/questions/CSSClasses.ts +0 -121
- package/src/screenplay/questions/Cookie.ts +0 -70
- package/src/screenplay/questions/LastScriptExecution.ts +0 -21
- package/src/screenplay/questions/ModalDialog.ts +0 -149
- package/src/screenplay/questions/Pick.ts +0 -334
- package/src/screenplay/questions/Selected.ts +0 -268
- package/src/screenplay/questions/Value.ts +0 -73
- package/src/screenplay/questions/Website.ts +0 -27
- package/src/screenplay/questions/Window.ts +0 -29
- package/src/screenplay/questions/lists/ElementArrayFinderListAdapter.ts +0 -158
- package/src/screenplay/questions/lists/index.ts +0 -1
- package/src/screenplay/questions/targets/Target.ts +0 -198
- package/src/screenplay/questions/targets/TargetElement.ts +0 -70
- package/src/screenplay/questions/targets/TargetElements.ts +0 -142
- package/src/screenplay/questions/targets/TargetNestedElement.ts +0 -71
- package/src/screenplay/questions/targets/TargetNestedElements.ts +0 -142
- package/src/screenplay/questions/targets/builders.ts +0 -10
- package/src/screenplay/questions/targets/index.ts +0 -5
- package/src/screenplay/questions/targets/override.ts +0 -17
- package/src/screenplay/questions/text/Text.ts +0 -55
- package/src/screenplay/questions/text/TextOfMultipleElements.ts +0 -40
- package/src/screenplay/questions/text/TextOfSingleElement.ts +0 -37
- package/src/screenplay/questions/text/index.ts +0 -1
- package/src/screenplay/withAnswerOf.ts +0 -19
- package/src/stage/crew/index.ts +0 -1
- package/src/stage/crew/photographer/Photographer.ts +0 -108
- package/src/stage/crew/photographer/index.ts +0 -2
- package/src/stage/crew/photographer/strategies/PhotoTakingStrategy.ts +0 -102
- package/src/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.ts +0 -28
- package/src/stage/crew/photographer/strategies/TakePhotosOfFailures.ts +0 -26
- package/src/stage/crew/photographer/strategies/TakePhotosOfInteractions.ts +0 -26
- package/src/stage/crew/photographer/strategies/index.ts +0 -4
- package/src/stage/index.ts +0 -1
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { MetaQuestion, Question } from '@serenity-js/core';
|
|
2
|
-
import { ElementArrayFinder, ElementFinder } from 'protractor';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Resolves to the visible (i.e. not hidden by CSS) `innerText` of:
|
|
6
|
-
* - a given {@link WebElement}, represented by {@link ElementFinder} or `Question<ElementFinder>`,
|
|
7
|
-
* - a group of {@link WebElement}s, represented by {@link ElementArrayFinder} or `Question<ElementArrayFinder>`.
|
|
8
|
-
*
|
|
9
|
-
* The result includes the visible text of any sub-elements, without any leading or trailing whitespace.
|
|
10
|
-
*
|
|
11
|
-
* @public
|
|
12
|
-
*
|
|
13
|
-
* @extends {@serenity-js/core/lib/screenplay~Question}
|
|
14
|
-
* @implements {@serenity-js/core/lib/screenplay/questions~MetaQuestion}
|
|
15
|
-
*/
|
|
16
|
-
export declare class Text {
|
|
17
|
-
/**
|
|
18
|
-
* @desc
|
|
19
|
-
* Retrieves text of a single {@link WebElement},
|
|
20
|
-
* represented by {@link ElementFinder}
|
|
21
|
-
* or `Question<ElementFinder>`.
|
|
22
|
-
*
|
|
23
|
-
* @param {Question<ElementFinder> | ElementFinder} target
|
|
24
|
-
* @returns {Question<Promise<string>> & MetaQuestion<Question<ElementFinder> | ElementFinder, Promise<string>>}
|
|
25
|
-
*
|
|
26
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~MetaQuestion}
|
|
27
|
-
*/
|
|
28
|
-
static of(target: Question<ElementFinder> | ElementFinder): Question<Promise<string>> & MetaQuestion<Question<ElementFinder> | ElementFinder, Promise<string>>;
|
|
29
|
-
/**
|
|
30
|
-
* @desc
|
|
31
|
-
* Retrieves text of a group of {@link WebElement}s,
|
|
32
|
-
* represented by {@link ElementArrayFinder}
|
|
33
|
-
* or `Question<ElementArrayFinder>`
|
|
34
|
-
*
|
|
35
|
-
* @param {Question<ElementArrayFinder> | ElementArrayFinder} target
|
|
36
|
-
* @returns {Question<Promise<string[]>> & MetaQuestion<Question<ElementFinder> | ElementFinder, Promise<string[]>>}
|
|
37
|
-
*
|
|
38
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~MetaQuestion}
|
|
39
|
-
*/
|
|
40
|
-
static ofAll(target: Question<ElementArrayFinder> | ElementArrayFinder): Question<Promise<string[]>> & MetaQuestion<Question<ElementFinder> | ElementFinder, Promise<string[]>>;
|
|
41
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Text = void 0;
|
|
4
|
-
const TextOfMultipleElements_1 = require("./TextOfMultipleElements");
|
|
5
|
-
const TextOfSingleElement_1 = require("./TextOfSingleElement");
|
|
6
|
-
/**
|
|
7
|
-
* @desc
|
|
8
|
-
* Resolves to the visible (i.e. not hidden by CSS) `innerText` of:
|
|
9
|
-
* - a given {@link WebElement}, represented by {@link ElementFinder} or `Question<ElementFinder>`,
|
|
10
|
-
* - a group of {@link WebElement}s, represented by {@link ElementArrayFinder} or `Question<ElementArrayFinder>`.
|
|
11
|
-
*
|
|
12
|
-
* The result includes the visible text of any sub-elements, without any leading or trailing whitespace.
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
*
|
|
16
|
-
* @extends {@serenity-js/core/lib/screenplay~Question}
|
|
17
|
-
* @implements {@serenity-js/core/lib/screenplay/questions~MetaQuestion}
|
|
18
|
-
*/
|
|
19
|
-
class Text {
|
|
20
|
-
/**
|
|
21
|
-
* @desc
|
|
22
|
-
* Retrieves text of a single {@link WebElement},
|
|
23
|
-
* represented by {@link ElementFinder}
|
|
24
|
-
* or `Question<ElementFinder>`.
|
|
25
|
-
*
|
|
26
|
-
* @param {Question<ElementFinder> | ElementFinder} target
|
|
27
|
-
* @returns {Question<Promise<string>> & MetaQuestion<Question<ElementFinder> | ElementFinder, Promise<string>>}
|
|
28
|
-
*
|
|
29
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~MetaQuestion}
|
|
30
|
-
*/
|
|
31
|
-
static of(target) {
|
|
32
|
-
return new TextOfSingleElement_1.TextOfSingleElement(target);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @desc
|
|
36
|
-
* Retrieves text of a group of {@link WebElement}s,
|
|
37
|
-
* represented by {@link ElementArrayFinder}
|
|
38
|
-
* or `Question<ElementArrayFinder>`
|
|
39
|
-
*
|
|
40
|
-
* @param {Question<ElementArrayFinder> | ElementArrayFinder} target
|
|
41
|
-
* @returns {Question<Promise<string[]>> & MetaQuestion<Question<ElementFinder> | ElementFinder, Promise<string[]>>}
|
|
42
|
-
*
|
|
43
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~MetaQuestion}
|
|
44
|
-
*/
|
|
45
|
-
static ofAll(target) {
|
|
46
|
-
return new TextOfMultipleElements_1.TextOfMultipleElements(target);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
exports.Text = Text;
|
|
50
|
-
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../../src/screenplay/questions/text/Text.ts"],"names":[],"mappings":";;;AAGA,qEAAkE;AAClE,+DAA4D;AAE5D;;;;;;;;;;;;GAYG;AACH,MAAa,IAAI;IAEb;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,MAA+C;QAGrD,OAAO,IAAI,yCAAmB,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,KAAK,CAAC,MAAyD;QAGlE,OAAO,IAAI,+CAAsB,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACJ;AAnCD,oBAmCC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AnswersQuestions, MetaQuestion, Question, UsesAbilities } from '@serenity-js/core';
|
|
2
|
-
import { ElementArrayFinder, ElementFinder } from 'protractor';
|
|
3
|
-
/**
|
|
4
|
-
* @package
|
|
5
|
-
*/
|
|
6
|
-
export declare class TextOfMultipleElements extends Question<Promise<string[]>> implements MetaQuestion<Question<ElementFinder> | ElementFinder, Promise<string[]>> {
|
|
7
|
-
protected readonly target: Question<ElementArrayFinder> | ElementArrayFinder;
|
|
8
|
-
constructor(target: Question<ElementArrayFinder> | ElementArrayFinder);
|
|
9
|
-
of(parent: Question<ElementFinder> | ElementFinder): Question<Promise<string[]>>;
|
|
10
|
-
/**
|
|
11
|
-
* @desc
|
|
12
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
13
|
-
* answer this {@link @serenity-js/core/lib/screenplay~Question}.
|
|
14
|
-
*
|
|
15
|
-
* @param {AnswersQuestions & UsesAbilities} actor
|
|
16
|
-
* @returns {Promise<void>}
|
|
17
|
-
*
|
|
18
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
19
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
20
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
21
|
-
*/
|
|
22
|
-
answeredBy(actor: AnswersQuestions & UsesAbilities): Promise<string[]>;
|
|
23
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextOfMultipleElements = void 0;
|
|
4
|
-
const core_1 = require("@serenity-js/core");
|
|
5
|
-
const withAnswerOf_1 = require("../../withAnswerOf");
|
|
6
|
-
const targets_1 = require("../targets");
|
|
7
|
-
/**
|
|
8
|
-
* @package
|
|
9
|
-
*/
|
|
10
|
-
class TextOfMultipleElements extends core_1.Question {
|
|
11
|
-
constructor(target) {
|
|
12
|
-
super(`the text of ${target}`);
|
|
13
|
-
this.target = target;
|
|
14
|
-
}
|
|
15
|
-
of(parent) {
|
|
16
|
-
return new TextOfMultipleElements(new targets_1.TargetNestedElements(parent, this.target));
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @desc
|
|
20
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
21
|
-
* answer this {@link @serenity-js/core/lib/screenplay~Question}.
|
|
22
|
-
*
|
|
23
|
-
* @param {AnswersQuestions & UsesAbilities} actor
|
|
24
|
-
* @returns {Promise<void>}
|
|
25
|
-
*
|
|
26
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
27
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
28
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
29
|
-
*/
|
|
30
|
-
answeredBy(actor) {
|
|
31
|
-
// protractor ignores type definitions for the ElementArrayFinder, hence the `any`
|
|
32
|
-
// https://github.com/angular/protractor/blob/c3978ec166760ac07db01e700c4aaaa19d9b5c38/lib/element.ts#L92
|
|
33
|
-
return (0, withAnswerOf_1.withAnswerOf)(actor, this.target, eaf => Promise.resolve(eaf.getText()));
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.TextOfMultipleElements = TextOfMultipleElements;
|
|
37
|
-
//# sourceMappingURL=TextOfMultipleElements.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextOfMultipleElements.js","sourceRoot":"","sources":["../../../../src/screenplay/questions/text/TextOfMultipleElements.ts"],"names":[],"mappings":";;;AAAA,4CAA4F;AAG5F,qDAAkD;AAClD,wCAAkD;AAElD;;GAEG;AACH,MAAa,sBACT,SAAQ,eAA2B;IAGnC,YAA+B,MAAyD;QACpF,KAAK,CAAC,eAAgB,MAAO,EAAE,CAAC,CAAC;QADN,WAAM,GAAN,MAAM,CAAmD;IAExF,CAAC;IAED,EAAE,CAAC,MAA+C;QAC9C,OAAO,IAAI,sBAAsB,CAAC,IAAI,8BAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,KAAuC;QAE9C,kFAAkF;QAClF,yGAAyG;QACzG,OAAO,IAAA,2BAAY,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAS,CAAsB,CAAC,CAAC;IAC/G,CAAC;CACJ;AA9BD,wDA8BC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AnswersQuestions, MetaQuestion, Question, UsesAbilities } from '@serenity-js/core';
|
|
2
|
-
import { ElementFinder } from 'protractor';
|
|
3
|
-
/**
|
|
4
|
-
* @package
|
|
5
|
-
*/
|
|
6
|
-
export declare class TextOfSingleElement extends Question<Promise<string>> implements MetaQuestion<Question<ElementFinder> | ElementFinder, Promise<string>> {
|
|
7
|
-
protected readonly target: Question<ElementFinder> | ElementFinder;
|
|
8
|
-
constructor(target: Question<ElementFinder> | ElementFinder);
|
|
9
|
-
of(parent: Question<ElementFinder> | ElementFinder): Question<Promise<string>>;
|
|
10
|
-
/**
|
|
11
|
-
* @desc
|
|
12
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
13
|
-
* answer this {@link @serenity-js/core/lib/screenplay~Question}.
|
|
14
|
-
*
|
|
15
|
-
* @param {AnswersQuestions & UsesAbilities} actor
|
|
16
|
-
* @returns {Promise<void>}
|
|
17
|
-
*
|
|
18
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
19
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
20
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
21
|
-
*/
|
|
22
|
-
answeredBy(actor: AnswersQuestions & UsesAbilities): Promise<string>;
|
|
23
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextOfSingleElement = void 0;
|
|
4
|
-
const core_1 = require("@serenity-js/core");
|
|
5
|
-
const withAnswerOf_1 = require("../../withAnswerOf");
|
|
6
|
-
const targets_1 = require("../targets");
|
|
7
|
-
/**
|
|
8
|
-
* @package
|
|
9
|
-
*/
|
|
10
|
-
class TextOfSingleElement extends core_1.Question {
|
|
11
|
-
constructor(target) {
|
|
12
|
-
super(`the text of ${target}`);
|
|
13
|
-
this.target = target;
|
|
14
|
-
}
|
|
15
|
-
of(parent) {
|
|
16
|
-
return new TextOfSingleElement(new targets_1.TargetNestedElement(parent, this.target));
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @desc
|
|
20
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
21
|
-
* answer this {@link @serenity-js/core/lib/screenplay~Question}.
|
|
22
|
-
*
|
|
23
|
-
* @param {AnswersQuestions & UsesAbilities} actor
|
|
24
|
-
* @returns {Promise<void>}
|
|
25
|
-
*
|
|
26
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
27
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
28
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
29
|
-
*/
|
|
30
|
-
answeredBy(actor) {
|
|
31
|
-
return (0, withAnswerOf_1.withAnswerOf)(actor, this.target, elf => elf.getText());
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.TextOfSingleElement = TextOfSingleElement;
|
|
35
|
-
//# sourceMappingURL=TextOfSingleElement.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextOfSingleElement.js","sourceRoot":"","sources":["../../../../src/screenplay/questions/text/TextOfSingleElement.ts"],"names":[],"mappings":";;;AAAA,4CAA4F;AAG5F,qDAAkD;AAClD,wCAAiD;AAEjD;;GAEG;AACH,MAAa,mBACT,SAAQ,eAAyB;IAGjC,YAA+B,MAA+C;QAC1E,KAAK,CAAC,eAAgB,MAAO,EAAE,CAAC,CAAC;QADN,WAAM,GAAN,MAAM,CAAyC;IAE9E,CAAC;IAED,EAAE,CAAC,MAA+C;QAC9C,OAAO,IAAI,mBAAmB,CAAC,IAAI,6BAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,KAAuC;QAC9C,OAAO,IAAA,2BAAY,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,EAAS,CAAC,CAAC;IACzE,CAAC;CACJ;AA3BD,kDA2BC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Text';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./Text"), exports);
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/screenplay/questions/text/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAuB"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AnswersQuestions, Question, UsesAbilities } from '@serenity-js/core';
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* @param actor
|
|
5
|
-
* @param maybeQuestion
|
|
6
|
-
* @param fn
|
|
7
|
-
*/
|
|
8
|
-
export declare function withAnswerOf<T, O>(actor: AnswersQuestions & UsesAbilities, maybeQuestion: Question<T> | T, fn: (item: T) => O): O;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withAnswerOf = void 0;
|
|
4
|
-
const core_1 = require("@serenity-js/core");
|
|
5
|
-
/**
|
|
6
|
-
* @private
|
|
7
|
-
* @param actor
|
|
8
|
-
* @param maybeQuestion
|
|
9
|
-
* @param fn
|
|
10
|
-
*/
|
|
11
|
-
function withAnswerOf(actor, maybeQuestion, fn) {
|
|
12
|
-
const answer = core_1.Question.isAQuestion(maybeQuestion)
|
|
13
|
-
? maybeQuestion.answeredBy(actor)
|
|
14
|
-
: maybeQuestion;
|
|
15
|
-
return fn(answer);
|
|
16
|
-
}
|
|
17
|
-
exports.withAnswerOf = withAnswerOf;
|
|
18
|
-
//# sourceMappingURL=withAnswerOf.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withAnswerOf.js","sourceRoot":"","sources":["../../src/screenplay/withAnswerOf.ts"],"names":[],"mappings":";;;AAAA,4CAA8E;AAE9E;;;;;GAKG;AACH,SAAgB,YAAY,CACxB,KAAuC,EACvC,aAA8B,EAC9B,EAAkB;IAElB,MAAM,MAAM,GAAG,eAAQ,CAAC,WAAW,CAAC,aAAa,CAAC;QAC9C,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC;QACjC,CAAC,CAAC,aAAa,CAAC;IAEpB,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC;AAVD,oCAUC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './photographer';
|
package/lib/stage/crew/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./photographer"), exports);
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stage/crew/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA+B"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { DomainEvent } from '@serenity-js/core/lib/events';
|
|
2
|
-
import { Stage, StageCrewMember } from '@serenity-js/core/lib/stage';
|
|
3
|
-
import { PhotoTakingStrategy } from './strategies';
|
|
4
|
-
/**
|
|
5
|
-
* @desc
|
|
6
|
-
* The Photographer is a {@link @serenity-js/core/lib/stage~StageCrewMember} who takes screenshots
|
|
7
|
-
* of the web browser the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight is using.
|
|
8
|
-
*
|
|
9
|
-
* @example <caption>Assigning the Photographer to the Stage</caption>
|
|
10
|
-
*
|
|
11
|
-
* const { ArtifactArchiver } = require('@serenity-js/core');
|
|
12
|
-
* const { Photographer, TakePhotosOfFailures } = require('@serenity-js/protractor');
|
|
13
|
-
*
|
|
14
|
-
* exports.config = {
|
|
15
|
-
*
|
|
16
|
-
* serenity: {
|
|
17
|
-
* crew: [
|
|
18
|
-
* ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
|
|
19
|
-
* Photographer.whoWill(TakePhotosOfFailures),
|
|
20
|
-
* ]
|
|
21
|
-
* },
|
|
22
|
-
*
|
|
23
|
-
* // ... rest of the config omitted for brevity
|
|
24
|
-
* };
|
|
25
|
-
*
|
|
26
|
-
* @example <caption>Taking photos upon failures only</caption>
|
|
27
|
-
*
|
|
28
|
-
* const { Photographer, TakePhotosOfFailures } = require('@serenity-js/protractor');
|
|
29
|
-
*
|
|
30
|
-
* Photographer.whoWill(TakePhotosOfFailures)
|
|
31
|
-
*
|
|
32
|
-
* @example <caption>Taking photos of all the interactions</caption>
|
|
33
|
-
*
|
|
34
|
-
* const { Photographer, TakePhotosOfInteractions } = require('@serenity-js/protractor');
|
|
35
|
-
*
|
|
36
|
-
* Photographer.whoWill(TakePhotosOfInteractions)
|
|
37
|
-
*
|
|
38
|
-
* @example <caption>Taking photos before and after all the interactions</caption>
|
|
39
|
-
*
|
|
40
|
-
* const { Photographer, TakePhotosBeforeAndAfterInteractions } = require('@serenity-js/protractor');
|
|
41
|
-
*
|
|
42
|
-
* Photographer.whoWill(TakePhotosBeforeAndAfterInteractions)
|
|
43
|
-
*
|
|
44
|
-
* @see {@link @serenity-js/core/lib/stage~Stage}
|
|
45
|
-
* @see {@link TakePhotosBeforeAndAfterInteractions}
|
|
46
|
-
* @see {@link TakePhotosOfFailures}
|
|
47
|
-
* @see {@link TakePhotosOfInteractions}
|
|
48
|
-
*/
|
|
49
|
-
export declare class Photographer implements StageCrewMember {
|
|
50
|
-
private readonly photoTakingStrategy;
|
|
51
|
-
private stage?;
|
|
52
|
-
/**
|
|
53
|
-
* @desc
|
|
54
|
-
* Instantiates a new {@link Photographer} configured to take photos (screenshots)
|
|
55
|
-
* as per the specified {@link PhotoTakingStrategy}.
|
|
56
|
-
*
|
|
57
|
-
* @param {Function} strategy - A no-arg constructor function that instantiates a {@link PhotoTakingStrategy}.
|
|
58
|
-
* @returns {StageCrewMember}
|
|
59
|
-
*/
|
|
60
|
-
static whoWill(strategy: new () => PhotoTakingStrategy): StageCrewMember;
|
|
61
|
-
/**
|
|
62
|
-
* @param {PhotoTakingStrategy} photoTakingStrategy
|
|
63
|
-
* @param {Stage} stage
|
|
64
|
-
*/
|
|
65
|
-
constructor(photoTakingStrategy: PhotoTakingStrategy, stage?: Stage);
|
|
66
|
-
/**
|
|
67
|
-
* @desc
|
|
68
|
-
* Creates a new instance of this {@link StageCrewMember} and assigns it to a given {@link Stage}.
|
|
69
|
-
*
|
|
70
|
-
* @param {Stage} stage - An instance of a {@link Stage} this {@link StageCrewMember} will be assigned to
|
|
71
|
-
* @returns {StageCrewMember} - A new instance of this {@link StageCrewMember}
|
|
72
|
-
*/
|
|
73
|
-
assignedTo(stage: Stage): StageCrewMember;
|
|
74
|
-
/**
|
|
75
|
-
* @desc
|
|
76
|
-
* Handles {@link DomainEvent} objects emitted by the {@link Stage}
|
|
77
|
-
* this {@link StageCrewMember} is assigned to.
|
|
78
|
-
*
|
|
79
|
-
* @param {DomainEvent} event
|
|
80
|
-
* @returns {void}
|
|
81
|
-
*/
|
|
82
|
-
notifyOf(event: DomainEvent): void;
|
|
83
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Photographer = void 0;
|
|
4
|
-
const core_1 = require("@serenity-js/core");
|
|
5
|
-
const events_1 = require("@serenity-js/core/lib/events");
|
|
6
|
-
/**
|
|
7
|
-
* @desc
|
|
8
|
-
* The Photographer is a {@link @serenity-js/core/lib/stage~StageCrewMember} who takes screenshots
|
|
9
|
-
* of the web browser the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight is using.
|
|
10
|
-
*
|
|
11
|
-
* @example <caption>Assigning the Photographer to the Stage</caption>
|
|
12
|
-
*
|
|
13
|
-
* const { ArtifactArchiver } = require('@serenity-js/core');
|
|
14
|
-
* const { Photographer, TakePhotosOfFailures } = require('@serenity-js/protractor');
|
|
15
|
-
*
|
|
16
|
-
* exports.config = {
|
|
17
|
-
*
|
|
18
|
-
* serenity: {
|
|
19
|
-
* crew: [
|
|
20
|
-
* ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
|
|
21
|
-
* Photographer.whoWill(TakePhotosOfFailures),
|
|
22
|
-
* ]
|
|
23
|
-
* },
|
|
24
|
-
*
|
|
25
|
-
* // ... rest of the config omitted for brevity
|
|
26
|
-
* };
|
|
27
|
-
*
|
|
28
|
-
* @example <caption>Taking photos upon failures only</caption>
|
|
29
|
-
*
|
|
30
|
-
* const { Photographer, TakePhotosOfFailures } = require('@serenity-js/protractor');
|
|
31
|
-
*
|
|
32
|
-
* Photographer.whoWill(TakePhotosOfFailures)
|
|
33
|
-
*
|
|
34
|
-
* @example <caption>Taking photos of all the interactions</caption>
|
|
35
|
-
*
|
|
36
|
-
* const { Photographer, TakePhotosOfInteractions } = require('@serenity-js/protractor');
|
|
37
|
-
*
|
|
38
|
-
* Photographer.whoWill(TakePhotosOfInteractions)
|
|
39
|
-
*
|
|
40
|
-
* @example <caption>Taking photos before and after all the interactions</caption>
|
|
41
|
-
*
|
|
42
|
-
* const { Photographer, TakePhotosBeforeAndAfterInteractions } = require('@serenity-js/protractor');
|
|
43
|
-
*
|
|
44
|
-
* Photographer.whoWill(TakePhotosBeforeAndAfterInteractions)
|
|
45
|
-
*
|
|
46
|
-
* @see {@link @serenity-js/core/lib/stage~Stage}
|
|
47
|
-
* @see {@link TakePhotosBeforeAndAfterInteractions}
|
|
48
|
-
* @see {@link TakePhotosOfFailures}
|
|
49
|
-
* @see {@link TakePhotosOfInteractions}
|
|
50
|
-
*/
|
|
51
|
-
class Photographer {
|
|
52
|
-
/**
|
|
53
|
-
* @param {PhotoTakingStrategy} photoTakingStrategy
|
|
54
|
-
* @param {Stage} stage
|
|
55
|
-
*/
|
|
56
|
-
constructor(photoTakingStrategy, stage) {
|
|
57
|
-
this.photoTakingStrategy = photoTakingStrategy;
|
|
58
|
-
this.stage = stage;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* @desc
|
|
62
|
-
* Instantiates a new {@link Photographer} configured to take photos (screenshots)
|
|
63
|
-
* as per the specified {@link PhotoTakingStrategy}.
|
|
64
|
-
*
|
|
65
|
-
* @param {Function} strategy - A no-arg constructor function that instantiates a {@link PhotoTakingStrategy}.
|
|
66
|
-
* @returns {StageCrewMember}
|
|
67
|
-
*/
|
|
68
|
-
static whoWill(strategy) {
|
|
69
|
-
return new Photographer(new strategy());
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @desc
|
|
73
|
-
* Creates a new instance of this {@link StageCrewMember} and assigns it to a given {@link Stage}.
|
|
74
|
-
*
|
|
75
|
-
* @param {Stage} stage - An instance of a {@link Stage} this {@link StageCrewMember} will be assigned to
|
|
76
|
-
* @returns {StageCrewMember} - A new instance of this {@link StageCrewMember}
|
|
77
|
-
*/
|
|
78
|
-
assignedTo(stage) {
|
|
79
|
-
return new Photographer(this.photoTakingStrategy, stage);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* @desc
|
|
83
|
-
* Handles {@link DomainEvent} objects emitted by the {@link Stage}
|
|
84
|
-
* this {@link StageCrewMember} is assigned to.
|
|
85
|
-
*
|
|
86
|
-
* @param {DomainEvent} event
|
|
87
|
-
* @returns {void}
|
|
88
|
-
*/
|
|
89
|
-
notifyOf(event) {
|
|
90
|
-
if (!this.stage) {
|
|
91
|
-
throw new core_1.LogicError(`Photographer needs to be assigned to the Stage before it can be notified of any DomainEvents`);
|
|
92
|
-
}
|
|
93
|
-
if (!this.stage.theShowHasStarted()) {
|
|
94
|
-
return void 0;
|
|
95
|
-
}
|
|
96
|
-
if (event instanceof events_1.ActivityStarts || event instanceof events_1.ActivityFinished) {
|
|
97
|
-
this.photoTakingStrategy.considerTakingPhoto(event, this.stage);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
exports.Photographer = Photographer;
|
|
102
|
-
//# sourceMappingURL=Photographer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Photographer.js","sourceRoot":"","sources":["../../../../src/stage/crew/photographer/Photographer.ts"],"names":[],"mappings":";;;AAAA,4CAA+C;AAC/C,yDAA6F;AAK7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAa,YAAY;IAcrB;;;OAGG;IACH,YACqB,mBAAwC,EACjD,KAAa;QADJ,wBAAmB,GAAnB,mBAAmB,CAAqB;QACjD,UAAK,GAAL,KAAK,CAAQ;IAEzB,CAAC;IApBD;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,CAAC,QAAuC;QAClD,OAAO,IAAI,YAAY,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC;IAC5C,CAAC;IAYD;;;;;;OAMG;IACH,UAAU,CAAC,KAAY;QACnB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAkB;QACvB,IAAI,CAAE,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,IAAI,iBAAU,CAAC,8FAA8F,CAAC,CAAC;SACxH;QAED,IAAI,CAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE;YAClC,OAAO,KAAK,CAAC,CAAC;SACjB;QAED,IAAI,KAAK,YAAY,uBAAc,IAAI,KAAK,YAAY,yBAAgB,EAAE;YACtE,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;SACnE;IACL,CAAC;CACJ;AAxDD,oCAwDC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./Photographer"), exports);
|
|
14
|
-
__exportStar(require("./strategies"), exports);
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/stage/crew/photographer/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA+B;AAC/B,+CAA6B"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Stage } from '@serenity-js/core';
|
|
2
|
-
import { ActivityFinished, ActivityStarts, DomainEvent } from '@serenity-js/core/lib/events';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Configures the {@link Photographer} to take photos (a.k.a. screenshots)
|
|
6
|
-
* of the {@link @serenity-js/core/lib/screenplay~Activity} performed
|
|
7
|
-
* by the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight
|
|
8
|
-
* under specific conditions.
|
|
9
|
-
*
|
|
10
|
-
* @abstract
|
|
11
|
-
*/
|
|
12
|
-
export declare abstract class PhotoTakingStrategy {
|
|
13
|
-
/**
|
|
14
|
-
* @desc
|
|
15
|
-
* Takes a photo of the web browser held by the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight.
|
|
16
|
-
*
|
|
17
|
-
* @param {@serenity-js/core/lib/events~ActivityStarts | @serenity-js/core/lib/events~ActivityFinished} event
|
|
18
|
-
* @param {@serenity-js/core/lib/stage~Stage} stage - the Stage that holds reference to the Actor in the spotlight
|
|
19
|
-
* @returns void
|
|
20
|
-
*
|
|
21
|
-
* @see {@link @serenity-js/core/lib/stage~Stage#theActorInTheSpotlight}
|
|
22
|
-
*/
|
|
23
|
-
considerTakingPhoto(event: ActivityStarts | ActivityFinished, stage: Stage): void;
|
|
24
|
-
protected abstract shouldTakeAPhotoOf(event: DomainEvent): boolean;
|
|
25
|
-
protected abstract photoNameFor(event: DomainEvent): string;
|
|
26
|
-
private combinedNameFrom;
|
|
27
|
-
private shouldIgnore;
|
|
28
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PhotoTakingStrategy = void 0;
|
|
4
|
-
const events_1 = require("@serenity-js/core/lib/events");
|
|
5
|
-
const model_1 = require("@serenity-js/core/lib/model");
|
|
6
|
-
const selenium_webdriver_1 = require("selenium-webdriver");
|
|
7
|
-
const screenplay_1 = require("../../../../screenplay");
|
|
8
|
-
/**
|
|
9
|
-
* @desc
|
|
10
|
-
* Configures the {@link Photographer} to take photos (a.k.a. screenshots)
|
|
11
|
-
* of the {@link @serenity-js/core/lib/screenplay~Activity} performed
|
|
12
|
-
* by the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight
|
|
13
|
-
* under specific conditions.
|
|
14
|
-
*
|
|
15
|
-
* @abstract
|
|
16
|
-
*/
|
|
17
|
-
class PhotoTakingStrategy {
|
|
18
|
-
/**
|
|
19
|
-
* @desc
|
|
20
|
-
* Takes a photo of the web browser held by the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight.
|
|
21
|
-
*
|
|
22
|
-
* @param {@serenity-js/core/lib/events~ActivityStarts | @serenity-js/core/lib/events~ActivityFinished} event
|
|
23
|
-
* @param {@serenity-js/core/lib/stage~Stage} stage - the Stage that holds reference to the Actor in the spotlight
|
|
24
|
-
* @returns void
|
|
25
|
-
*
|
|
26
|
-
* @see {@link @serenity-js/core/lib/stage~Stage#theActorInTheSpotlight}
|
|
27
|
-
*/
|
|
28
|
-
considerTakingPhoto(event, stage) {
|
|
29
|
-
if (this.shouldTakeAPhotoOf(event)) {
|
|
30
|
-
let browseTheWeb;
|
|
31
|
-
try {
|
|
32
|
-
browseTheWeb = screenplay_1.BrowseTheWeb.as(stage.theActorInTheSpotlight());
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
return void 0;
|
|
36
|
-
}
|
|
37
|
-
const id = model_1.CorrelationId.create(), nameSuffix = this.photoNameFor(event);
|
|
38
|
-
stage.announce(new events_1.AsyncOperationAttempted(new model_1.Description(`[Photographer:${this.constructor.name}] Taking screenshot of '${nameSuffix}'...`), id));
|
|
39
|
-
Promise.all([
|
|
40
|
-
browseTheWeb.takeScreenshot(),
|
|
41
|
-
browseTheWeb.getCapabilities(),
|
|
42
|
-
]).then(([screenshot, capabilities]) => {
|
|
43
|
-
const context = [capabilities.get('platform'), capabilities.get('browserName'), capabilities.get('version')], photoName = this.combinedNameFrom(...context, nameSuffix);
|
|
44
|
-
stage.announce(new events_1.ActivityRelatedArtifactGenerated(event.sceneId, event.activityId, photoName, model_1.Photo.fromBase64(screenshot)));
|
|
45
|
-
stage.announce(new events_1.AsyncOperationCompleted(new model_1.Description(`[${this.constructor.name}] Took screenshot of '${nameSuffix}' on ${context}`), id));
|
|
46
|
-
}).catch(error => {
|
|
47
|
-
if (this.shouldIgnore(error)) {
|
|
48
|
-
stage.announce(new events_1.AsyncOperationCompleted(new model_1.Description(`[${this.constructor.name}] Aborted taking screenshot of '${nameSuffix}' because of ${error.constructor && error.constructor.name}`), id));
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
stage.announce(new events_1.AsyncOperationFailed(error, id));
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
combinedNameFrom(...parts) {
|
|
57
|
-
return new model_1.Name(parts.filter(v => !!v).join('-'));
|
|
58
|
-
}
|
|
59
|
-
shouldIgnore(error) {
|
|
60
|
-
return error instanceof selenium_webdriver_1.error.NoSuchSessionError
|
|
61
|
-
|| error instanceof selenium_webdriver_1.error.UnexpectedAlertOpenError;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.PhotoTakingStrategy = PhotoTakingStrategy;
|
|
65
|
-
//# sourceMappingURL=PhotoTakingStrategy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PhotoTakingStrategy.js","sourceRoot":"","sources":["../../../../../src/stage/crew/photographer/strategies/PhotoTakingStrategy.ts"],"names":[],"mappings":";;;AACA,yDAQsC;AACtC,uDAAsF;AACtF,2DAAwD;AAExD,uDAAsD;AAEtD;;;;;;;;GAQG;AACH,MAAsB,mBAAmB;IAErC;;;;;;;;;OASG;IACH,mBAAmB,CAAC,KAAwC,EAAE,KAAY;QACtE,IAAI,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE;YAChC,IAAI,YAA0B,CAAC;YAE/B,IAAI;gBACA,YAAY,GAAG,yBAAY,CAAC,EAAE,CAAC,KAAK,CAAC,sBAAsB,EAAE,CAAC,CAAC;aAClE;YAAC,MAAM;gBACJ,OAAO,KAAK,CAAC,CAAC;aACjB;YAED,MACI,EAAE,GAAgB,qBAAa,CAAC,MAAM,EAAE,EACxC,UAAU,GAAQ,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAE/C,KAAK,CAAC,QAAQ,CAAC,IAAI,gCAAuB,CACtC,IAAI,mBAAW,CAAC,iBAAkB,IAAI,CAAC,WAAW,CAAC,IAAK,2BAA4B,UAAW,MAAM,CAAC,EACtG,EAAE,CACL,CAAC,CAAC;YAEH,OAAO,CAAC,GAAG,CAAC;gBACR,YAAY,CAAC,cAAc,EAAE;gBAC7B,YAAY,CAAC,eAAe,EAAE;aACjC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,UAAU,EAAE,YAAY,CAAE,EAAE,EAAE;gBAErC,MACI,OAAO,GAAK,CAAE,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,CAAE,EAC1G,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,OAAO,EAAE,UAAU,CAAC,CAAC;gBAE9D,KAAK,CAAC,QAAQ,CAAC,IAAI,yCAAgC,CAC/C,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,UAAU,EAChB,SAAS,EACT,aAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAC/B,CAAC,CAAC;gBAEH,KAAK,CAAC,QAAQ,CAAC,IAAI,gCAAuB,CACtC,IAAI,mBAAW,CAAC,IAAK,IAAI,CAAC,WAAW,CAAC,IAAK,yBAA0B,UAAW,QAAS,OAAQ,EAAE,CAAC,EACpG,EAAE,CACL,CAAC,CAAC;YACP,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;oBAC1B,KAAK,CAAC,QAAQ,CAAC,IAAI,gCAAuB,CACtC,IAAI,mBAAW,CAAC,IAAK,IAAI,CAAC,WAAW,CAAC,IAAK,mCAAoC,UAAW,gBAAiB,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,CAAC,IAAK,EAAE,CAAC,EAC1J,EAAE,CACL,CAAC,CAAC;iBACN;qBACI;oBACD,KAAK,CAAC,QAAQ,CAAC,IAAI,6BAAoB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;iBACvD;YACL,CAAC,CAAC,CAAC;SACN;IACL,CAAC;IAMO,gBAAgB,CAAC,GAAG,KAAe;QACvC,OAAO,IAAI,YAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACvD,CAAC;IAEO,YAAY,CAAC,KAAY;QAC7B,OAAO,KAAK,YAAY,0BAAS,CAAC,kBAAkB;eAC7C,KAAK,YAAY,0BAAS,CAAC,wBAAwB,CAAA;IAC9D,CAAC;CACJ;AA7ED,kDA6EC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DomainEvent, InteractionFinished, InteractionStarts } from '@serenity-js/core/lib/events';
|
|
2
|
-
import { PhotoTakingStrategy } from './PhotoTakingStrategy';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Configures the {@link Photographer} to take photos (a.k.a. screenshots) both before and after
|
|
6
|
-
* every single {@link @serenity-js/core/lib/screenplay~Interaction} performed
|
|
7
|
-
* by the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight.
|
|
8
|
-
*
|
|
9
|
-
* *Please note* that this strategy will result in _a lot_ of screenshots being taken,
|
|
10
|
-
* which will seriously affect the performance of your tests.
|
|
11
|
-
* For this reason, it's best to use it only for debugging purposes.
|
|
12
|
-
*
|
|
13
|
-
* @extends {PhotoTakingStrategy}
|
|
14
|
-
*/
|
|
15
|
-
export declare class TakePhotosBeforeAndAfterInteractions extends PhotoTakingStrategy {
|
|
16
|
-
protected shouldTakeAPhotoOf(event: DomainEvent): boolean;
|
|
17
|
-
protected photoNameFor(event: InteractionStarts | InteractionFinished): string;
|
|
18
|
-
}
|