@serenity-js/protractor 2.32.2 → 3.0.0-rc.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 +75 -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 +20 -22
- 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Navigate.js","sourceRoot":"","sources":["../../../src/screenplay/interactions/Navigate.ts"],"names":[],"mappings":";;;AAAA,4CAA6H;AAC7H,iDAAqD;AAErD,+CAA4C;AAC5C,4CAA4C;AAE5C;;;;GAIG;AACH,MAAa,QAAQ;IAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsDG;IACH,MAAM,CAAC,EAAE,CAAC,GAAuB;QAC7B,OAAO,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,IAAI;QACP,OAAO,IAAI,YAAY,EAAE,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,OAAO;QACV,OAAO,IAAI,eAAe,EAAE,CAAC;IAC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AAC;IAClE,CAAC;IAED;;;;;OAKG;IACH,QAAQ;QACJ,OAAO,IAAA,cAAS,EAAC,yBAAyB,CAAC;IAC/C,CAAC;CACJ"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { AnswersQuestions, Interaction, Question, UsesAbilities } from '@serenity-js/core';
|
|
2
|
-
import { ElementFinder } from 'protractor';
|
|
3
|
-
import { AlertPromise } from 'selenium-webdriver';
|
|
4
|
-
import { PressBuilder } from './PressBuilder';
|
|
5
|
-
/**
|
|
6
|
-
* @desc
|
|
7
|
-
* Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to
|
|
8
|
-
* send a key press or a sequence of keys to a Web element.
|
|
9
|
-
*
|
|
10
|
-
* **Please note** that modifier keys, such as Command ⌘, [won't work on Mac](https://github.com/angular/protractor/issues/690)
|
|
11
|
-
*
|
|
12
|
-
* @example <caption>Example widget</caption>
|
|
13
|
-
* <form>
|
|
14
|
-
* <input type="text" name="example" id="example" />
|
|
15
|
-
* </form>
|
|
16
|
-
*
|
|
17
|
-
* @example <caption>Lean Page Object describing the widget</caption>
|
|
18
|
-
* import { Target } from '@serenity-js/protractor';
|
|
19
|
-
* import { by } from 'protractor';
|
|
20
|
-
*
|
|
21
|
-
* class Form {
|
|
22
|
-
* static exampleInput = Target.the('example input')
|
|
23
|
-
* .located(by.id('example'));
|
|
24
|
-
* }
|
|
25
|
-
*
|
|
26
|
-
* @example <caption>Pressing keys</caption>
|
|
27
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
28
|
-
* import { BrowseTheWeb, Press, Value } from '@serenity-js/protractor';
|
|
29
|
-
* import { Ensure, equals } from '@serenity-js/assertions';
|
|
30
|
-
* import { protractor, Key } from 'protractor';
|
|
31
|
-
*
|
|
32
|
-
* actorCalled('Priyanka')
|
|
33
|
-
* .whoCan(BrowseTheWeb.using(protractor.browser))
|
|
34
|
-
* .attemptsTo(
|
|
35
|
-
* Press.the('H', 'i', '!', Key.ENTER).in(Form.exampleInput),
|
|
36
|
-
* Ensure.that(Value.of(Form.exampleInput), equals('Hi!')),
|
|
37
|
-
* );
|
|
38
|
-
*
|
|
39
|
-
* @see {@link BrowseTheWeb}
|
|
40
|
-
* @see {@link Target}
|
|
41
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
42
|
-
* @see {@link @serenity-js/assertions/lib/expectations~equals}
|
|
43
|
-
* @see {@link selenium-webdriver~Key}
|
|
44
|
-
*
|
|
45
|
-
* @extends {@serenity-js/core/lib/screenplay~Interaction}
|
|
46
|
-
*/
|
|
47
|
-
export declare class Press extends Interaction {
|
|
48
|
-
private readonly keys;
|
|
49
|
-
private readonly field;
|
|
50
|
-
/**
|
|
51
|
-
* @desc
|
|
52
|
-
* Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
53
|
-
*
|
|
54
|
-
* @param {...keys: string[]} keys
|
|
55
|
-
* A sequence of one or more keys to press
|
|
56
|
-
*
|
|
57
|
-
* @returns {PressBuilder}
|
|
58
|
-
*/
|
|
59
|
-
static the(...keys: string[]): PressBuilder;
|
|
60
|
-
/**
|
|
61
|
-
* @param {string[]} keys
|
|
62
|
-
* A sequence of one or more keys to press
|
|
63
|
-
*
|
|
64
|
-
* @param {Question<ElementFinder> | ElementFinder} field
|
|
65
|
-
* Web element to send the keys to
|
|
66
|
-
*/
|
|
67
|
-
constructor(keys: string[], field: Question<ElementFinder> | ElementFinder | Question<AlertPromise> | AlertPromise);
|
|
68
|
-
/**
|
|
69
|
-
* @desc
|
|
70
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
71
|
-
* perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
72
|
-
*
|
|
73
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
74
|
-
* An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
75
|
-
*
|
|
76
|
-
* @returns {PromiseLike<void>}
|
|
77
|
-
*
|
|
78
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
79
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
80
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
81
|
-
*/
|
|
82
|
-
performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<any>;
|
|
83
|
-
/**
|
|
84
|
-
* @desc
|
|
85
|
-
* Generates a description to be used when reporting this {@link @serenity-js/core/lib/screenplay~Activity}.
|
|
86
|
-
*
|
|
87
|
-
* @returns {string}
|
|
88
|
-
*/
|
|
89
|
-
toString(): string;
|
|
90
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Press = void 0;
|
|
4
|
-
const core_1 = require("@serenity-js/core");
|
|
5
|
-
const protractor_1 = require("protractor");
|
|
6
|
-
const withAnswerOf_1 = require("../withAnswerOf");
|
|
7
|
-
/**
|
|
8
|
-
* @desc
|
|
9
|
-
* Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to
|
|
10
|
-
* send a key press or a sequence of keys to a Web element.
|
|
11
|
-
*
|
|
12
|
-
* **Please note** that modifier keys, such as Command ⌘, [won't work on Mac](https://github.com/angular/protractor/issues/690)
|
|
13
|
-
*
|
|
14
|
-
* @example <caption>Example widget</caption>
|
|
15
|
-
* <form>
|
|
16
|
-
* <input type="text" name="example" id="example" />
|
|
17
|
-
* </form>
|
|
18
|
-
*
|
|
19
|
-
* @example <caption>Lean Page Object describing the widget</caption>
|
|
20
|
-
* import { Target } from '@serenity-js/protractor';
|
|
21
|
-
* import { by } from 'protractor';
|
|
22
|
-
*
|
|
23
|
-
* class Form {
|
|
24
|
-
* static exampleInput = Target.the('example input')
|
|
25
|
-
* .located(by.id('example'));
|
|
26
|
-
* }
|
|
27
|
-
*
|
|
28
|
-
* @example <caption>Pressing keys</caption>
|
|
29
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
30
|
-
* import { BrowseTheWeb, Press, Value } from '@serenity-js/protractor';
|
|
31
|
-
* import { Ensure, equals } from '@serenity-js/assertions';
|
|
32
|
-
* import { protractor, Key } from 'protractor';
|
|
33
|
-
*
|
|
34
|
-
* actorCalled('Priyanka')
|
|
35
|
-
* .whoCan(BrowseTheWeb.using(protractor.browser))
|
|
36
|
-
* .attemptsTo(
|
|
37
|
-
* Press.the('H', 'i', '!', Key.ENTER).in(Form.exampleInput),
|
|
38
|
-
* Ensure.that(Value.of(Form.exampleInput), equals('Hi!')),
|
|
39
|
-
* );
|
|
40
|
-
*
|
|
41
|
-
* @see {@link BrowseTheWeb}
|
|
42
|
-
* @see {@link Target}
|
|
43
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
44
|
-
* @see {@link @serenity-js/assertions/lib/expectations~equals}
|
|
45
|
-
* @see {@link selenium-webdriver~Key}
|
|
46
|
-
*
|
|
47
|
-
* @extends {@serenity-js/core/lib/screenplay~Interaction}
|
|
48
|
-
*/
|
|
49
|
-
class Press extends core_1.Interaction {
|
|
50
|
-
/**
|
|
51
|
-
* @param {string[]} keys
|
|
52
|
-
* A sequence of one or more keys to press
|
|
53
|
-
*
|
|
54
|
-
* @param {Question<ElementFinder> | ElementFinder} field
|
|
55
|
-
* Web element to send the keys to
|
|
56
|
-
*/
|
|
57
|
-
constructor(keys, field) {
|
|
58
|
-
super();
|
|
59
|
-
this.keys = keys;
|
|
60
|
-
this.field = field;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* @desc
|
|
64
|
-
* Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
65
|
-
*
|
|
66
|
-
* @param {...keys: string[]} keys
|
|
67
|
-
* A sequence of one or more keys to press
|
|
68
|
-
*
|
|
69
|
-
* @returns {PressBuilder}
|
|
70
|
-
*/
|
|
71
|
-
static the(...keys) {
|
|
72
|
-
return {
|
|
73
|
-
in: (field) => new Press(keys, field),
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @desc
|
|
78
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
79
|
-
* perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
80
|
-
*
|
|
81
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
82
|
-
* An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
83
|
-
*
|
|
84
|
-
* @returns {PromiseLike<void>}
|
|
85
|
-
*
|
|
86
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
87
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
88
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
89
|
-
*/
|
|
90
|
-
performAs(actor) {
|
|
91
|
-
return (0, withAnswerOf_1.withAnswerOf)(actor, this.field, (elf) => elf.sendKeys(...this.keys));
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* @desc
|
|
95
|
-
* Generates a description to be used when reporting this {@link @serenity-js/core/lib/screenplay~Activity}.
|
|
96
|
-
*
|
|
97
|
-
* @returns {string}
|
|
98
|
-
*/
|
|
99
|
-
toString() {
|
|
100
|
-
return `#actor presses ${describeSequenceOf(this.keys)} in ${this.field.toString()}`;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
exports.Press = Press;
|
|
104
|
-
function describeSequenceOf(keys) {
|
|
105
|
-
return keys.map(key => [
|
|
106
|
-
capitalised(nameOf(key)),
|
|
107
|
-
isModifier(key) ? '-' : ', ',
|
|
108
|
-
]).
|
|
109
|
-
reduce((acc, current) => acc.concat(current), []).
|
|
110
|
-
slice(0, keys.length * 2 - 1).
|
|
111
|
-
join('');
|
|
112
|
-
}
|
|
113
|
-
function isModifier(key) {
|
|
114
|
-
return !!~[protractor_1.Key.ALT, protractor_1.Key.COMMAND, protractor_1.Key.CONTROL, protractor_1.Key.SHIFT].indexOf(key);
|
|
115
|
-
}
|
|
116
|
-
function nameOf(key) {
|
|
117
|
-
for (const candidate in protractor_1.Key) {
|
|
118
|
-
if (Object.prototype.hasOwnProperty.call(protractor_1.Key, candidate) && protractor_1.Key[candidate] === key) {
|
|
119
|
-
return candidate;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return key;
|
|
123
|
-
}
|
|
124
|
-
function capitalised(name) {
|
|
125
|
-
return name.charAt(0).toLocaleUpperCase() + name.slice(1).toLocaleLowerCase();
|
|
126
|
-
}
|
|
127
|
-
//# sourceMappingURL=Press.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Press.js","sourceRoot":"","sources":["../../../src/screenplay/interactions/Press.ts"],"names":[],"mappings":";;;AAAA,4CAA2F;AAC3F,2CAAgD;AAGhD,kDAA+C;AAG/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAa,KAAM,SAAQ,kBAAW;IAiBlC;;;;;;OAMG;IACH,YACqB,IAAc,EACd,KAAsF;QAEvG,KAAK,EAAE,CAAC;QAHS,SAAI,GAAJ,IAAI,CAAU;QACd,UAAK,GAAL,KAAK,CAAiF;IAG3G,CAAC;IA3BD;;;;;;;;OAQG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,IAAc;QACxB,OAAO;YACH,EAAE,EAAE,CAAC,KAAsF,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC;SACzH,CAAC;IACN,CAAC;IAgBD;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,KAAuC;QAC7C,OAAO,IAAA,2BAAY,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,GAAkB,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/F,CAAC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AiB,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;AAClF,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Question } from '@serenity-js/core';
|
|
2
|
-
import { Interaction } from '@serenity-js/core/lib/screenplay';
|
|
3
|
-
import { ElementFinder } from 'protractor';
|
|
4
|
-
import { AlertPromise } from 'selenium-webdriver';
|
|
5
|
-
/**
|
|
6
|
-
* @desc
|
|
7
|
-
* Fluent interface to make the instantiation of
|
|
8
|
-
* the {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
9
|
-
* to {@link Press} more readable.
|
|
10
|
-
*
|
|
11
|
-
* @see {@link Press}
|
|
12
|
-
*
|
|
13
|
-
* @interface
|
|
14
|
-
*/
|
|
15
|
-
export interface PressBuilder {
|
|
16
|
-
/**
|
|
17
|
-
* @desc
|
|
18
|
-
* Instantiates an {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
19
|
-
* to {@link Press}.
|
|
20
|
-
*
|
|
21
|
-
* @param {Question<ElementFinder> | ElementFinder | Question<AlertPromise> | AlertPromise} field
|
|
22
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
23
|
-
*
|
|
24
|
-
* @see {@link Target}
|
|
25
|
-
*/
|
|
26
|
-
in: (field: Question<ElementFinder> | ElementFinder | Question<AlertPromise> | AlertPromise) => Interaction;
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PressBuilder.js","sourceRoot":"","sources":["../../../src/screenplay/interactions/PressBuilder.ts"],"names":[],"mappings":""}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { Interaction } from '@serenity-js/core';
|
|
2
|
-
/**
|
|
3
|
-
* @desc
|
|
4
|
-
* Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to
|
|
5
|
-
* resize the browser window.
|
|
6
|
-
*
|
|
7
|
-
* **Please note** that another way to set the size of the browser window
|
|
8
|
-
* is to configure it in [`protractor.conf.js`](https://github.com/angular/protractor/blob/master/lib/config.ts).
|
|
9
|
-
*
|
|
10
|
-
* @see {@link Window}
|
|
11
|
-
*/
|
|
12
|
-
export declare class ResizeBrowserWindow {
|
|
13
|
-
/**
|
|
14
|
-
* @desc
|
|
15
|
-
* Instantiates a version of this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
16
|
-
* setting the size of the browser window to maximum.
|
|
17
|
-
*
|
|
18
|
-
* @example <caption>Maximising browser window</caption>
|
|
19
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
20
|
-
* import { BrowseTheWeb, Navigate, ResizeBrowserWindow, Window } from '@serenity-js/protractor';
|
|
21
|
-
* import { Ensure, isGreaterThan } from '@serenity-js/assertions';
|
|
22
|
-
* import { protractor } from 'protractor';
|
|
23
|
-
*
|
|
24
|
-
* actorCalled('Ventana')
|
|
25
|
-
* .whoCan(BrowseTheWeb.using(protractor.browser))
|
|
26
|
-
* .attemptsTo(
|
|
27
|
-
* Navigate.to('/app'),
|
|
28
|
-
* ResizeBrowserWindow.toMaximum(),
|
|
29
|
-
* Ensure.that(Window.size(), property('width', isGreaterThan(1024))),
|
|
30
|
-
* );
|
|
31
|
-
*
|
|
32
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
33
|
-
*
|
|
34
|
-
* @see {@link BrowseTheWeb}
|
|
35
|
-
* @see {@link Window.size}
|
|
36
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
37
|
-
* @see {@link @serenity-js/assertions/lib/expectations~property}
|
|
38
|
-
* @see {@link @serenity-js/assertions/lib/expectations~isGreaterThan}
|
|
39
|
-
*/
|
|
40
|
-
static toMaximum(): Interaction;
|
|
41
|
-
/**
|
|
42
|
-
* @desc
|
|
43
|
-
* Instantiates a version of this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
44
|
-
* setting the size of the browser window to given `width` and `height`
|
|
45
|
-
*
|
|
46
|
-
* @example <caption>Setting specific window size</caption>
|
|
47
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
48
|
-
* import { BrowseTheWeb, Navigate, ResizeBrowserWindow } from '@serenity-js/protractor';
|
|
49
|
-
* import { protractor } from 'protractor';
|
|
50
|
-
*
|
|
51
|
-
* actorCalled('Ventana')
|
|
52
|
-
* .whoCan(BrowseTheWeb.using(protractor.browser))
|
|
53
|
-
* .attemptsTo(
|
|
54
|
-
* Navigate.to('/app'),
|
|
55
|
-
* ResizeBrowserWindow.to(828, 1792),
|
|
56
|
-
* );
|
|
57
|
-
*
|
|
58
|
-
* @see {@link BrowseTheWeb}
|
|
59
|
-
*
|
|
60
|
-
* @param {number} width
|
|
61
|
-
* Desired new width of the browser window
|
|
62
|
-
*
|
|
63
|
-
* @param {number} height
|
|
64
|
-
* Desired new height of the browser window
|
|
65
|
-
*
|
|
66
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
67
|
-
*/
|
|
68
|
-
static to(width: number, height: number): Interaction;
|
|
69
|
-
}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResizeBrowserWindow = void 0;
|
|
4
|
-
const abilities_1 = require("../abilities");
|
|
5
|
-
/**
|
|
6
|
-
* @desc
|
|
7
|
-
* Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to
|
|
8
|
-
* resize the browser window.
|
|
9
|
-
*
|
|
10
|
-
* **Please note** that another way to set the size of the browser window
|
|
11
|
-
* is to configure it in [`protractor.conf.js`](https://github.com/angular/protractor/blob/master/lib/config.ts).
|
|
12
|
-
*
|
|
13
|
-
* @see {@link Window}
|
|
14
|
-
*/
|
|
15
|
-
class ResizeBrowserWindow {
|
|
16
|
-
/**
|
|
17
|
-
* @desc
|
|
18
|
-
* Instantiates a version of this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
19
|
-
* setting the size of the browser window to maximum.
|
|
20
|
-
*
|
|
21
|
-
* @example <caption>Maximising browser window</caption>
|
|
22
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
23
|
-
* import { BrowseTheWeb, Navigate, ResizeBrowserWindow, Window } from '@serenity-js/protractor';
|
|
24
|
-
* import { Ensure, isGreaterThan } from '@serenity-js/assertions';
|
|
25
|
-
* import { protractor } from 'protractor';
|
|
26
|
-
*
|
|
27
|
-
* actorCalled('Ventana')
|
|
28
|
-
* .whoCan(BrowseTheWeb.using(protractor.browser))
|
|
29
|
-
* .attemptsTo(
|
|
30
|
-
* Navigate.to('/app'),
|
|
31
|
-
* ResizeBrowserWindow.toMaximum(),
|
|
32
|
-
* Ensure.that(Window.size(), property('width', isGreaterThan(1024))),
|
|
33
|
-
* );
|
|
34
|
-
*
|
|
35
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
36
|
-
*
|
|
37
|
-
* @see {@link BrowseTheWeb}
|
|
38
|
-
* @see {@link Window.size}
|
|
39
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
40
|
-
* @see {@link @serenity-js/assertions/lib/expectations~property}
|
|
41
|
-
* @see {@link @serenity-js/assertions/lib/expectations~isGreaterThan}
|
|
42
|
-
*/
|
|
43
|
-
static toMaximum() {
|
|
44
|
-
return new MaximiseBrowserWindow();
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* @desc
|
|
48
|
-
* Instantiates a version of this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
49
|
-
* setting the size of the browser window to given `width` and `height`
|
|
50
|
-
*
|
|
51
|
-
* @example <caption>Setting specific window size</caption>
|
|
52
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
53
|
-
* import { BrowseTheWeb, Navigate, ResizeBrowserWindow } from '@serenity-js/protractor';
|
|
54
|
-
* import { protractor } from 'protractor';
|
|
55
|
-
*
|
|
56
|
-
* actorCalled('Ventana')
|
|
57
|
-
* .whoCan(BrowseTheWeb.using(protractor.browser))
|
|
58
|
-
* .attemptsTo(
|
|
59
|
-
* Navigate.to('/app'),
|
|
60
|
-
* ResizeBrowserWindow.to(828, 1792),
|
|
61
|
-
* );
|
|
62
|
-
*
|
|
63
|
-
* @see {@link BrowseTheWeb}
|
|
64
|
-
*
|
|
65
|
-
* @param {number} width
|
|
66
|
-
* Desired new width of the browser window
|
|
67
|
-
*
|
|
68
|
-
* @param {number} height
|
|
69
|
-
* Desired new height of the browser window
|
|
70
|
-
*
|
|
71
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
72
|
-
*/
|
|
73
|
-
static to(width, height) {
|
|
74
|
-
return new SetBrowserWindowSize(width, height);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.ResizeBrowserWindow = ResizeBrowserWindow;
|
|
78
|
-
/**
|
|
79
|
-
* @package
|
|
80
|
-
*/
|
|
81
|
-
class MaximiseBrowserWindow {
|
|
82
|
-
/**
|
|
83
|
-
* @desc
|
|
84
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
85
|
-
* perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
86
|
-
*
|
|
87
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
88
|
-
* An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
89
|
-
*
|
|
90
|
-
* @returns {PromiseLike<void>}
|
|
91
|
-
*
|
|
92
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
93
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
94
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
95
|
-
*/
|
|
96
|
-
performAs(actor) {
|
|
97
|
-
return abilities_1.BrowseTheWeb.as(actor).manage().window().maximize();
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* @desc
|
|
101
|
-
* Generates a description to be used when reporting this {@link @serenity-js/core/lib/screenplay~Activity}.
|
|
102
|
-
*
|
|
103
|
-
* @returns {string}
|
|
104
|
-
*/
|
|
105
|
-
toString() {
|
|
106
|
-
return `#actor maximises the browser window`;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* @package
|
|
111
|
-
*/
|
|
112
|
-
class SetBrowserWindowSize {
|
|
113
|
-
constructor(width, height) {
|
|
114
|
-
this.width = width;
|
|
115
|
-
this.height = height;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* @desc
|
|
119
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
120
|
-
* perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
121
|
-
*
|
|
122
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
123
|
-
* An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
124
|
-
*
|
|
125
|
-
* @returns {PromiseLike<void>}
|
|
126
|
-
*
|
|
127
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
128
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
129
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
130
|
-
*/
|
|
131
|
-
performAs(actor) {
|
|
132
|
-
return abilities_1.BrowseTheWeb.as(actor).manage().window().setSize(this.width, this.height);
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* @desc
|
|
136
|
-
* Generates a description to be used when reporting this {@link @serenity-js/core/lib/screenplay~Activity}.
|
|
137
|
-
*
|
|
138
|
-
* @returns {string}
|
|
139
|
-
*/
|
|
140
|
-
toString() {
|
|
141
|
-
return `#actor sets the size of the browser window to ${this.width} x ${this.height}`;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
//# sourceMappingURL=ResizeBrowserWindow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResizeBrowserWindow.js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swersQuestions, Interaction, Question, UsesAbilities } from '@serenity-js/core';
|
|
2
|
-
import { ElementFinder } from 'protractor';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to
|
|
6
|
-
* perfom a right click on a given Web element.
|
|
7
|
-
*
|
|
8
|
-
* This is typically used to open a [custom context menu](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event)
|
|
9
|
-
* on a given Web element, since it's not possible to interact with the standard context menu offered by your browser
|
|
10
|
-
*
|
|
11
|
-
* @example <caption>Example widget</caption>
|
|
12
|
-
* <form>
|
|
13
|
-
* <input type="text" id="field"
|
|
14
|
-
* oncontextmenu="showMenu(); return false;" />
|
|
15
|
-
*
|
|
16
|
-
* <div id="context-menu" style="display:none">
|
|
17
|
-
* Custom context menu
|
|
18
|
-
* </div>
|
|
19
|
-
* </form>
|
|
20
|
-
*
|
|
21
|
-
* <script>
|
|
22
|
-
* function showMenu() {
|
|
23
|
-
* document.getElementById("context-menu").style.display = 'block';
|
|
24
|
-
* }
|
|
25
|
-
* </script>
|
|
26
|
-
*
|
|
27
|
-
* @example <caption>Lean Page Object describing the widget</caption>
|
|
28
|
-
* import { Target } from '@serenity-js/protractor';
|
|
29
|
-
* import { by } from 'protractor';
|
|
30
|
-
*
|
|
31
|
-
* class Form {
|
|
32
|
-
* static exampleInput = Target.the('example input')
|
|
33
|
-
* .located(by.id('example'));
|
|
34
|
-
* static exampleContextMenu = Target.the('example context menu')
|
|
35
|
-
* .located(by.id('context-menu'));
|
|
36
|
-
* }
|
|
37
|
-
*
|
|
38
|
-
* @example <caption>Right-click on an element</caption>
|
|
39
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
40
|
-
* import { BrowseTheWeb, RightClick, isVisible } from '@serenity-js/protractor';
|
|
41
|
-
* import { Ensure } from '@serenity-js/assertions';
|
|
42
|
-
* import { protractor } from 'protractor';
|
|
43
|
-
*
|
|
44
|
-
* actorCalled('Chloé')
|
|
45
|
-
* .whoCan(BrowseTheWeb.using(protractor.browser))
|
|
46
|
-
* .attemptsTo(
|
|
47
|
-
* RightClick.on(Form.exampleInput),
|
|
48
|
-
* Ensure.that(Form.exampleContextMenu, isVisible()),
|
|
49
|
-
* );
|
|
50
|
-
*
|
|
51
|
-
* @see {@link BrowseTheWeb}
|
|
52
|
-
* @see {@link Target}
|
|
53
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
54
|
-
* @see {@link isVisible}
|
|
55
|
-
*
|
|
56
|
-
* @extends {@serenity-js/core/lib/screenplay~Interaction}
|
|
57
|
-
*/
|
|
58
|
-
export declare class RightClick extends Interaction {
|
|
59
|
-
private readonly target;
|
|
60
|
-
/**
|
|
61
|
-
* @desc
|
|
62
|
-
* Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
63
|
-
*
|
|
64
|
-
* @param {Question<ElementFinder> | ElementFinder} target
|
|
65
|
-
* The element to be right clicked on
|
|
66
|
-
*
|
|
67
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
68
|
-
*/
|
|
69
|
-
static on(target: Question<ElementFinder> | ElementFinder): Interaction;
|
|
70
|
-
/**
|
|
71
|
-
* @param {Question<ElementFinder> | ElementFinder} target
|
|
72
|
-
* The element to be right clicked on
|
|
73
|
-
*/
|
|
74
|
-
constructor(target: Question<ElementFinder> | ElementFinder);
|
|
75
|
-
/**
|
|
76
|
-
* @desc
|
|
77
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
78
|
-
* perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
79
|
-
*
|
|
80
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
81
|
-
* An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
82
|
-
*
|
|
83
|
-
* @returns {PromiseLike<void>}
|
|
84
|
-
*
|
|
85
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
86
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
87
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
88
|
-
*/
|
|
89
|
-
performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void>;
|
|
90
|
-
/**
|
|
91
|
-
* @desc
|
|
92
|
-
* Generates a description to be used when reporting this {@link @serenity-js/core/lib/screenplay~Activity}.
|
|
93
|
-
*
|
|
94
|
-
* @returns {string}
|
|
95
|
-
*/
|
|
96
|
-
toString(): string;
|
|
97
|
-
}
|