@serenity-js/webdriverio 2.33.1 → 3.0.0-rc.11
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 +455 -0
- package/lib/adapter/WebdriverIOFrameworkAdapter.js +1 -1
- package/lib/adapter/WebdriverIOFrameworkAdapter.js.map +1 -1
- package/lib/adapter/WebdriverIONotifier.d.ts +35 -1
- package/lib/adapter/WebdriverIONotifier.js +174 -13
- package/lib/adapter/WebdriverIONotifier.js.map +1 -1
- package/lib/index.d.ts +0 -3
- package/lib/index.js +0 -3
- package/lib/index.js.map +1 -1
- package/lib/screenplay/abilities/{BrowseTheWeb.d.ts → BrowseTheWebWithWebdriverIO.d.ts} +42 -27
- package/lib/screenplay/abilities/{BrowseTheWeb.js → BrowseTheWebWithWebdriverIO.js} +104 -32
- package/lib/screenplay/abilities/BrowseTheWebWithWebdriverIO.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 -2
- package/lib/screenplay/index.js +1 -2
- package/lib/screenplay/index.js.map +1 -1
- package/lib/screenplay/models/WebdriverIOCookie.d.ts +8 -0
- package/lib/screenplay/models/WebdriverIOCookie.js +39 -0
- package/lib/screenplay/models/WebdriverIOCookie.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOFrame.d.ts +10 -0
- package/lib/screenplay/models/WebdriverIOFrame.js +34 -0
- package/lib/screenplay/models/WebdriverIOFrame.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOModalDialog.d.ts +11 -0
- package/lib/screenplay/models/WebdriverIOModalDialog.js +40 -0
- package/lib/screenplay/models/WebdriverIOModalDialog.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOPage.d.ts +26 -0
- package/lib/screenplay/models/WebdriverIOPage.js +104 -0
- package/lib/screenplay/models/WebdriverIOPage.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOPageElement.d.ts +31 -0
- package/lib/screenplay/models/WebdriverIOPageElement.js +185 -0
- package/lib/screenplay/models/WebdriverIOPageElement.js.map +1 -0
- package/lib/screenplay/models/index.d.ts +5 -0
- package/lib/{stage/crew/photographer/strategies → screenplay/models}/index.js +5 -4
- package/lib/screenplay/models/index.js.map +1 -0
- package/lib/screenplay/models/locators/WebdriverIOLocator.d.ts +9 -0
- package/lib/screenplay/models/locators/WebdriverIOLocator.js +22 -0
- package/lib/screenplay/models/locators/WebdriverIOLocator.js.map +1 -0
- package/lib/screenplay/models/locators/WebdriverIONativeElementRoot.d.ts +2 -0
- package/lib/screenplay/{interactions/EnterBuilder.js → models/locators/WebdriverIONativeElementRoot.js} +1 -1
- package/lib/screenplay/models/locators/WebdriverIONativeElementRoot.js.map +1 -0
- package/lib/screenplay/models/locators/index.d.ts +2 -0
- package/lib/{stage/crew/photographer → screenplay/models/locators}/index.js +2 -2
- package/lib/screenplay/models/locators/index.js.map +1 -0
- package/package.json +14 -24
- package/src/adapter/WebdriverIOFrameworkAdapter.ts +2 -0
- package/src/adapter/WebdriverIONotifier.ts +225 -23
- package/src/index.ts +0 -3
- package/src/screenplay/abilities/{BrowseTheWeb.ts → BrowseTheWebWithWebdriverIO.ts} +125 -35
- package/src/screenplay/abilities/index.ts +1 -1
- package/src/screenplay/index.ts +1 -2
- package/src/screenplay/models/WebdriverIOCookie.ts +44 -0
- package/src/screenplay/models/WebdriverIOFrame.ts +38 -0
- package/src/screenplay/models/WebdriverIOModalDialog.ts +45 -0
- package/src/screenplay/models/WebdriverIOPage.ts +128 -0
- package/src/screenplay/models/WebdriverIOPageElement.ts +227 -0
- package/src/screenplay/models/index.ts +5 -0
- package/src/screenplay/models/locators/WebdriverIOLocator.ts +43 -0
- package/src/screenplay/models/locators/WebdriverIONativeElementRoot.ts +3 -0
- package/src/screenplay/models/locators/index.ts +2 -0
- package/lib/expectations/ElementExpectation.d.ts +0 -11
- package/lib/expectations/ElementExpectation.js +0 -27
- package/lib/expectations/ElementExpectation.js.map +0 -1
- package/lib/expectations/index.d.ts +0 -6
- package/lib/expectations/index.js +0 -19
- package/lib/expectations/index.js.map +0 -1
- package/lib/expectations/isActive.d.ts +0 -15
- package/lib/expectations/isActive.js +0 -21
- package/lib/expectations/isActive.js.map +0 -1
- package/lib/expectations/isClickable.d.ts +0 -20
- package/lib/expectations/isClickable.js +0 -26
- package/lib/expectations/isClickable.js.map +0 -1
- package/lib/expectations/isEnabled.d.ts +0 -14
- package/lib/expectations/isEnabled.js +0 -20
- package/lib/expectations/isEnabled.js.map +0 -1
- package/lib/expectations/isPresent.d.ts +0 -15
- package/lib/expectations/isPresent.js +0 -21
- package/lib/expectations/isPresent.js.map +0 -1
- package/lib/expectations/isSelected.d.ts +0 -14
- package/lib/expectations/isSelected.js +0 -20
- package/lib/expectations/isSelected.js.map +0 -1
- package/lib/expectations/isVisible.d.ts +0 -14
- package/lib/expectations/isVisible.js +0 -20
- package/lib/expectations/isVisible.js.map +0 -1
- package/lib/input/Key.d.ts +0 -73
- package/lib/input/Key.js +0 -84
- package/lib/input/Key.js.map +0 -1
- package/lib/input/index.d.ts +0 -1
- package/lib/input/index.js +0 -14
- package/lib/input/index.js.map +0 -1
- package/lib/screenplay/abilities/BrowseTheWeb.js.map +0 -1
- package/lib/screenplay/interactions/Clear.d.ts +0 -79
- package/lib/screenplay/interactions/Clear.js +0 -97
- package/lib/screenplay/interactions/Clear.js.map +0 -1
- package/lib/screenplay/interactions/Click.d.ts +0 -73
- package/lib/screenplay/interactions/Click.js +0 -84
- package/lib/screenplay/interactions/Click.js.map +0 -1
- package/lib/screenplay/interactions/DoubleClick.d.ts +0 -90
- package/lib/screenplay/interactions/DoubleClick.js +0 -101
- package/lib/screenplay/interactions/DoubleClick.js.map +0 -1
- package/lib/screenplay/interactions/Enter.d.ts +0 -73
- package/lib/screenplay/interactions/Enter.js +0 -87
- package/lib/screenplay/interactions/Enter.js.map +0 -1
- package/lib/screenplay/interactions/EnterBuilder.d.ts +0 -25
- package/lib/screenplay/interactions/EnterBuilder.js.map +0 -1
- package/lib/screenplay/interactions/ExecuteScript.d.ts +0 -206
- package/lib/screenplay/interactions/ExecuteScript.js +0 -311
- package/lib/screenplay/interactions/ExecuteScript.js.map +0 -1
- package/lib/screenplay/interactions/Hover.d.ts +0 -78
- package/lib/screenplay/interactions/Hover.js +0 -89
- package/lib/screenplay/interactions/Hover.js.map +0 -1
- package/lib/screenplay/interactions/Navigate.d.ts +0 -141
- package/lib/screenplay/interactions/Navigate.js +0 -197
- package/lib/screenplay/interactions/Navigate.js.map +0 -1
- package/lib/screenplay/interactions/Press.d.ts +0 -84
- package/lib/screenplay/interactions/Press.js +0 -152
- package/lib/screenplay/interactions/Press.js.map +0 -1
- package/lib/screenplay/interactions/PressBuilder.d.ts +0 -26
- package/lib/screenplay/interactions/PressBuilder.js +0 -3
- package/lib/screenplay/interactions/PressBuilder.js.map +0 -1
- package/lib/screenplay/interactions/RightClick.d.ts +0 -89
- package/lib/screenplay/interactions/RightClick.js +0 -100
- package/lib/screenplay/interactions/RightClick.js.map +0 -1
- package/lib/screenplay/interactions/Scroll.d.ts +0 -75
- package/lib/screenplay/interactions/Scroll.js +0 -86
- package/lib/screenplay/interactions/Scroll.js.map +0 -1
- package/lib/screenplay/interactions/Wait.d.ts +0 -143
- 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 -32
- package/lib/screenplay/interactions/WaitBuilder.js +0 -3
- package/lib/screenplay/interactions/WaitBuilder.js.map +0 -1
- package/lib/screenplay/interactions/WebElementInteraction.d.ts +0 -37
- package/lib/screenplay/interactions/WebElementInteraction.js +0 -52
- package/lib/screenplay/interactions/WebElementInteraction.js.map +0 -1
- package/lib/screenplay/interactions/index.d.ts +0 -13
- package/lib/screenplay/interactions/index.js +0 -26
- package/lib/screenplay/interactions/index.js.map +0 -1
- package/lib/screenplay/questions/Attribute.d.ts +0 -82
- package/lib/screenplay/questions/Attribute.js +0 -102
- package/lib/screenplay/questions/Attribute.js.map +0 -1
- package/lib/screenplay/questions/CSSClasses.d.ts +0 -92
- package/lib/screenplay/questions/CSSClasses.js +0 -112
- package/lib/screenplay/questions/CSSClasses.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/NestedTargetBuilder.d.ts +0 -27
- package/lib/screenplay/questions/NestedTargetBuilder.js +0 -3
- package/lib/screenplay/questions/NestedTargetBuilder.js.map +0 -1
- package/lib/screenplay/questions/TargetBuilder.d.ts +0 -25
- package/lib/screenplay/questions/TargetBuilder.js +0 -3
- package/lib/screenplay/questions/TargetBuilder.js.map +0 -1
- package/lib/screenplay/questions/Text.d.ts +0 -95
- package/lib/screenplay/questions/Text.js +0 -130
- package/lib/screenplay/questions/Text.js.map +0 -1
- package/lib/screenplay/questions/Value.d.ts +0 -63
- package/lib/screenplay/questions/Value.js +0 -78
- package/lib/screenplay/questions/Value.js.map +0 -1
- package/lib/screenplay/questions/Website.d.ts +0 -21
- package/lib/screenplay/questions/Website.js +0 -31
- package/lib/screenplay/questions/Website.js.map +0 -1
- package/lib/screenplay/questions/index.d.ts +0 -10
- package/lib/screenplay/questions/index.js +0 -23
- package/lib/screenplay/questions/index.js.map +0 -1
- package/lib/screenplay/questions/lists.d.ts +0 -86
- package/lib/screenplay/questions/lists.js +0 -137
- package/lib/screenplay/questions/lists.js.map +0 -1
- package/lib/screenplay/questions/locators.d.ts +0 -196
- package/lib/screenplay/questions/locators.js +0 -219
- package/lib/screenplay/questions/locators.js.map +0 -1
- package/lib/screenplay/questions/targets.d.ts +0 -254
- package/lib/screenplay/questions/targets.js +0 -334
- package/lib/screenplay/questions/targets.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.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.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/ElementExpectation.ts +0 -31
- package/src/expectations/index.ts +0 -6
- package/src/expectations/isActive.ts +0 -21
- package/src/expectations/isClickable.ts +0 -26
- package/src/expectations/isEnabled.ts +0 -19
- package/src/expectations/isPresent.ts +0 -20
- package/src/expectations/isSelected.ts +0 -19
- package/src/expectations/isVisible.ts +0 -19
- package/src/input/Key.ts +0 -83
- package/src/input/index.ts +0 -1
- package/src/screenplay/interactions/Clear.ts +0 -102
- package/src/screenplay/interactions/Click.ts +0 -85
- package/src/screenplay/interactions/DoubleClick.ts +0 -102
- package/src/screenplay/interactions/Enter.ts +0 -93
- package/src/screenplay/interactions/EnterBuilder.ts +0 -27
- package/src/screenplay/interactions/ExecuteScript.ts +0 -344
- package/src/screenplay/interactions/Hover.ts +0 -90
- package/src/screenplay/interactions/Navigate.ts +0 -208
- package/src/screenplay/interactions/Press.ts +0 -172
- package/src/screenplay/interactions/PressBuilder.ts +0 -28
- package/src/screenplay/interactions/RightClick.ts +0 -100
- package/src/screenplay/interactions/Scroll.ts +0 -87
- package/src/screenplay/interactions/Wait.ts +0 -267
- package/src/screenplay/interactions/WaitBuilder.ts +0 -34
- package/src/screenplay/interactions/WebElementInteraction.ts +0 -56
- package/src/screenplay/interactions/index.ts +0 -13
- package/src/screenplay/questions/Attribute.ts +0 -112
- package/src/screenplay/questions/CSSClasses.ts +0 -116
- package/src/screenplay/questions/LastScriptExecution.ts +0 -21
- package/src/screenplay/questions/NestedTargetBuilder.ts +0 -30
- package/src/screenplay/questions/TargetBuilder.ts +0 -27
- package/src/screenplay/questions/Text.ts +0 -140
- package/src/screenplay/questions/Value.ts +0 -82
- package/src/screenplay/questions/Website.ts +0 -34
- package/src/screenplay/questions/index.ts +0 -10
- package/src/screenplay/questions/lists.ts +0 -161
- package/src/screenplay/questions/locators.ts +0 -254
- package/src/screenplay/questions/targets.ts +0 -401
- 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 -103
- 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,14 +0,0 @@
|
|
|
1
|
-
import { Expectation } from '@serenity-js/core';
|
|
2
|
-
import { Element } from 'webdriverio';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Expectation that the element is enabled.
|
|
6
|
-
*
|
|
7
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
|
|
8
|
-
*
|
|
9
|
-
* @see https://webdriver.io/docs/api/element/isEnabled/
|
|
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 isEnabled(): Expectation<boolean, Element<'async'>>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEnabled = void 0;
|
|
4
|
-
const ElementExpectation_1 = require("./ElementExpectation");
|
|
5
|
-
/**
|
|
6
|
-
* @desc
|
|
7
|
-
* Expectation that the element is enabled.
|
|
8
|
-
*
|
|
9
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
|
|
10
|
-
*
|
|
11
|
-
* @see https://webdriver.io/docs/api/element/isEnabled/
|
|
12
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
13
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
14
|
-
* @see {@link Wait}
|
|
15
|
-
*/
|
|
16
|
-
function isEnabled() {
|
|
17
|
-
return ElementExpectation_1.ElementExpectation.forElementTo('become enabled', actual => actual.isEnabled());
|
|
18
|
-
}
|
|
19
|
-
exports.isEnabled = isEnabled;
|
|
20
|
-
//# sourceMappingURL=isEnabled.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isEnabled.js","sourceRoot":"","sources":["../../src/expectations/isEnabled.ts"],"names":[],"mappings":";;;AAGA,6DAA0D;AAE1D;;;;;;;;;;GAUG;AACH,SAAgB,SAAS;IACrB,OAAO,uCAAkB,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;AAC3F,CAAC;AAFD,8BAEC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Expectation } from '@serenity-js/core';
|
|
2
|
-
import { Element } from 'webdriverio';
|
|
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, Element<'async'>>}
|
|
9
|
-
*
|
|
10
|
-
* @see https://webdriver.io/docs/api/element/isExisting/
|
|
11
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
12
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
13
|
-
* @see {@link Wait}
|
|
14
|
-
*/
|
|
15
|
-
export declare function isPresent(): Expectation<boolean, Element<'async'>>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPresent = void 0;
|
|
4
|
-
const ElementExpectation_1 = require("./ElementExpectation");
|
|
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, Element<'async'>>}
|
|
11
|
-
*
|
|
12
|
-
* @see https://webdriver.io/docs/api/element/isExisting/
|
|
13
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
14
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
15
|
-
* @see {@link Wait}
|
|
16
|
-
*/
|
|
17
|
-
function isPresent() {
|
|
18
|
-
return ElementExpectation_1.ElementExpectation.forElementTo('become present', actual => actual.isExisting());
|
|
19
|
-
}
|
|
20
|
-
exports.isPresent = isPresent;
|
|
21
|
-
//# sourceMappingURL=isPresent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isPresent.js","sourceRoot":"","sources":["../../src/expectations/isPresent.ts"],"names":[],"mappings":";;;AAGA,6DAA0D;AAE1D;;;;;;;;;;;GAWG;AACH,SAAgB,SAAS;IACrB,OAAO,uCAAkB,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;AAC5F,CAAC;AAFD,8BAEC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Expectation } from '@serenity-js/core';
|
|
2
|
-
import { Element } from 'webdriverio';
|
|
3
|
-
/**
|
|
4
|
-
* @desc
|
|
5
|
-
* Expectation that an `<option>` or `<input>` element of type checkbox or radio is currently selected.
|
|
6
|
-
*
|
|
7
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
|
|
8
|
-
*
|
|
9
|
-
* @see https://webdriver.io/docs/api/element/isSelected/
|
|
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 isSelected(): Expectation<boolean, Element<'async'>>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSelected = void 0;
|
|
4
|
-
const ElementExpectation_1 = require("./ElementExpectation");
|
|
5
|
-
/**
|
|
6
|
-
* @desc
|
|
7
|
-
* Expectation that an `<option>` or `<input>` element of type checkbox or radio is currently selected.
|
|
8
|
-
*
|
|
9
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
|
|
10
|
-
*
|
|
11
|
-
* @see https://webdriver.io/docs/api/element/isSelected/
|
|
12
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
13
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
14
|
-
* @see {@link Wait}
|
|
15
|
-
*/
|
|
16
|
-
function isSelected() {
|
|
17
|
-
return ElementExpectation_1.ElementExpectation.forElementTo('become selected', actual => actual.isSelected());
|
|
18
|
-
}
|
|
19
|
-
exports.isSelected = isSelected;
|
|
20
|
-
//# sourceMappingURL=isSelected.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isSelected.js","sourceRoot":"","sources":["../../src/expectations/isSelected.ts"],"names":[],"mappings":";;;AAGA,6DAA0D;AAE1D;;;;;;;;;;GAUG;AACH,SAAgB,UAAU;IACtB,OAAO,uCAAkB,CAAC,YAAY,CAAC,iBAAiB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;AAC7F,CAAC;AAFD,gCAEC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Expectation } from '@serenity-js/core';
|
|
2
|
-
import { Element } from 'webdriverio';
|
|
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, Element<'async'>>}
|
|
8
|
-
*
|
|
9
|
-
* @see https://webdriver.io/docs/api/element/isDisplayed/
|
|
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 isVisible(): Expectation<boolean, Element<'async'>>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isVisible = void 0;
|
|
4
|
-
const ElementExpectation_1 = require("./ElementExpectation");
|
|
5
|
-
/**
|
|
6
|
-
* @desc
|
|
7
|
-
* Expectation that the element is present in the DOM of the page and visible.
|
|
8
|
-
*
|
|
9
|
-
* @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
|
|
10
|
-
*
|
|
11
|
-
* @see https://webdriver.io/docs/api/element/isDisplayed/
|
|
12
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
13
|
-
* @see {@link @serenity-js/core/lib/screenplay/questions~Check}
|
|
14
|
-
* @see {@link Wait}
|
|
15
|
-
*/
|
|
16
|
-
function isVisible() {
|
|
17
|
-
return ElementExpectation_1.ElementExpectation.forElementTo('become visible', actual => actual.isDisplayed());
|
|
18
|
-
}
|
|
19
|
-
exports.isVisible = isVisible;
|
|
20
|
-
//# sourceMappingURL=isVisible.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isVisible.js","sourceRoot":"","sources":["../../src/expectations/isVisible.ts"],"names":[],"mappings":";;;AAGA,6DAA0D;AAE1D;;;;;;;;;;GAUG;AACH,SAAgB,SAAS;IACrB,OAAO,uCAAkB,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;AAC7F,CAAC;AAFD,8BAEC"}
|
package/lib/input/Key.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @desc
|
|
3
|
-
* Represents pressable keys that aren't text to be used with {@link Press}.
|
|
4
|
-
*
|
|
5
|
-
* Note that modifier like Shift, Alt and Meta (a.k.a. Command on Mac) will stay pressed
|
|
6
|
-
*
|
|
7
|
-
* @enum {string}
|
|
8
|
-
* @see {@link Press}
|
|
9
|
-
* @see https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions
|
|
10
|
-
* @see https://github.com/puppeteer/puppeteer/blob/v7.1.0/src/common/USKeyboardLayout.ts
|
|
11
|
-
* @see https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/node/selenium-webdriver/lib/input.js#L46
|
|
12
|
-
* @see https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-utils/src/constants.ts#L5
|
|
13
|
-
*/
|
|
14
|
-
export declare class Key {
|
|
15
|
-
readonly devtoolsName: string;
|
|
16
|
-
readonly utf16codePoint: string;
|
|
17
|
-
readonly isModifier: boolean;
|
|
18
|
-
static Alt: Key;
|
|
19
|
-
static ArrowDown: Key;
|
|
20
|
-
static ArrowLeft: Key;
|
|
21
|
-
static ArrowRight: Key;
|
|
22
|
-
static ArrowUp: Key;
|
|
23
|
-
static Backspace: Key;
|
|
24
|
-
static Cancel: Key;
|
|
25
|
-
static Clear: Key;
|
|
26
|
-
static Control: Key;
|
|
27
|
-
static Delete: Key;
|
|
28
|
-
static End: Key;
|
|
29
|
-
static Enter: Key;
|
|
30
|
-
static Escape: Key;
|
|
31
|
-
static F1: Key;
|
|
32
|
-
static F2: Key;
|
|
33
|
-
static F3: Key;
|
|
34
|
-
static F4: Key;
|
|
35
|
-
static F5: Key;
|
|
36
|
-
static F6: Key;
|
|
37
|
-
static F7: Key;
|
|
38
|
-
static F8: Key;
|
|
39
|
-
static F9: Key;
|
|
40
|
-
static F10: Key;
|
|
41
|
-
static F11: Key;
|
|
42
|
-
static F12: Key;
|
|
43
|
-
static Help: Key;
|
|
44
|
-
static Home: Key;
|
|
45
|
-
static Insert: Key;
|
|
46
|
-
static Meta: Key;
|
|
47
|
-
static Numpad0: Key;
|
|
48
|
-
static Numpad1: Key;
|
|
49
|
-
static Numpad2: Key;
|
|
50
|
-
static Numpad3: Key;
|
|
51
|
-
static Numpad4: Key;
|
|
52
|
-
static Numpad5: Key;
|
|
53
|
-
static Numpad6: Key;
|
|
54
|
-
static Numpad7: Key;
|
|
55
|
-
static Numpad8: Key;
|
|
56
|
-
static Numpad9: Key;
|
|
57
|
-
static NumpadAdd: Key;
|
|
58
|
-
static NumpadDecimal: Key;
|
|
59
|
-
static NumpadDivide: Key;
|
|
60
|
-
static NumpadEqual: Key;
|
|
61
|
-
static NumpadMultiply: Key;
|
|
62
|
-
static NumpadSubtract: Key;
|
|
63
|
-
static PageDown: Key;
|
|
64
|
-
static PageUp: Key;
|
|
65
|
-
static Pause: Key;
|
|
66
|
-
static Semicolon: Key;
|
|
67
|
-
static Shift: Key;
|
|
68
|
-
static Space: Key;
|
|
69
|
-
static Tab: Key;
|
|
70
|
-
static isKey(maybeKey: unknown): maybeKey is Key;
|
|
71
|
-
constructor(devtoolsName: string, utf16codePoint: string, isModifier?: boolean);
|
|
72
|
-
toString(): string;
|
|
73
|
-
}
|
package/lib/input/Key.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Key = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @desc
|
|
6
|
-
* Represents pressable keys that aren't text to be used with {@link Press}.
|
|
7
|
-
*
|
|
8
|
-
* Note that modifier like Shift, Alt and Meta (a.k.a. Command on Mac) will stay pressed
|
|
9
|
-
*
|
|
10
|
-
* @enum {string}
|
|
11
|
-
* @see {@link Press}
|
|
12
|
-
* @see https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions
|
|
13
|
-
* @see https://github.com/puppeteer/puppeteer/blob/v7.1.0/src/common/USKeyboardLayout.ts
|
|
14
|
-
* @see https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/node/selenium-webdriver/lib/input.js#L46
|
|
15
|
-
* @see https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-utils/src/constants.ts#L5
|
|
16
|
-
*/
|
|
17
|
-
class Key {
|
|
18
|
-
constructor(devtoolsName, utf16codePoint, isModifier = false) {
|
|
19
|
-
this.devtoolsName = devtoolsName;
|
|
20
|
-
this.utf16codePoint = utf16codePoint;
|
|
21
|
-
this.isModifier = isModifier;
|
|
22
|
-
}
|
|
23
|
-
static isKey(maybeKey) {
|
|
24
|
-
return !!maybeKey
|
|
25
|
-
&& maybeKey instanceof Key;
|
|
26
|
-
}
|
|
27
|
-
toString() {
|
|
28
|
-
return this.devtoolsName;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.Key = Key;
|
|
32
|
-
Key.Alt = new Key('Alt', '\uE00A', true);
|
|
33
|
-
Key.ArrowDown = new Key('ArrowDown', '\uE015');
|
|
34
|
-
Key.ArrowLeft = new Key('ArrowLeft', '\uE012');
|
|
35
|
-
Key.ArrowRight = new Key('ArrowRight', '\uE014');
|
|
36
|
-
Key.ArrowUp = new Key('ArrowUp', '\uE013');
|
|
37
|
-
Key.Backspace = new Key('Backspace', '\uE003');
|
|
38
|
-
Key.Cancel = new Key('Cancel', '\uE001');
|
|
39
|
-
Key.Clear = new Key('Clear', '\uE005');
|
|
40
|
-
Key.Control = new Key('Control', '\uE009', true);
|
|
41
|
-
Key.Delete = new Key('Delete', '\uE017');
|
|
42
|
-
Key.End = new Key('End', '\uE010');
|
|
43
|
-
Key.Enter = new Key('Enter', '\uE007');
|
|
44
|
-
Key.Escape = new Key('Escape', '\uE00C');
|
|
45
|
-
Key.F1 = new Key('F1', '\uE031');
|
|
46
|
-
Key.F2 = new Key('F2', '\uE032');
|
|
47
|
-
Key.F3 = new Key('F3', '\uE033');
|
|
48
|
-
Key.F4 = new Key('F4', '\uE034');
|
|
49
|
-
Key.F5 = new Key('F5', '\uE035');
|
|
50
|
-
Key.F6 = new Key('F6', '\uE036');
|
|
51
|
-
Key.F7 = new Key('F7', '\uE037');
|
|
52
|
-
Key.F8 = new Key('F8', '\uE038');
|
|
53
|
-
Key.F9 = new Key('F9', '\uE039');
|
|
54
|
-
Key.F10 = new Key('F10', '\uE03A');
|
|
55
|
-
Key.F11 = new Key('F11', '\uE03B');
|
|
56
|
-
Key.F12 = new Key('F12', '\uE03C');
|
|
57
|
-
Key.Help = new Key('Help', '\uE002');
|
|
58
|
-
Key.Home = new Key('Home', '\uE011');
|
|
59
|
-
Key.Insert = new Key('Insert', '\uE016');
|
|
60
|
-
Key.Meta = new Key('Meta', '\uE03D', true);
|
|
61
|
-
Key.Numpad0 = new Key('Numpad0', '\uE01A');
|
|
62
|
-
Key.Numpad1 = new Key('Numpad1', '\uE01B');
|
|
63
|
-
Key.Numpad2 = new Key('Numpad2', '\uE01C');
|
|
64
|
-
Key.Numpad3 = new Key('Numpad3', '\uE01D');
|
|
65
|
-
Key.Numpad4 = new Key('Numpad4', '\uE01E');
|
|
66
|
-
Key.Numpad5 = new Key('Numpad5', '\uE01F');
|
|
67
|
-
Key.Numpad6 = new Key('Numpad6', '\uE020');
|
|
68
|
-
Key.Numpad7 = new Key('Numpad7', '\uE021');
|
|
69
|
-
Key.Numpad8 = new Key('Numpad8', '\uE022');
|
|
70
|
-
Key.Numpad9 = new Key('Numpad9', '\uE023');
|
|
71
|
-
Key.NumpadAdd = new Key('NumpadAdd', '\uE025');
|
|
72
|
-
Key.NumpadDecimal = new Key('NumpadDecimal', '\uE028');
|
|
73
|
-
Key.NumpadDivide = new Key('NumpadDivide', '\uE029');
|
|
74
|
-
Key.NumpadEqual = new Key('NumpadEqual', '\uE019');
|
|
75
|
-
Key.NumpadMultiply = new Key('NumpadMultiply', '\uE024');
|
|
76
|
-
Key.NumpadSubtract = new Key('NumpadSubtract', '\uE027');
|
|
77
|
-
Key.PageDown = new Key('PageDown', '\uE00F');
|
|
78
|
-
Key.PageUp = new Key('PageUp', '\uE00E');
|
|
79
|
-
Key.Pause = new Key('Pause', '\uE00B');
|
|
80
|
-
Key.Semicolon = new Key('Semicolon', '\uE018');
|
|
81
|
-
Key.Shift = new Key('Shift', '\uE008', true);
|
|
82
|
-
Key.Space = new Key('Space', '\uE00D');
|
|
83
|
-
Key.Tab = new Key('Tab', '\uE004');
|
|
84
|
-
//# sourceMappingUR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AAC,CAAC;AACzC,UAAM,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACrC,SAAK,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AACnC,aAAS,GAAG,IAAI,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC3C,SAAK,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;AACzC,SAAK,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AACnC,OAAG,GAAG,IAAI,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC"}
|
package/lib/input/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Key';
|
package/lib/input/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./Key"), exports);
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
package/lib/input/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/input/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAsB"}
|
|
@@ -1 +0,0 @@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CG;IACH,aAAa,CACT,MAA4D,EAC5D,GAAG,IAAoB;QAGvB,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;aACvC,IAAI,CAAC,MAAM,CAAC,EAAE;YACX,IAAI,CAAC,0BAA0B,GAAG,IAAI,0BAA0B,CAC5D,MAAM,CACT,CAAC;YACF,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,CAAC;IACX,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkDG;IACH,kBAAkB,CACd,MAAqG,EACrG,GAAG,IAAgB;QAEnB,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAqB,MAAM,EAAE,GAAG,IAAI,CAAC;aAChE,IAAI,CAAC,MAAM,CAAC,EAAE;YACX,IAAI,CAAC,0BAA0B,GAAG,IAAI,0BAA0B,CAC5D,MAAM,CACT,CAAC;YACF,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,CAAC;IACX,CAAC;IAED;;;;;;OAMG;IACH,4BAA4B;QACxB,IAAI,CAAE,IAAI,CAAC,0BAA0B,EAAE;YACnC,MAAM,IAAI,iBAAU,CAAC,6DAA6D,CAAC,CAAC;SACvF;QAED,OAAO,IAAI,CAAC,0BAA0B,CAAC,MAAgB,CAAC;IAC5D,CAAC;CACJ;AAxND,oCAwNC;AAED;;GAEG;AACH,MAAM,0BAA0B;IAC5B,YAA4B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;CACjD"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions, Interaction, UsesAbilities } from '@serenity-js/core';
|
|
2
|
-
import { Element } from 'webdriverio';
|
|
3
|
-
import { WebElementInteraction } from './WebElementInteraction';
|
|
4
|
-
/**
|
|
5
|
-
* @desc
|
|
6
|
-
* Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to
|
|
7
|
-
* clear the `value` of a [form `input`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input).
|
|
8
|
-
*
|
|
9
|
-
* @example <caption>Example widget</caption>
|
|
10
|
-
* <form>
|
|
11
|
-
* <input type="text" name="example" id="example" />
|
|
12
|
-
* </form>
|
|
13
|
-
*
|
|
14
|
-
* @example <caption>Lean Page Object describing the widget</caption>
|
|
15
|
-
* import { by, Target } from '@serenity-js/webdriverio';
|
|
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/webdriverio';
|
|
25
|
-
* import { Ensure, equals } from '@serenity-js/assertions';
|
|
26
|
-
*
|
|
27
|
-
* actorCalled('Inés')
|
|
28
|
-
* .whoCan(BrowseTheWeb.using(browser))
|
|
29
|
-
* .attemptsTo(
|
|
30
|
-
* Enter.theValue('Hello world!').into(Form.exampleInput),
|
|
31
|
-
* Ensure.that(Value.of(Form.exampleInput), equals('Hello world!')),
|
|
32
|
-
*
|
|
33
|
-
* Clear.theValueOf(Form.exampleInput),
|
|
34
|
-
* Ensure.that(Value.of(Form.exampleInput), equals('')),
|
|
35
|
-
* );
|
|
36
|
-
*
|
|
37
|
-
* @see {@link BrowseTheWeb}
|
|
38
|
-
* @see {@link Enter}
|
|
39
|
-
* @see {@link Value}
|
|
40
|
-
* @see {@link Target}
|
|
41
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
42
|
-
* @see {@link @serenity-js/assertions/lib/expectations~equals}
|
|
43
|
-
*
|
|
44
|
-
* @extends {@serenity-js/core/lib/screenplay~Interaction}
|
|
45
|
-
*/
|
|
46
|
-
export declare class Clear extends WebElementInteraction {
|
|
47
|
-
private readonly field;
|
|
48
|
-
/**
|
|
49
|
-
* @desc
|
|
50
|
-
* Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
51
|
-
*
|
|
52
|
-
* @param {Answerable<Element<'async'>>} field
|
|
53
|
-
* The field to be cleared
|
|
54
|
-
*
|
|
55
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
56
|
-
*/
|
|
57
|
-
static theValueOf(field: Answerable<Element<'async'>>): Interaction;
|
|
58
|
-
/**
|
|
59
|
-
* @param {Answerable<Element<'async'>>} field
|
|
60
|
-
* The element to be clicked on
|
|
61
|
-
*/
|
|
62
|
-
constructor(field: Answerable<Element<'async'>>);
|
|
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): Promise<void>;
|
|
78
|
-
private capitaliseFirstLetter;
|
|
79
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Clear = void 0;
|
|
4
|
-
const core_1 = require("@serenity-js/core");
|
|
5
|
-
const io_1 = require("@serenity-js/core/lib/io");
|
|
6
|
-
const WebElementInteraction_1 = require("./WebElementInteraction");
|
|
7
|
-
/**
|
|
8
|
-
* @desc
|
|
9
|
-
* Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to
|
|
10
|
-
* clear the `value` of a [form `input`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input).
|
|
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 { by, Target } from '@serenity-js/webdriverio';
|
|
19
|
-
*
|
|
20
|
-
* class Form {
|
|
21
|
-
* static exampleInput = Target.the('example input')
|
|
22
|
-
* .located(by.id('example'));
|
|
23
|
-
* }
|
|
24
|
-
*
|
|
25
|
-
* @example <caption>Clearing the value of an input field</caption>
|
|
26
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
27
|
-
* import { BrowseTheWeb, Clear, Enter, Value } from '@serenity-js/webdriverio';
|
|
28
|
-
* import { Ensure, equals } from '@serenity-js/assertions';
|
|
29
|
-
*
|
|
30
|
-
* actorCalled('Inés')
|
|
31
|
-
* .whoCan(BrowseTheWeb.using(browser))
|
|
32
|
-
* .attemptsTo(
|
|
33
|
-
* Enter.theValue('Hello world!').into(Form.exampleInput),
|
|
34
|
-
* Ensure.that(Value.of(Form.exampleInput), equals('Hello world!')),
|
|
35
|
-
*
|
|
36
|
-
* Clear.theValueOf(Form.exampleInput),
|
|
37
|
-
* Ensure.that(Value.of(Form.exampleInput), equals('')),
|
|
38
|
-
* );
|
|
39
|
-
*
|
|
40
|
-
* @see {@link BrowseTheWeb}
|
|
41
|
-
* @see {@link Enter}
|
|
42
|
-
* @see {@link Value}
|
|
43
|
-
* @see {@link Target}
|
|
44
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
45
|
-
* @see {@link @serenity-js/assertions/lib/expectations~equals}
|
|
46
|
-
*
|
|
47
|
-
* @extends {@serenity-js/core/lib/screenplay~Interaction}
|
|
48
|
-
*/
|
|
49
|
-
class Clear extends WebElementInteraction_1.WebElementInteraction {
|
|
50
|
-
/**
|
|
51
|
-
* @param {Answerable<Element<'async'>>} field
|
|
52
|
-
* The element to be clicked on
|
|
53
|
-
*/
|
|
54
|
-
constructor(field) {
|
|
55
|
-
super((0, io_1.formatted) `#actor clears the value of ${field}`);
|
|
56
|
-
this.field = field;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @desc
|
|
60
|
-
* Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
61
|
-
*
|
|
62
|
-
* @param {Answerable<Element<'async'>>} field
|
|
63
|
-
* The field to be cleared
|
|
64
|
-
*
|
|
65
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
66
|
-
*/
|
|
67
|
-
static theValueOf(field) {
|
|
68
|
-
return new Clear(field);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* @desc
|
|
72
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
73
|
-
* perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
74
|
-
*
|
|
75
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
76
|
-
* An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
77
|
-
*
|
|
78
|
-
* @returns {PromiseLike<void>}
|
|
79
|
-
*
|
|
80
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
81
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
82
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
83
|
-
*/
|
|
84
|
-
async performAs(actor) {
|
|
85
|
-
const element = await this.resolve(actor, this.field);
|
|
86
|
-
const value = await element.getValue();
|
|
87
|
-
if (value === undefined) {
|
|
88
|
-
throw new core_1.LogicError(this.capitaliseFirstLetter((0, io_1.formatted) `${this.field} doesn't seem to have a 'value' attribute that could be cleared.`));
|
|
89
|
-
}
|
|
90
|
-
return element.clearValue();
|
|
91
|
-
}
|
|
92
|
-
capitaliseFirstLetter(text) {
|
|
93
|
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.Clear = Clear;
|
|
97
|
-
//# sourceMappingURL=Clear.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Clear.js","sourceRoot":"","sources":["../../../src/screenplay/interactions/Clear.ts"],"names":[],"mappings":";;;AAAA,4CAAyG;AACzG,iDAAqD;AAGrD,mEAAgE;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAa,KAAM,SAAQ,6CAAqB;IAe5C;;;OAGG;IACH,YAA6B,KAAmC;QAC5D,KAAK,CAAC,IAAA,cAAS,EAAC,8BAA+B,KAAM,EAAE,CAAC,CAAC;QADhC,UAAK,GAAL,KAAK,CAA8B;IAEhE,CAAC;IAnBD;;;;;;;;OAQG;IACH,MAAM,CAAC,UAAU,CAAC,KAAmC;QACjD,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAUD;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,SAAS,CAAC,KAAuC;QACnD,MAAM,OAAO,GAAK,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACxD,MAAM,KAAK,GAAO,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC;QAE3C,IAAI,KAAK,KAAK,SAAS,EAAE;YACrB,MAAM,IAAI,iBAAU,CAChB,IAAI,CAAC,qBAAqB,CAAC,IAAA,cAAS,EAAC,GAAI,IAAI,CAAC,KAAM,kEAAkE,CAAC,CAC1H,CAAC;SACL;QAED,OAAO,OAAO,CAAC,UAAU,EAAE,CAAC;IAChC,CAAC;IAEO,qBAAqB,CAAC,IAAY;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;CACJ;AArDD,sBAqDC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions, Interaction, UsesAbilities } from '@serenity-js/core';
|
|
2
|
-
import { Element } from 'webdriverio';
|
|
3
|
-
import { WebElementInteraction } from './WebElementInteraction';
|
|
4
|
-
/**
|
|
5
|
-
* @desc
|
|
6
|
-
* Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to
|
|
7
|
-
* [click](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event) on a given Web element.
|
|
8
|
-
*
|
|
9
|
-
* @example <caption>Example widget</caption>
|
|
10
|
-
* <form>
|
|
11
|
-
* <input type="text" name="example" id="example" />
|
|
12
|
-
* </form>
|
|
13
|
-
*
|
|
14
|
-
* @example <caption>Lean Page Object describing the widget</caption>
|
|
15
|
-
* import { by, Target } from '@serenity-js/webdriverio';
|
|
16
|
-
*
|
|
17
|
-
* class Form {
|
|
18
|
-
* static exampleInput = Target.the('example input')
|
|
19
|
-
* .located(by.id('example'));
|
|
20
|
-
* }
|
|
21
|
-
*
|
|
22
|
-
* @example <caption>Clicking on an element</caption>
|
|
23
|
-
* import { actorCalled } from '@serenity-js/core';
|
|
24
|
-
* import { BrowseTheWeb, Click, isSelected } from '@serenity-js/webdriverio';
|
|
25
|
-
* import { Ensure } from '@serenity-js/assertions';
|
|
26
|
-
*
|
|
27
|
-
* actorCalled('Chloé')
|
|
28
|
-
* .whoCan(BrowseTheWeb.using(browser))
|
|
29
|
-
* .attemptsTo(
|
|
30
|
-
* Click.on(Form.exampleInput),
|
|
31
|
-
* Ensure.that(Form.exampleInput, isSelected()),
|
|
32
|
-
* );
|
|
33
|
-
*
|
|
34
|
-
* @see {@link BrowseTheWeb}
|
|
35
|
-
* @see {@link Target}
|
|
36
|
-
* @see {@link @serenity-js/assertions~Ensure}
|
|
37
|
-
* @see {@link isSelected}
|
|
38
|
-
*
|
|
39
|
-
* @extends {WebElementInteraction}
|
|
40
|
-
*/
|
|
41
|
-
export declare class Click extends WebElementInteraction {
|
|
42
|
-
private readonly target;
|
|
43
|
-
/**
|
|
44
|
-
* @desc
|
|
45
|
-
* Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
46
|
-
*
|
|
47
|
-
* @param {Answerable<Element<'async'>>} target
|
|
48
|
-
* The element to be clicked on
|
|
49
|
-
*
|
|
50
|
-
* @returns {@serenity-js/core/lib/screenplay~Interaction}
|
|
51
|
-
*/
|
|
52
|
-
static on(target: Answerable<Element<'async'>>): Interaction;
|
|
53
|
-
/**
|
|
54
|
-
* @param {Answerable<Element<'async'>>} target
|
|
55
|
-
* The element to be clicked on
|
|
56
|
-
*/
|
|
57
|
-
constructor(target: Answerable<Element<'async'>>);
|
|
58
|
-
/**
|
|
59
|
-
* @desc
|
|
60
|
-
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
61
|
-
* perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
|
|
62
|
-
*
|
|
63
|
-
* @param {UsesAbilities & AnswersQuestions} actor
|
|
64
|
-
* An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
|
|
65
|
-
*
|
|
66
|
-
* @returns {PromiseLike<void>}
|
|
67
|
-
*
|
|
68
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
|
|
69
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
|
|
70
|
-
* @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
|
|
71
|
-
*/
|
|
72
|
-
performAs(actor: UsesAbilities & AnswersQuestions): Promise<void>;
|
|
73
|
-
}
|