@serenity-js/protractor 2.32.4 → 3.0.0-rc.2
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 +19 -21
- 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,11 +0,0 @@
|
|
|
1
|
-
import { AnswersQuestions, Expectation, ExpectationOutcome } from '@serenity-js/core';
|
|
2
|
-
import { ElementFinder } from 'protractor';
|
|
3
|
-
/**
|
|
4
|
-
* @access private
|
|
5
|
-
*/
|
|
6
|
-
export declare class ElementFinderExpectation extends Expectation<any, ElementFinder> {
|
|
7
|
-
private readonly fn;
|
|
8
|
-
static forElementTo(message: string, fn: (actual: ElementFinder) => PromiseLike<boolean>): Expectation<any, ElementFinder>;
|
|
9
|
-
constructor(subject: string, fn: (actual: ElementFinder) => PromiseLike<boolean>);
|
|
10
|
-
answeredBy(actor: AnswersQuestions): (actual: ElementFinder) => Promise<ExpectationOutcome<boolean, ElementFinder>>;
|
|
11
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ElementFinderExpectation = void 0;
|
|
4
|
-
const core_1 = require("@serenity-js/core");
|
|
5
|
-
const promiseOf_1 = require("../promiseOf");
|
|
6
|
-
/**
|
|
7
|
-
* @access private
|
|
8
|
-
*/
|
|
9
|
-
class ElementFinderExpectation extends core_1.Expectation {
|
|
10
|
-
constructor(subject, fn) {
|
|
11
|
-
super(subject);
|
|
12
|
-
this.fn = fn;
|
|
13
|
-
}
|
|
14
|
-
static forElementTo(message, fn) {
|
|
15
|
-
return new ElementFinderExpectation(message, fn);
|
|
16
|
-
}
|
|
17
|
-
answeredBy(actor) {
|
|
18
|
-
return (actual) => (0, promiseOf_1.promiseOf)(this.fn(actual)).then(_ => _
|
|
19
|
-
? new core_1.ExpectationMet(this.toString(), undefined, actual)
|
|
20
|
-
: new core_1.ExpectationNotMet(this.toString(), undefined, actual));
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.ElementFinderExpectation = ElementFinderExpectation;
|
|
24
|
-
//# sourceMappingURL=ElementFinderExpectation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ElementFinderExpectation.js","sourceRoot":"","sources":["../../src/expectations/ElementFinderExpectation.ts"],"names":[],"mappings":";;;AAAA,4CAAyH;AAGzH,4CAAyC;AAEzC;;GAEG;AACH,MAAa,wBAAyB,SAAQ,kBAA+B;IAKzE,YACI,OAAe,EACE,EAAmD;QAEpE,KAAK,CAAC,OAAO,CAAC,CAAC;QAFE,OAAE,GAAF,EAAE,CAAiD;IAGxE,CAAC;IATD,MAAM,CAAC,YAAY,CAAC,OAAe,EAAE,EAAmD;QACpF,OAAO,IAAI,wBAAwB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACrD,CAAC;IASD,UAAU,CAAC,KAAuB;QAE9B,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC7B,IAAA,qBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAClC,CAAC,CAAC,IAAI,qBAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC;YACxD,CAAC,CAAC,IAAI,wBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,CAC9D,CAAC;IACV,CAAC;CACJ;AApBD,4DAoBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expectations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA2B;AAC3B,gDAA8B;AAC9B,8CAA4B;AAC5B,8CAA4B;AAC5B,+CAA6B;AAC7B,8CAA4B"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Expectation } from '@serenity-js/core';
|
|
2
|
-
import { ElementFinder } from 'protractor';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Expectation that the element is active.
|
|
6
|
-
*
|
|
7
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
8
|
-
*
|
|
9
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
10
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
11
|
-
* @see {@link Wait}
|
|
12
|
-
*/
|
|
13
|
-
export declare function isActive(): Expectation<boolean, ElementFinder>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isActive = void 0;
|
|
4
|
-
const ElementFinderExpectation_1 = require("./ElementFinderExpectation");
|
|
5
|
-
/**
|
|
6
|
-
* @desc
|
|
7
|
-
* Expectation that the element is active.
|
|
8
|
-
*
|
|
9
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
10
|
-
*
|
|
11
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
12
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
13
|
-
* @see {@link Wait}
|
|
14
|
-
*/
|
|
15
|
-
function isActive() {
|
|
16
|
-
return ElementFinderExpectation_1.ElementFinderExpectation.forElementTo('become active', (actual) => actual.getWebElement().then(element => element.getDriver().switchTo().activeElement().then((active) => actual.equals(active))));
|
|
17
|
-
}
|
|
18
|
-
exports.isActive = isActive;
|
|
19
|
-
//# sourceMappingURL=isActive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isActive.js","sourceRoot":"","sources":["../../src/expectations/isActive.ts"],"names":[],"mappings":";;;AAGA,yEAAsE;AAEtE;;;;;;;;;GASG;AACH,SAAgB,QAAQ;IACpB,OAAO,mDAAwB,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC,MAAqB,EAAE,EAAE,CACpF,MAAM,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAClC,OAAO,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC,MAAkB,EAAE,EAAE,CACvE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CACxB,CACJ,CACJ,CAAC;AACN,CAAC;AARD,4BAQC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Expectation } from '@serenity-js/core';
|
|
2
|
-
import { ElementFinder } from 'protractor';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Expectation that the element is visible and enabled, and therefore clickable
|
|
6
|
-
*
|
|
7
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
8
|
-
*
|
|
9
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
10
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
11
|
-
* @see {@link Wait}
|
|
12
|
-
*/
|
|
13
|
-
export declare function isClickable(): Expectation<any, ElementFinder>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isClickable = void 0;
|
|
4
|
-
const assertions_1 = require("@serenity-js/assertions");
|
|
5
|
-
const core_1 = require("@serenity-js/core");
|
|
6
|
-
const isEnabled_1 = require("./isEnabled");
|
|
7
|
-
const isVisible_1 = require("./isVisible");
|
|
8
|
-
/**
|
|
9
|
-
* @desc
|
|
10
|
-
* Expectation that the element is visible and enabled, and therefore clickable
|
|
11
|
-
*
|
|
12
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
13
|
-
*
|
|
14
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
15
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
16
|
-
* @see {@link Wait}
|
|
17
|
-
*/
|
|
18
|
-
function isClickable() {
|
|
19
|
-
return core_1.Expectation.to('become clickable').soThatActual((0, assertions_1.and)((0, isVisible_1.isVisible)(), (0, isEnabled_1.isEnabled)()));
|
|
20
|
-
}
|
|
21
|
-
exports.isClickable = isClickable;
|
|
22
|
-
//# sourceMappingURL=isClickable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isClickable.js","sourceRoot":"","sources":["../../src/expectations/isClickable.ts"],"names":[],"mappings":";;;AAAA,wDAA8C;AAC9C,4CAAgD;AAGhD,2CAAwC;AACxC,2CAAwC;AAExC;;;;;;;;;GASG;AACH,SAAgB,WAAW;IACvB,OAAO,kBAAW,CAAC,EAAE,CAAgB,kBAAkB,CAAC,CAAC,YAAY,CAAC,IAAA,gBAAG,EAAC,IAAA,qBAAS,GAAE,EAAE,IAAA,qBAAS,GAAE,CAAC,CAAC,CAAC;AACzG,CAAC;AAFD,kCAEC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Expectation } from '@serenity-js/core';
|
|
2
|
-
import { ElementFinder } from 'protractor';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Expectation that the element is enabled.
|
|
6
|
-
*
|
|
7
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
8
|
-
*
|
|
9
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
10
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
11
|
-
* @see {@link Wait}
|
|
12
|
-
*/
|
|
13
|
-
export declare function isEnabled(): Expectation<boolean, ElementFinder>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEnabled = void 0;
|
|
4
|
-
const ElementFinderExpectation_1 = require("./ElementFinderExpectation");
|
|
5
|
-
/**
|
|
6
|
-
* @desc
|
|
7
|
-
* Expectation that the element is enabled.
|
|
8
|
-
*
|
|
9
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
10
|
-
*
|
|
11
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
12
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
13
|
-
* @see {@link Wait}
|
|
14
|
-
*/
|
|
15
|
-
function isEnabled() {
|
|
16
|
-
return ElementFinderExpectation_1.ElementFinderExpectation.forElementTo('become enabled', actual => actual.isEnabled());
|
|
17
|
-
}
|
|
18
|
-
exports.isEnabled = isEnabled;
|
|
19
|
-
//# sourceMappingURL=isEnabled.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isEnabled.js","sourceRoot":"","sources":["../../src/expectations/isEnabled.ts"],"names":[],"mappings":";;;AAGA,yEAAsE;AAEtE;;;;;;;;;GASG;AACH,SAAgB,SAAS;IACrB,OAAO,mDAAwB,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;AACjG,CAAC;AAFD,8BAEC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Expectation } from '@serenity-js/core';
|
|
2
|
-
import { ElementFinder } from 'protractor';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Expectation that the element is present in the DOM of a page.
|
|
6
|
-
* Please note that this does not necessarily mean that the element is visible.
|
|
7
|
-
*
|
|
8
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
9
|
-
*
|
|
10
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
11
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
12
|
-
* @see {@link Wait}
|
|
13
|
-
*/
|
|
14
|
-
export declare function isPresent(): Expectation<boolean, ElementFinder>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPresent = void 0;
|
|
4
|
-
const ElementFinderExpectation_1 = require("./ElementFinderExpectation");
|
|
5
|
-
/**
|
|
6
|
-
* @desc
|
|
7
|
-
* Expectation that the element is present in the DOM of a page.
|
|
8
|
-
* Please note that this does not necessarily mean that the element is visible.
|
|
9
|
-
*
|
|
10
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
11
|
-
*
|
|
12
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
13
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
14
|
-
* @see {@link Wait}
|
|
15
|
-
*/
|
|
16
|
-
function isPresent() {
|
|
17
|
-
return ElementFinderExpectation_1.ElementFinderExpectation.forElementTo('become present', actual => actual.isPresent());
|
|
18
|
-
}
|
|
19
|
-
exports.isPresent = isPresent;
|
|
20
|
-
//# sourceMappingURL=isPresent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isPresent.js","sourceRoot":"","sources":["../../src/expectations/isPresent.ts"],"names":[],"mappings":";;;AAGA,yEAAsE;AAEtE;;;;;;;;;;GAUG;AACH,SAAgB,SAAS;IACrB,OAAO,mDAAwB,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;AACjG,CAAC;AAFD,8BAEC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Expectation } from '@serenity-js/core';
|
|
2
|
-
import { ElementFinder } from 'protractor';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Expectation that the element is present and selected
|
|
6
|
-
*
|
|
7
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
8
|
-
*
|
|
9
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
10
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
11
|
-
* @see {@link Wait}
|
|
12
|
-
*/
|
|
13
|
-
export declare function isSelected(): Expectation<any, ElementFinder>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSelected = void 0;
|
|
4
|
-
const assertions_1 = require("@serenity-js/assertions");
|
|
5
|
-
const core_1 = require("@serenity-js/core");
|
|
6
|
-
const ElementFinderExpectation_1 = require("./ElementFinderExpectation");
|
|
7
|
-
const isPresent_1 = require("./isPresent");
|
|
8
|
-
/**
|
|
9
|
-
* @desc
|
|
10
|
-
* Expectation that the element is present and selected
|
|
11
|
-
*
|
|
12
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
13
|
-
*
|
|
14
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
15
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
16
|
-
* @see {@link Wait}
|
|
17
|
-
*/
|
|
18
|
-
function isSelected() {
|
|
19
|
-
return core_1.Expectation.to('become selected').soThatActual((0, assertions_1.and)((0, isPresent_1.isPresent)(), ElementFinderExpectation_1.ElementFinderExpectation.forElementTo('become selected', actual => actual.isSelected())));
|
|
20
|
-
}
|
|
21
|
-
exports.isSelected = isSelected;
|
|
22
|
-
//# sourceMappingURL=isSelected.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isSelected.js","sourceRoot":"","sources":["../../src/expectations/isSelected.ts"],"names":[],"mappings":";;;AAAA,wDAA8C;AAC9C,4CAAgD;AAGhD,yEAAsE;AACtE,2CAAwC;AAExC;;;;;;;;;GASG;AACH,SAAgB,UAAU;IACtB,OAAO,kBAAW,CAAC,EAAE,CAAgB,iBAAiB,CAAC,CAAC,YAAY,CAAC,IAAA,gBAAG,EACpE,IAAA,qBAAS,GAAE,EACX,mDAAwB,CAAC,YAAY,CAAC,iBAAiB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAC1F,CAAC,CAAC;AACP,CAAC;AALD,gCAKC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Expectation } from '@serenity-js/core';
|
|
2
|
-
import { ElementFinder } from 'protractor';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Expectation that the element is present in the DOM of the page and visible.
|
|
6
|
-
*
|
|
7
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
8
|
-
*
|
|
9
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
10
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
11
|
-
* @see {@link Wait}
|
|
12
|
-
*/
|
|
13
|
-
export declare function isVisible(): Expectation<any, ElementFinder>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isVisible = void 0;
|
|
4
|
-
const assertions_1 = require("@serenity-js/assertions");
|
|
5
|
-
const core_1 = require("@serenity-js/core");
|
|
6
|
-
const ElementFinderExpectation_1 = require("./ElementFinderExpectation");
|
|
7
|
-
const isPresent_1 = require("./isPresent");
|
|
8
|
-
/**
|
|
9
|
-
* @desc
|
|
10
|
-
* Expectation that the element is present in the DOM of the page and visible.
|
|
11
|
-
*
|
|
12
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, ElementFinder>}
|
|
13
|
-
*
|
|
14
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
15
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
16
|
-
* @see {@link Wait}
|
|
17
|
-
*/
|
|
18
|
-
function isVisible() {
|
|
19
|
-
return core_1.Expectation.to('become visible').soThatActual((0, assertions_1.and)((0, isPresent_1.isPresent)(), isDisplayed()));
|
|
20
|
-
}
|
|
21
|
-
exports.isVisible = isVisible;
|
|
22
|
-
function isDisplayed() {
|
|
23
|
-
return ElementFinderExpectation_1.ElementFinderExpectation.forElementTo('become displayed', actual => actual.isDisplayed());
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=isVisible.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isVisible.js","sourceRoot":"","sources":["../../src/expectations/isVisible.ts"],"names":[],"mappings":";;;AAAA,wDAA8C;AAC9C,4CAAgD;AAGhD,yEAAsE;AACtE,2CAAwC;AAExC;;;;;;;;;GASG;AACH,SAAgB,SAAS;IACrB,OAAO,kBAAW,CAAC,EAAE,CAAgB,gBAAgB,CAAC,CAAC,YAAY,CAAC,IAAA,gBAAG,EACnE,IAAA,qBAAS,GAAE,EACX,WAAW,EAAE,CAChB,CAAC,CAAC;AACP,CAAC;AALD,8BAKC;AAED,SAAS,WAAW;IAChB,OAAO,mDAAwB,CAAC,YAAY,CAAC,kBAAkB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;AACrG,CAAC"}
|
package/lib/promiseOf.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promiseOf.js","sourceRoot":"","sources":["../src/promiseOf.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACH,SAAgB,SAAS,CAAI,WAA2B;IACpD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACnC,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACP,CAAC;AAJD,8BAIC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BrowseTheWeb.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/BrowseTheWeb.ts"],"names":[],"mappings":";;;AAAA,4CAA2F;AAI3F,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAa,YAAY;IAmCrB;;;OAGG;IACH,YAAsB,OAA0B;QAA1B,YAAO,GAAP,OAAO,CAAmB;IAChD,CAAC;IA5BD;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,OAA0B;QACnC,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,CAAC,KAAoB;QAC1B,OAAO,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IACzC,CAAC;IASD;;;;;;;;;OASG;IACH,GAAG,CAAC,WAAmB,EAAE,eAAwB;QAC7C,OAAO,IAAA,qBAAS,EAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,eAAe,CAAC;aAC1D,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;aAC1C,IAAI,CAAC,MAAM,CAAC,EAAE;YACX,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC;QACvC,CAAC,CAAC,CACL,CAAC;IACN,CAAC;IAED;;;;;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O,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;aACjB,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;YACxB,IAAI,CAAE,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC,EAAE;gBAC7C,MAAM,IAAI,yBAAkB,CAAC,qBAAsB,IAAK,gBAAgB,CAAC,CAAC;aAC7E;YAED,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACJ;AA1jBD,oCA0jBC;AAED;;GAEG;AACH,MAAM,0BAA0B;IAC5B,YAA4B,MAAW;QAAX,WAAM,GAAN,MAAM,CAAK;IAAG,CAAC;CAC9C"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { AnswersQuestions, Interaction, Question, UsesAbilities } from '@serenity-js/core';
|
|
2
|
-
import { AlertPromise } from 'selenium-webdriver';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to accept
|
|
6
|
-
* a {@link ModalDialog}.
|
|
7
|
-
*
|
|
8
|
-
* @example <caption>Example widget</caption>
|
|
9
|
-
* <button
|
|
10
|
-
* data-test="trigger"
|
|
11
|
-
* onclick="alert('hello!')">Trigger Alert</button>
|
|
12
|
-
*
|
|
13
|
-
* @example <caption>Lean Page Object</caption>
|
|
14
|
-
* import { Target } from '@serenity-js/protractor';
|
|
15
|
-
* import { by } from 'protractor';
|
|
16
|
-
*
|
|
17
|
-
* class Widget {
|
|
18
|
-
* static trigger = Target.the('trigger button')
|
|
19
|
-
* .located(by.css('[data-test="trigger"]'));
|
|
20
|
-
* }
|
|
21
|
-
*
|
|
22
|
-
* @example <caption>Accepting a modal dialog window</caption>
|
|
23
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
24
|
-
* import { Accept, BrowseTheWeb, Click, ModalDialog } from '@serenity-js/protractor';
|
|
25
|
-
* import { protractor } from 'protractor';
|
|
26
|
-
*
|
|
27
|
-
* actorCalled('Nick')
|
|
28
|
-
* .whoCan(BrowseTheWeb.using(protractor.browser))
|
|
29
|
-
* .attemptsTo(
|
|
30
|
-
* Click.on(Widget.trigger),
|
|
31
|
-
* Accept.the(ModalDialog.window()),
|
|
32
|
-
* );
|
|
33
|
-
*
|
|
34
|
-
* @extends {@serenity-js/core/lib/screenplay~Interaction}
|
|
35
|
-
*
|
|
36
|
-
* @see {@link BrowseTheWeb}
|
|
37
|
-
* @see {@link Click}
|
|
38
|
-
* @see {@link Dismiss}
|
|
39
|
-
* @see {@link ModalDialog}
|
|
40
|
-
*/
|
|
41
|
-
export declare class Accept extends Interaction {
|
|
42
|
-
private readonly modalDialogWindow;
|
|
43
|
-
/**
|
|
44
|
-
* @desc
|
|
45
|
-
* Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
46
|
-
* with a {@link ModalDialog.window} the {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
47
|
-
* will accept.
|
|
48
|
-
*
|
|
49
|
-
* @param {@serenity-js/core/lib/screenplay~Question<AlertPromise> | AlertPromise} modalDialogWindow
|
|
50
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
51
|
-
*
|
|
52
|
-
* @see {@link @serenity-js/core/lib/screenplay~Question}
|
|
53
|
-
*/
|
|
54
|
-
static the(modalDialogWindow: Question<AlertPromise> | AlertPromise): Interaction;
|
|
55
|
-
/**
|
|
56
|
-
* @param {@serenity-js/core/lib/screenplay~Question<AlertPromise> | AlertPromise} modalDialogWindow
|
|
57
|
-
*/
|
|
58
|
-
constructor(modalDialogWindow: Question<AlertPromise> | AlertPromise);
|
|
59
|
-
/**
|
|
60
|
-
* @desc
|
|
61
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
62
|
-
* perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
63
|
-
*
|
|
64
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
65
|
-
* An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
66
|
-
*
|
|
67
|
-
* @returns {PromiseLike<void>}
|
|
68
|
-
*
|
|
69
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
70
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
71
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
72
|
-
*/
|
|
73
|
-
performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void>;
|
|
74
|
-
/**
|
|
75
|
-
* @desc
|
|
76
|
-
* Generates a description to be used when reporting this {@link @serenity-js/core/lib/screenplay~Activity}.
|
|
77
|
-
*
|
|
78
|
-
* @returns {string}
|
|
79
|
-
*/
|
|
80
|
-
toString(): string;
|
|
81
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Accept = void 0;
|
|
4
|
-
const core_1 = require("@serenity-js/core");
|
|
5
|
-
const io_1 = require("@serenity-js/core/lib/io");
|
|
6
|
-
/**
|
|
7
|
-
* @desc
|
|
8
|
-
* Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to accept
|
|
9
|
-
* a {@link ModalDialog}.
|
|
10
|
-
*
|
|
11
|
-
* @example <caption>Example widget</caption>
|
|
12
|
-
* <button
|
|
13
|
-
* data-test="trigger"
|
|
14
|
-
* onclick="alert('hello!')">Trigger Alert</button>
|
|
15
|
-
*
|
|
16
|
-
* @example <caption>Lean Page Object</caption>
|
|
17
|
-
* import { Target } from '@serenity-js/protractor';
|
|
18
|
-
* import { by } from 'protractor';
|
|
19
|
-
*
|
|
20
|
-
* class Widget {
|
|
21
|
-
* static trigger = Target.the('trigger button')
|
|
22
|
-
* .located(by.css('[data-test="trigger"]'));
|
|
23
|
-
* }
|
|
24
|
-
*
|
|
25
|
-
* @example <caption>Accepting a modal dialog window</caption>
|
|
26
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
27
|
-
* import { Accept, BrowseTheWeb, Click, ModalDialog } from '@serenity-js/protractor';
|
|
28
|
-
* import { protractor } from 'protractor';
|
|
29
|
-
*
|
|
30
|
-
* actorCalled('Nick')
|
|
31
|
-
* .whoCan(BrowseTheWeb.using(protractor.browser))
|
|
32
|
-
* .attemptsTo(
|
|
33
|
-
* Click.on(Widget.trigger),
|
|
34
|
-
* Accept.the(ModalDialog.window()),
|
|
35
|
-
* );
|
|
36
|
-
*
|
|
37
|
-
* @extends {@serenity-js/core/lib/screenplay~Interaction}
|
|
38
|
-
*
|
|
39
|
-
* @see {@link BrowseTheWeb}
|
|
40
|
-
* @see {@link Click}
|
|
41
|
-
* @see {@link Dismiss}
|
|
42
|
-
* @see {@link ModalDialog}
|
|
43
|
-
*/
|
|
44
|
-
class Accept extends core_1.Interaction {
|
|
45
|
-
/**
|
|
46
|
-
* @param {@serenity-js/core/lib/screenplay~Question<AlertPromise> | AlertPromise} modalDialogWindow
|
|
47
|
-
*/
|
|
48
|
-
constructor(modalDialogWindow) {
|
|
49
|
-
super();
|
|
50
|
-
this.modalDialogWindow = modalDialogWindow;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @desc
|
|
54
|
-
* Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
55
|
-
* with a {@link ModalDialog.window} the {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
56
|
-
* will accept.
|
|
57
|
-
*
|
|
58
|
-
* @param {@serenity-js/core/lib/screenplay~Question<AlertPromise> | AlertPromise} modalDialogWindow
|
|
59
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
60
|
-
*
|
|
61
|
-
* @see {@link @serenity-js/core/lib/screenplay~Question}
|
|
62
|
-
*/
|
|
63
|
-
static the(modalDialogWindow) {
|
|
64
|
-
return new Accept(modalDialogWindow);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* @desc
|
|
68
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
69
|
-
* perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
70
|
-
*
|
|
71
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
72
|
-
* An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
73
|
-
*
|
|
74
|
-
* @returns {PromiseLike<void>}
|
|
75
|
-
*
|
|
76
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
77
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
78
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
79
|
-
*/
|
|
80
|
-
performAs(actor) {
|
|
81
|
-
return actor.answer(this.modalDialogWindow)
|
|
82
|
-
.then(alert => alert.accept());
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* @desc
|
|
86
|
-
* Generates a description to be used when reporting this {@link @serenity-js/core/lib/screenplay~Activity}.
|
|
87
|
-
*
|
|
88
|
-
* @returns {string}
|
|
89
|
-
*/
|
|
90
|
-
toString() {
|
|
91
|
-
return (0, io_1.formatted) `#actor accepts ${this.modalDialogWindow}`;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
exports.Accept = Accept;
|
|
95
|
-
//# sourceMappingURL=Accept.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Accept.js","sourceRoot":"","sources":["../../../src/screenplay/interactions/Accept.ts"],"names":[],"mappings":";;;AAAA,4CAA2F;AAC3F,iDAAqD;AAGrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAa,MAAO,SAAQ,kBAAW;IAiBnC;;OAEG;IACH,YAA6B,iBAAwD;QACjF,KAAK,EAAE,CAAC;QADiB,sBAAiB,GAAjB,iBAAiB,CAAuC;IAErF,CAAC;IApBD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,GAAG,CAAC,iBAAwD;QAC/D,OAAO,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACzC,CAAC;IASD;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,KAAuC;QAC7C,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC;aACtC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACvC,CAAC;IAED;;;;;OAKG;IACH,QAAQ;QACJ,OAAO,IAAA,cAAS,EAAC,kBAAmB,IAAI,CAAC,iBAAkB,EAAE,CAAC;IAClE,CAAC;CACJ;AApDD,wBAoDC"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { AnswersQuestions, 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
|
-
* clear the `value` of a [form `input`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input).
|
|
7
|
-
*
|
|
8
|
-
* @example <caption>Example widget</caption>
|
|
9
|
-
* <form>
|
|
10
|
-
* <input type="text" name="example" id="example" />
|
|
11
|
-
* </form>
|
|
12
|
-
*
|
|
13
|
-
* @example <caption>Lean Page Object describing the widget</caption>
|
|
14
|
-
* import { Target } from '@serenity-js/protractor';
|
|
15
|
-
* import { by } from 'protractor';
|
|
16
|
-
*
|
|
17
|
-
* class Form {
|
|
18
|
-
* static exampleInput = Target.the('example input')
|
|
19
|
-
* .located(by.id('example'));
|
|
20
|
-
* }
|
|
21
|
-
*
|
|
22
|
-
* @example <caption>Clearing the value of an input field</caption>
|
|
23
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
24
|
-
* import { BrowseTheWeb, Clear, Enter, Value } from '@serenity-js/protractor';
|
|
25
|
-
* import { Ensure, equals } from '@serenity-js/assertions';
|
|
26
|
-
* import { protractor } from 'protractor';
|
|
27
|
-
*
|
|
28
|
-
* actorCalled('Inés')
|
|
29
|
-
* .whoCan(BrowseTheWeb.using(protractor.browser))
|
|
30
|
-
* .attemptsTo(
|
|
31
|
-
* Enter.theValue('Hello world!').into(Form.exampleInput),
|
|
32
|
-
* Ensure.that(Value.of(Form.exampleInput), equals('Hello world!')),
|
|
33
|
-
*
|
|
34
|
-
* Clear.theValueOf(Form.exampleInput),
|
|
35
|
-
* Ensure.that(Value.of(Form.exampleInput), equals('')),
|
|
36
|
-
* );
|
|
37
|
-
*
|
|
38
|
-
* @see {@link BrowseTheWeb}
|
|
39
|
-
* @see {@link Enter}
|
|
40
|
-
* @see {@link Value}
|
|
41
|
-
* @see {@link Target}
|
|
42
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
43
|
-
* @see {@link @serenity-js/assertions/lib/expectations~equals}
|
|
44
|
-
*
|
|
45
|
-
* @extends {@serenity-js/core/lib/screenplay~Interaction}
|
|
46
|
-
*/
|
|
47
|
-
export declare class Clear extends Interaction {
|
|
48
|
-
private readonly field;
|
|
49
|
-
/**
|
|
50
|
-
* @desc
|
|
51
|
-
* Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
52
|
-
*
|
|
53
|
-
* @param {Question<ElementFinder> | ElementFinder} field
|
|
54
|
-
* The field to be cleared
|
|
55
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
56
|
-
*/
|
|
57
|
-
static theValueOf(field: Question<ElementFinder> | ElementFinder): Interaction;
|
|
58
|
-
/**
|
|
59
|
-
* @param {Question<ElementFinder> | ElementFinder} field
|
|
60
|
-
* The field to be cleared
|
|
61
|
-
*/
|
|
62
|
-
constructor(field: Question<ElementFinder> | ElementFinder);
|
|
63
|
-
/**
|
|
64
|
-
* @desc
|
|
65
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
66
|
-
* perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
67
|
-
*
|
|
68
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
69
|
-
* An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
70
|
-
*
|
|
71
|
-
* @returns {PromiseLike<void>}
|
|
72
|
-
*
|
|
73
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
74
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
75
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
76
|
-
*/
|
|
77
|
-
performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void>;
|
|
78
|
-
/**
|
|
79
|
-
* @desc
|
|
80
|
-
* Generates a description to be used when reporting this {@link @serenity-js/core/lib/screenplay~Activity}.
|
|
81
|
-
*
|
|
82
|
-
* @returns {string}
|
|
83
|
-
*/
|
|
84
|
-
toString(): string;
|
|
85
|
-
private capitaliseFirstLetter;
|
|
86
|
-
private removeCharactersFrom;
|
|
87
|
-
private times;
|
|
88
|
-
}
|