@serenity-js/protractor 3.24.1 → 3.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +1 -1
- package/lib/adapter/Config.d.ts +3 -3
- package/lib/adapter/reporter/ProtractorReport.d.ts +2 -1
- package/lib/adapter/reporter/ProtractorReport.d.ts.map +1 -1
- package/lib/adapter/runner/TestRunnerDetector.d.ts +1 -1
- package/lib/adapter/runner/TestRunnerDetector.js +1 -1
- package/lib/adapter/runner/TestRunnerLoader.d.ts +7 -7
- package/lib/adapter/runner/TestRunnerLoader.js +7 -7
- package/lib/screenplay/abilities/BrowseTheWebWithProtractor.d.ts +6 -6
- package/lib/screenplay/abilities/BrowseTheWebWithProtractor.js +6 -6
- package/lib/screenplay/interactions/UseAngular.d.ts +3 -3
- package/lib/screenplay/interactions/UseAngular.js +3 -3
- package/lib/screenplay/models/ProtractorBrowsingSession.d.ts +1 -1
- package/lib/screenplay/models/ProtractorBrowsingSession.js +1 -1
- package/lib/screenplay/models/ProtractorCookie.d.ts +1 -1
- package/lib/screenplay/models/ProtractorCookie.js +1 -1
- package/lib/screenplay/models/ProtractorModalDialogHandler.d.ts +1 -1
- package/lib/screenplay/models/ProtractorModalDialogHandler.js +1 -1
- package/lib/screenplay/models/ProtractorPage.d.ts +1 -1
- package/lib/screenplay/models/ProtractorPage.js +1 -1
- package/lib/screenplay/models/ProtractorPageElement.d.ts +2 -1
- package/lib/screenplay/models/ProtractorPageElement.d.ts.map +1 -1
- package/lib/screenplay/models/ProtractorPageElement.js +6 -1
- package/lib/screenplay/models/ProtractorPageElement.js.map +1 -1
- package/lib/screenplay/models/locators/ProtractorLocator.d.ts +1 -1
- package/lib/screenplay/models/locators/ProtractorLocator.js +1 -1
- package/lib/screenplay/models/locators/ProtractorRootLocator.d.ts +1 -1
- package/lib/screenplay/models/locators/ProtractorRootLocator.js +1 -1
- package/lib/screenplay/questions/ProtractorParam.d.ts +1 -1
- package/lib/screenplay/questions/ProtractorParam.js +1 -1
- package/package.json +11 -11
- package/src/adapter/Config.ts +3 -3
- package/src/adapter/reporter/ProtractorReport.ts +2 -1
- package/src/adapter/runner/TestRunnerDetector.ts +1 -1
- package/src/adapter/runner/TestRunnerLoader.ts +7 -7
- package/src/screenplay/abilities/BrowseTheWebWithProtractor.ts +6 -6
- package/src/screenplay/interactions/UseAngular.ts +3 -3
- package/src/screenplay/models/ProtractorBrowsingSession.ts +1 -1
- package/src/screenplay/models/ProtractorCookie.ts +1 -1
- package/src/screenplay/models/ProtractorModalDialogHandler.ts +1 -1
- package/src/screenplay/models/ProtractorPage.ts +1 -1
- package/src/screenplay/models/ProtractorPageElement.ts +10 -1
- package/src/screenplay/models/locators/ProtractorLocator.ts +1 -1
- package/src/screenplay/models/locators/ProtractorRootLocator.ts +1 -1
- package/src/screenplay/questions/ProtractorParam.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.25.1](https://github.com/serenity-js/serenity-js/compare/v3.25.0...v3.25.1) (2024-07-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **core:** all the API docs now link to the online Serenity/JS API documentation ([f8f451d](https://github.com/serenity-js/serenity-js/commit/f8f451dffdb4caaa2e31a860f59d59470f4856ad))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.25.0](https://github.com/serenity-js/serenity-js/compare/v3.24.1...v3.25.0) (2024-07-03)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **web:** renamed PageElement.outerHtml to PageElement.html for consistency with other methods ([9df6e0f](https://github.com/serenity-js/serenity-js/commit/9df6e0f2eece966d50ddac92e7550baa72bcb5f1))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **web:** outerHtml lets you retrieve the HTML content of the given PageElement ([1bb6c6a](https://github.com/serenity-js/serenity-js/commit/1bb6c6afbfea3fb0c8883f9fe4aec385aa12ac27))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [3.24.1](https://github.com/serenity-js/serenity-js/compare/v3.24.0...v3.24.1) (2024-06-26)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @serenity-js/protractor
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ of complex software systems faster, more collaborative and easier to scale.
|
|
|
17
17
|
👋 Join the Serenity/JS Community!
|
|
18
18
|
- Meet other Serenity/JS developers and maintainers on the [Serenity/JS Community chat channel](https://matrix.to/#/#serenity-js:gitter.im),
|
|
19
19
|
- Find answers to your Serenity/JS questions on the [Serenity/JS Forum](https://github.com/orgs/serenity-js/discussions/categories/how-do-i),
|
|
20
|
-
- Learn how to [contribute to Serenity/JS](https://serenity-js.org/contributing),
|
|
20
|
+
- Learn how to [contribute to Serenity/JS](https://serenity-js.org/community/contributing/),
|
|
21
21
|
- Support the project and gain access to [Serenity/JS Playbooks](https://github.com/serenity-js/playbooks) by becoming a [Serenity/JS GitHub Sponsor](https://github.com/sponsors/serenity-js)!
|
|
22
22
|
|
|
23
23
|
## Serenity/JS Protractor
|
package/lib/adapter/Config.d.ts
CHANGED
|
@@ -6,14 +6,14 @@ import type { Config as ProtractorConfig } from 'protractor';
|
|
|
6
6
|
*
|
|
7
7
|
* ## Learn more
|
|
8
8
|
* - [Protractor config](https://github.com/angular/protractor/blob/master/lib/config.ts)
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
9
|
+
* - [`SerenityConfig`](https://serenity-js.org/api/core/class/SerenityConfig/)
|
|
10
|
+
* - [`configure`](https://serenity-js.org/api/core/function/configure/)
|
|
11
11
|
*
|
|
12
12
|
* @group Configuration
|
|
13
13
|
*/
|
|
14
14
|
export interface Config extends ProtractorConfig {
|
|
15
15
|
/**
|
|
16
|
-
* See
|
|
16
|
+
* See [`SerenityConfig`](https://serenity-js.org/api/core/class/SerenityConfig/)
|
|
17
17
|
*/
|
|
18
18
|
serenity: SerenityConfig & {
|
|
19
19
|
runner?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SpecResult } from 'protractor/built/plugins';
|
|
2
2
|
/**
|
|
3
|
-
* A JSON object which needs to be returned to Protractor
|
|
3
|
+
* A JSON object which needs to be returned to Protractor
|
|
4
|
+
* when [`ProtractorFrameworkAdapter`](https://serenity-js.org/api/protractor-adapter/function/run/)
|
|
4
5
|
* is done with executing the test scenarios.
|
|
5
6
|
*
|
|
6
7
|
* ## Learn more
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProtractorReport.d.ts","sourceRoot":"","sources":["../../../src/adapter/reporter/ProtractorReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D
|
|
1
|
+
{"version":3,"file":"ProtractorReport.d.ts","sourceRoot":"","sources":["../../../src/adapter/reporter/ProtractorReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,WAAW,EAAE,KAAK,CAAC,UAAU,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzD"}
|
|
@@ -2,7 +2,7 @@ import type { TestRunnerAdapter } from '@serenity-js/core/lib/adapter';
|
|
|
2
2
|
import type { Config as ProtractorConfig } from 'protractor';
|
|
3
3
|
import type { TestRunnerLoader } from './TestRunnerLoader';
|
|
4
4
|
/**
|
|
5
|
-
* Detects the
|
|
5
|
+
* Detects the [`TestRunnerAdapter`](https://serenity-js.org/api/core-adapter/interface/TestRunnerAdapter/) to use,
|
|
6
6
|
* based on Protractor configuration.
|
|
7
7
|
*
|
|
8
8
|
* @group Integration
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TestRunnerDetector = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Detects the
|
|
5
|
+
* Detects the [`TestRunnerAdapter`](https://serenity-js.org/api/core-adapter/interface/TestRunnerAdapter/) to use,
|
|
6
6
|
* based on Protractor configuration.
|
|
7
7
|
*
|
|
8
8
|
* @group Integration
|
|
@@ -2,7 +2,7 @@ import type { TestRunnerAdapter } from '@serenity-js/core/lib/adapter';
|
|
|
2
2
|
import { Path } from '@serenity-js/core/lib/io';
|
|
3
3
|
import type { CucumberAdapterConfig } from './CucumberAdapterConfig';
|
|
4
4
|
/**
|
|
5
|
-
* Loads a
|
|
5
|
+
* Loads a [`TestRunnerAdapter`](https://serenity-js.org/api/core-adapter/interface/TestRunnerAdapter/) needed to invoke
|
|
6
6
|
* the chosen test runner programmatically.
|
|
7
7
|
*
|
|
8
8
|
* @group Integration
|
|
@@ -16,9 +16,9 @@ export declare class TestRunnerLoader {
|
|
|
16
16
|
* @param cwd
|
|
17
17
|
* Current working directory; used to resolve glob paths to files for Cucumber.js to `require`,
|
|
18
18
|
* and instructing Serenity/JS where to look for this module's optional
|
|
19
|
-
* dependencies, like [`@serenity-js/cucumber`](/api/cucumber),
|
|
20
|
-
* [`@serenity-js/mocha`](/api/mocha),
|
|
21
|
-
* [`@serenity-js/jasmine`](/api/jasmine), etc.
|
|
19
|
+
* dependencies, like [`@serenity-js/cucumber`](https://serenity-js.org/api/cucumber),
|
|
20
|
+
* [`@serenity-js/mocha`](https://serenity-js.org/api/mocha),
|
|
21
|
+
* [`@serenity-js/jasmine`](https://serenity-js.org/api/jasmine), etc.
|
|
22
22
|
*
|
|
23
23
|
* @param runnerId
|
|
24
24
|
* Unique identifier used to differentiate output files produced by native Cucumber.js formatters.
|
|
@@ -26,19 +26,19 @@ export declare class TestRunnerLoader {
|
|
|
26
26
|
*/
|
|
27
27
|
constructor(cwd: Path, runnerId: number | string);
|
|
28
28
|
/**
|
|
29
|
-
* See
|
|
29
|
+
* See [`JasmineConfig`](https://serenity-js.org/api/jasmine-adapter/interface/JasmineConfig/)
|
|
30
30
|
*
|
|
31
31
|
* @param jasmineNodeOpts
|
|
32
32
|
*/
|
|
33
33
|
forJasmine(jasmineNodeOpts: object): TestRunnerAdapter;
|
|
34
34
|
/**
|
|
35
|
-
* See
|
|
35
|
+
* See [`MochaConfig`](https://serenity-js.org/api/mocha-adapter/interface/MochaConfig/)
|
|
36
36
|
*
|
|
37
37
|
* @param mochaOpts
|
|
38
38
|
*/
|
|
39
39
|
forMocha(mochaOpts: object): TestRunnerAdapter;
|
|
40
40
|
/**
|
|
41
|
-
* See
|
|
41
|
+
* See [`CucumberConfig`](https://serenity-js.org/api/cucumber-adapter/interface/CucumberConfig/)
|
|
42
42
|
*
|
|
43
43
|
* @param cucumberOpts
|
|
44
44
|
* @param adapterConfig
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TestRunnerLoader = void 0;
|
|
4
4
|
const io_1 = require("@serenity-js/core/lib/io");
|
|
5
5
|
/**
|
|
6
|
-
* Loads a
|
|
6
|
+
* Loads a [`TestRunnerAdapter`](https://serenity-js.org/api/core-adapter/interface/TestRunnerAdapter/) needed to invoke
|
|
7
7
|
* the chosen test runner programmatically.
|
|
8
8
|
*
|
|
9
9
|
* @group Integration
|
|
@@ -17,9 +17,9 @@ class TestRunnerLoader {
|
|
|
17
17
|
* @param cwd
|
|
18
18
|
* Current working directory; used to resolve glob paths to files for Cucumber.js to `require`,
|
|
19
19
|
* and instructing Serenity/JS where to look for this module's optional
|
|
20
|
-
* dependencies, like [`@serenity-js/cucumber`](/api/cucumber),
|
|
21
|
-
* [`@serenity-js/mocha`](/api/mocha),
|
|
22
|
-
* [`@serenity-js/jasmine`](/api/jasmine), etc.
|
|
20
|
+
* dependencies, like [`@serenity-js/cucumber`](https://serenity-js.org/api/cucumber),
|
|
21
|
+
* [`@serenity-js/mocha`](https://serenity-js.org/api/mocha),
|
|
22
|
+
* [`@serenity-js/jasmine`](https://serenity-js.org/api/jasmine), etc.
|
|
23
23
|
*
|
|
24
24
|
* @param runnerId
|
|
25
25
|
* Unique identifier used to differentiate output files produced by native Cucumber.js formatters.
|
|
@@ -32,7 +32,7 @@ class TestRunnerLoader {
|
|
|
32
32
|
this.finder = new io_1.FileFinder(cwd);
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* See
|
|
35
|
+
* See [`JasmineConfig`](https://serenity-js.org/api/jasmine-adapter/interface/JasmineConfig/)
|
|
36
36
|
*
|
|
37
37
|
* @param jasmineNodeOpts
|
|
38
38
|
*/
|
|
@@ -41,7 +41,7 @@ class TestRunnerLoader {
|
|
|
41
41
|
return new JasmineAdapter(jasmineNodeOpts, this.moduleLoader);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* See
|
|
44
|
+
* See [`MochaConfig`](https://serenity-js.org/api/mocha-adapter/interface/MochaConfig/)
|
|
45
45
|
*
|
|
46
46
|
* @param mochaOpts
|
|
47
47
|
*/
|
|
@@ -50,7 +50,7 @@ class TestRunnerLoader {
|
|
|
50
50
|
return new MochaAdapter(mochaOpts, this.moduleLoader);
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* See
|
|
53
|
+
* See [`CucumberConfig`](https://serenity-js.org/api/cucumber-adapter/interface/CucumberConfig/)
|
|
54
54
|
*
|
|
55
55
|
* @param cucumberOpts
|
|
56
56
|
* @param adapterConfig
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BrowseTheWeb } from '@serenity-js/web';
|
|
2
2
|
import type * as protractor from 'protractor';
|
|
3
3
|
/**
|
|
4
|
-
* This implementation of the
|
|
5
|
-
* enables the
|
|
4
|
+
* This implementation of the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
5
|
+
* enables the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to interact with web front-ends using [Protractor](http://www.protractortest.org/#/).
|
|
6
6
|
*
|
|
7
7
|
* ## Using Protractor to `BrowseTheWeb`
|
|
8
8
|
*
|
|
@@ -28,9 +28,9 @@ import type * as protractor from 'protractor';
|
|
|
28
28
|
*
|
|
29
29
|
* ## Learn more
|
|
30
30
|
* - [Protractor website](https://www.protractortest.org/)
|
|
31
|
-
* -
|
|
32
|
-
* -
|
|
33
|
-
* -
|
|
31
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
32
|
+
* - [`Ability`](https://serenity-js.org/api/core/class/Ability/)
|
|
33
|
+
* - [`Actor`](https://serenity-js.org/api/core/class/Actor/)
|
|
34
34
|
*
|
|
35
35
|
* @group Abilities
|
|
36
36
|
*/
|
|
@@ -83,7 +83,7 @@ export declare class BrowseTheWebWithProtractor extends BrowseTheWeb<protractor.
|
|
|
83
83
|
* @param path
|
|
84
84
|
* Either a name or a dot-delimited path to the param.
|
|
85
85
|
*
|
|
86
|
-
* @throws
|
|
86
|
+
* @throws [`ConfigurationError`](https://serenity-js.org/api/core/class/ConfigurationError/)
|
|
87
87
|
* Throws a `ConfigurationError` if the parameter is `undefined`
|
|
88
88
|
*/
|
|
89
89
|
param<T = any>(path: string): T;
|
|
@@ -5,8 +5,8 @@ const core_1 = require("@serenity-js/core");
|
|
|
5
5
|
const web_1 = require("@serenity-js/web");
|
|
6
6
|
const models_1 = require("../models");
|
|
7
7
|
/**
|
|
8
|
-
* This implementation of the
|
|
9
|
-
* enables the
|
|
8
|
+
* This implementation of the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
9
|
+
* enables the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to interact with web front-ends using [Protractor](http://www.protractortest.org/#/).
|
|
10
10
|
*
|
|
11
11
|
* ## Using Protractor to `BrowseTheWeb`
|
|
12
12
|
*
|
|
@@ -32,9 +32,9 @@ const models_1 = require("../models");
|
|
|
32
32
|
*
|
|
33
33
|
* ## Learn more
|
|
34
34
|
* - [Protractor website](https://www.protractortest.org/)
|
|
35
|
-
* -
|
|
36
|
-
* -
|
|
37
|
-
* -
|
|
35
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
36
|
+
* - [`Ability`](https://serenity-js.org/api/core/class/Ability/)
|
|
37
|
+
* - [`Actor`](https://serenity-js.org/api/core/class/Actor/)
|
|
38
38
|
*
|
|
39
39
|
* @group Abilities
|
|
40
40
|
*/
|
|
@@ -92,7 +92,7 @@ class BrowseTheWebWithProtractor extends web_1.BrowseTheWeb {
|
|
|
92
92
|
* @param path
|
|
93
93
|
* Either a name or a dot-delimited path to the param.
|
|
94
94
|
*
|
|
95
|
-
* @throws
|
|
95
|
+
* @throws [`ConfigurationError`](https://serenity-js.org/api/core/class/ConfigurationError/)
|
|
96
96
|
* Throws a `ConfigurationError` if the parameter is `undefined`
|
|
97
97
|
*/
|
|
98
98
|
param(path) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Interaction } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Instructs the
|
|
3
|
+
* Instructs the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to enable or disable automated synchronisation between Protractor and Angular 1.x application.
|
|
4
4
|
*
|
|
5
5
|
* Useful when a test scenario needs to interact with both Angular-based
|
|
6
6
|
* and non-Angular web apps, e.g. use an external sign-in form.
|
|
@@ -51,12 +51,12 @@ import { Interaction } from '@serenity-js/core';
|
|
|
51
51
|
*/
|
|
52
52
|
export declare class UseAngular {
|
|
53
53
|
/**
|
|
54
|
-
* Produces an
|
|
54
|
+
* Produces an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/) that instructs the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to disable
|
|
55
55
|
* synchronisation between Protractor and an Angular 1.x app.
|
|
56
56
|
*/
|
|
57
57
|
static disableSynchronisation(): Interaction;
|
|
58
58
|
/**
|
|
59
|
-
* Produces an
|
|
59
|
+
* Produces an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/) that instructs the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to enable
|
|
60
60
|
* synchronisation between Protractor and an Angular 1.x app.
|
|
61
61
|
*/
|
|
62
62
|
static enableSynchronisation(): Interaction;
|
|
@@ -4,7 +4,7 @@ exports.UseAngular = void 0;
|
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
const abilities_1 = require("../abilities");
|
|
6
6
|
/**
|
|
7
|
-
* Instructs the
|
|
7
|
+
* Instructs the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to enable or disable automated synchronisation between Protractor and Angular 1.x application.
|
|
8
8
|
*
|
|
9
9
|
* Useful when a test scenario needs to interact with both Angular-based
|
|
10
10
|
* and non-Angular web apps, e.g. use an external sign-in form.
|
|
@@ -55,7 +55,7 @@ const abilities_1 = require("../abilities");
|
|
|
55
55
|
*/
|
|
56
56
|
class UseAngular {
|
|
57
57
|
/**
|
|
58
|
-
* Produces an
|
|
58
|
+
* Produces an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/) that instructs the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to disable
|
|
59
59
|
* synchronisation between Protractor and an Angular 1.x app.
|
|
60
60
|
*/
|
|
61
61
|
static disableSynchronisation() {
|
|
@@ -65,7 +65,7 @@ class UseAngular {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
* Produces an
|
|
68
|
+
* Produces an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/) that instructs the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to enable
|
|
69
69
|
* synchronisation between Protractor and an Angular 1.x app.
|
|
70
70
|
*/
|
|
71
71
|
static enableSynchronisation() {
|
|
@@ -3,7 +3,7 @@ import { BrowsingSession } from '@serenity-js/web';
|
|
|
3
3
|
import type * as protractor from 'protractor';
|
|
4
4
|
import { ProtractorPage } from '../models';
|
|
5
5
|
/**
|
|
6
|
-
* Protractor-specific implementation of
|
|
6
|
+
* Protractor-specific implementation of [`BrowsingSession`](https://serenity-js.org/api/web/class/BrowsingSession/).
|
|
7
7
|
*
|
|
8
8
|
* @group Models
|
|
9
9
|
*/
|
|
@@ -8,7 +8,7 @@ const promised_1 = require("../promised");
|
|
|
8
8
|
const ProtractorErrorHandler_1 = require("./ProtractorErrorHandler");
|
|
9
9
|
const ProtractorModalDialogHandler_1 = require("./ProtractorModalDialogHandler");
|
|
10
10
|
/**
|
|
11
|
-
* Protractor-specific implementation of
|
|
11
|
+
* Protractor-specific implementation of [`BrowsingSession`](https://serenity-js.org/api/web/class/BrowsingSession/).
|
|
12
12
|
*
|
|
13
13
|
* @group Models
|
|
14
14
|
*/
|
|
@@ -2,7 +2,7 @@ import type { CookieData } from '@serenity-js/web';
|
|
|
2
2
|
import { Cookie } from '@serenity-js/web';
|
|
3
3
|
import type { ProtractorBrowser } from 'protractor';
|
|
4
4
|
/**
|
|
5
|
-
* Protractor-specific implementation of
|
|
5
|
+
* Protractor-specific implementation of [`Cookie`](https://serenity-js.org/api/web/class/Cookie/).
|
|
6
6
|
*
|
|
7
7
|
* @group Models
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const web_1 = require("@serenity-js/web");
|
|
|
6
6
|
const tiny_types_1 = require("tiny-types");
|
|
7
7
|
const promised_1 = require("../promised");
|
|
8
8
|
/**
|
|
9
|
-
* Protractor-specific implementation of
|
|
9
|
+
* Protractor-specific implementation of [`Cookie`](https://serenity-js.org/api/web/class/Cookie/).
|
|
10
10
|
*
|
|
11
11
|
* @group Models
|
|
12
12
|
*/
|
|
@@ -3,7 +3,7 @@ import { ModalDialogHandler } from '@serenity-js/web';
|
|
|
3
3
|
import type * as protractor from 'protractor';
|
|
4
4
|
import type { ProtractorErrorHandler } from './ProtractorErrorHandler';
|
|
5
5
|
/**
|
|
6
|
-
* Protractor-specific implementation of
|
|
6
|
+
* Protractor-specific implementation of [`ModalDialogHandler`](https://serenity-js.org/api/web/class/ModalDialogHandler/).
|
|
7
7
|
*
|
|
8
8
|
* @group Models
|
|
9
9
|
*/
|
|
@@ -5,7 +5,7 @@ const web_1 = require("@serenity-js/web");
|
|
|
5
5
|
const protractor_1 = require("protractor");
|
|
6
6
|
const promised_1 = require("../promised");
|
|
7
7
|
/**
|
|
8
|
-
* Protractor-specific implementation of
|
|
8
|
+
* Protractor-specific implementation of [`ModalDialogHandler`](https://serenity-js.org/api/web/class/ModalDialogHandler/).
|
|
9
9
|
*
|
|
10
10
|
* @group Models
|
|
11
11
|
*/
|
|
@@ -7,7 +7,7 @@ import { URL } from 'url';
|
|
|
7
7
|
import type { ProtractorBrowsingSession } from './ProtractorBrowsingSession';
|
|
8
8
|
import type { ProtractorErrorHandler } from './ProtractorErrorHandler';
|
|
9
9
|
/**
|
|
10
|
-
* Protractor-specific implementation of
|
|
10
|
+
* Protractor-specific implementation of [`Page`](https://serenity-js.org/api/web/class/Page/).
|
|
11
11
|
*
|
|
12
12
|
* @group Models
|
|
13
13
|
*/
|
|
@@ -34,7 +34,7 @@ const ProtractorSelectors_1 = require("./locators/ProtractorSelectors");
|
|
|
34
34
|
const ProtractorCookie_1 = require("./ProtractorCookie");
|
|
35
35
|
const ProtractorPageElement_1 = require("./ProtractorPageElement");
|
|
36
36
|
/**
|
|
37
|
-
* Protractor-specific implementation of
|
|
37
|
+
* Protractor-specific implementation of [`Page`](https://serenity-js.org/api/web/class/Page/).
|
|
38
38
|
*
|
|
39
39
|
* @group Models
|
|
40
40
|
*/
|
|
@@ -2,7 +2,7 @@ import type { SwitchableOrigin } from '@serenity-js/web';
|
|
|
2
2
|
import { PageElement, SelectOption } from '@serenity-js/web';
|
|
3
3
|
import type { ElementFinder } from 'protractor';
|
|
4
4
|
/**
|
|
5
|
-
* Protractor-specific implementation of
|
|
5
|
+
* Protractor-specific implementation of [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
6
6
|
*
|
|
7
7
|
* @group Models
|
|
8
8
|
*/
|
|
@@ -21,6 +21,7 @@ export declare class ProtractorPageElement extends PageElement<ElementFinder> {
|
|
|
21
21
|
attribute(name: string): Promise<string>;
|
|
22
22
|
text(): Promise<string>;
|
|
23
23
|
value(): Promise<string>;
|
|
24
|
+
html(): Promise<string>;
|
|
24
25
|
switchTo(): Promise<SwitchableOrigin>;
|
|
25
26
|
isActive(): Promise<boolean>;
|
|
26
27
|
isClickable(): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProtractorPageElement.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/ProtractorPageElement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAM/C;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,WAAW,CAAC,aAAa,CAAC;IAEjE,EAAE,CAAC,MAAM,EAAE,qBAAqB,GAAG,WAAW,CAAC,aAAa,CAAC;IAI7D,SAAS,CAAC,KAAK,EAAE,qBAAqB,GAAG,qBAAqB;IAIxD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAyC3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAW5B,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,C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qBAAqB;IAIxD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAyC3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAW5B,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ1E,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAS/B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAW1B,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAW3B,aAAa,CAAC,GAAG,OAAO,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAaxD,eAAe,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IA8B1C,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMxC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAMvB,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;IAaxB,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IASvB,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAoCrC,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IAS5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/B,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;IAM7B,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;IAM7B,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAM9B,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;CAyBtC"}
|
|
@@ -30,7 +30,7 @@ const scripts = __importStar(require("@serenity-js/web/lib/scripts"));
|
|
|
30
30
|
const protractor_1 = require("protractor");
|
|
31
31
|
const promised_1 = require("../promised");
|
|
32
32
|
/**
|
|
33
|
-
* Protractor-specific implementation of
|
|
33
|
+
* Protractor-specific implementation of [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
34
34
|
*
|
|
35
35
|
* @group Models
|
|
36
36
|
*/
|
|
@@ -153,6 +153,11 @@ class ProtractorPageElement extends web_1.PageElement {
|
|
|
153
153
|
return webElement.value;
|
|
154
154
|
}, webElement));
|
|
155
155
|
}
|
|
156
|
+
async html() {
|
|
157
|
+
const element = await this.nativeElement();
|
|
158
|
+
const webElement = await element.getWebElement();
|
|
159
|
+
return await (0, promised_1.promised)(webElement.getDriver().executeScript('return arguments[0].outerHTML;', webElement));
|
|
160
|
+
}
|
|
156
161
|
async switchTo() {
|
|
157
162
|
const element = await this.locator.nativeElement();
|
|
158
163
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProtractorPageElement.js","sourceRoot":"","sources":["../../../src/screenplay/models/ProtractorPageElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA+C;AAE/C,0CAA6D;AAC7D,sEAAwD;AAExD,2CAA2E;AAE3E,0CAAuC;AAGvC;;;;GAIG;AACH,MAAa,qBAAsB,SAAQ,iBAA0B;IAEjE,EAAE,CAAC,MAA6B;QAC5B,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,SAAS,CAAC,KAA4B;QAClC,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,UAAU;QACZ,+DAA+D;QAC/D,SAAS,KAAK,CAAC,MAAc,EAAE,GAAW;YACtC,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;QACjD,CAAC;QAED,+DAA+D;QAC/D,KAAK,UAAU,OAAO,C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CAAC;YAE7D,mGAAmG;YACnG,OAAO,MAAM,IAAA,mBAAQ,EAAC,UAAU,CAAC,SAAS,EAAE,CAAC,aAAa,CACtD,OAAO,CAAC,SAAS,EACjB,UAAU,CACb,CAAC,CAAC;SACN;QACD,OAAO,KAAK,EAAE;YAEV,IAAI,KAAK,CAAC,IAAI,KAAK,oBAAoB,EAAE;gBACrC,OAAO,KAAK,CAAC;aAChB;YAED,MAAM,KAAK,CAAC;SACf;IACL,CAAC;CACJ;
|
|
1
|
+
{"version":3,"file":"ProtractorPageElement.js","sourceRoot":"","sources":["../../../src/screenplay/models/ProtractorPageElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA+C;AAE/C,0CAA6D;AAC7D,sEAAwD;AAExD,2CAA2E;AAE3E,0CAAuC;AAGvC;;;;GAIG;AACH,MAAa,qBAAsB,SAAQ,iBAA0B;IAEjE,EAAE,CAAC,MAA6B;QAC5B,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,SAAS,CAAC,KAA4B;QAClC,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,UAAU;QACZ,+DAA+D;QAC/D,SAAS,KAAK,CAAC,MAAc,EAAE,GAAW;YACtC,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;QACjD,CAAC;QAED,+DAA+D;QAC/D,KAAK,UAAU,OAAO,CAAC,OAAsB;YACzC,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC;YACjD,MAAM,IAAA,mBAAQ,EAAC,UAAU,CAAC,SAAS,EAAE,CAAC,aAA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1D,IAAI,CAAE,MAAM,OAAO,CAAC,WAAW,EAAE,EAAE;gBAC/B,OAAO,KAAK,CAAC;aAChB;YAED,MAAM,UAAU,GAAe,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC;YAE7D,mGAAmG;YACnG,OAAO,MAAM,IAAA,mBAAQ,EAAC,UAAU,CAAC,SAAS,EAAE,CAAC,aAAa,CACtD,OAAO,CAAC,SAAS,EACjB,UAAU,CACb,CAAC,CAAC;SACN;QACD,OAAO,KAAK,EAAE;YAEV,IAAI,KAAK,CAAC,IAAI,KAAK,oBAAoB,EAAE;gBACrC,OAAO,KAAK,CAAC;aAChB;YAED,MAAM,KAAK,CAAC;SACf;IACL,CAAC;CACJ;AApRD,sDAoRC"}
|
|
@@ -4,7 +4,7 @@ import type * as protractor from 'protractor';
|
|
|
4
4
|
import type { ProtractorErrorHandler } from '../ProtractorErrorHandler';
|
|
5
5
|
import type { ProtractorRootLocator } from './ProtractorRootLocator';
|
|
6
6
|
/**
|
|
7
|
-
* Protractor-specific implementation of
|
|
7
|
+
* Protractor-specific implementation of [`Locator`](https://serenity-js.org/api/web/class/Locator/).
|
|
8
8
|
*
|
|
9
9
|
* @group Models
|
|
10
10
|
*/
|
|
@@ -7,7 +7,7 @@ const unpromisedWebElement_1 = require("../../unpromisedWebElement");
|
|
|
7
7
|
const ProtractorPageElement_1 = require("../ProtractorPageElement");
|
|
8
8
|
const ProtractorSelectors_1 = require("./ProtractorSelectors");
|
|
9
9
|
/**
|
|
10
|
-
* Protractor-specific implementation of
|
|
10
|
+
* Protractor-specific implementation of [`Locator`](https://serenity-js.org/api/web/class/Locator/).
|
|
11
11
|
*
|
|
12
12
|
* @group Models
|
|
13
13
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RootLocator } from '@serenity-js/web';
|
|
2
2
|
import type * as protractor from 'protractor';
|
|
3
3
|
/**
|
|
4
|
-
* Protractor-specific implementation of
|
|
4
|
+
* Protractor-specific implementation of [`RootLocator`](https://serenity-js.org/api/web/class/RootLocator/).
|
|
5
5
|
*
|
|
6
6
|
* @group Models
|
|
7
7
|
*/
|
|
@@ -4,7 +4,7 @@ exports.ProtractorRootLocator = void 0;
|
|
|
4
4
|
const web_1 = require("@serenity-js/web");
|
|
5
5
|
const promised_1 = require("../../promised");
|
|
6
6
|
/**
|
|
7
|
-
* Protractor-specific implementation of
|
|
7
|
+
* Protractor-specific implementation of [`RootLocator`](https://serenity-js.org/api/web/class/RootLocator/).
|
|
8
8
|
*
|
|
9
9
|
* @group Models
|
|
10
10
|
*/
|
|
@@ -56,7 +56,7 @@ import type { Answerable, QuestionAdapter } from '@serenity-js/core';
|
|
|
56
56
|
* ```
|
|
57
57
|
*
|
|
58
58
|
* ## Learn more
|
|
59
|
-
* -
|
|
59
|
+
* - [`BrowseTheWebWithProtractor.param`](https://serenity-js.org/api/protractor/class/BrowseTheWebWithProtractor/#param)
|
|
60
60
|
*
|
|
61
61
|
* @group Questions
|
|
62
62
|
*/
|
|
@@ -60,7 +60,7 @@ const abilities_1 = require("../abilities");
|
|
|
60
60
|
* ```
|
|
61
61
|
*
|
|
62
62
|
* ## Learn more
|
|
63
|
-
* -
|
|
63
|
+
* - [`BrowseTheWebWithProtractor.param`](https://serenity-js.org/api/protractor/class/BrowseTheWebWithProtractor/#param)
|
|
64
64
|
*
|
|
65
65
|
* @group Questions
|
|
66
66
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/protractor",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.25.1",
|
|
4
4
|
"description": "Test your web apps with Serenity/JS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"node": "^16.13 || ^18.12 || ^20"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@serenity-js/core": "3.
|
|
53
|
-
"@serenity-js/rest": "3.
|
|
54
|
-
"@serenity-js/web": "3.
|
|
52
|
+
"@serenity-js/core": "3.25.1",
|
|
53
|
+
"@serenity-js/rest": "3.25.1",
|
|
54
|
+
"@serenity-js/web": "3.25.1",
|
|
55
55
|
"deepmerge": "4.3.1",
|
|
56
56
|
"query-selector-shadow-dom": "1.0.1",
|
|
57
57
|
"tiny-types": "1.22.0"
|
|
@@ -76,11 +76,11 @@
|
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@integration/testing-tools": "3.0.0",
|
|
79
|
-
"@serenity-js/assertions": "3.
|
|
80
|
-
"@serenity-js/cucumber": "3.
|
|
81
|
-
"@serenity-js/jasmine": "3.
|
|
82
|
-
"@serenity-js/local-server": "3.
|
|
83
|
-
"@serenity-js/mocha": "3.
|
|
79
|
+
"@serenity-js/assertions": "3.25.1",
|
|
80
|
+
"@serenity-js/cucumber": "3.25.1",
|
|
81
|
+
"@serenity-js/jasmine": "3.25.1",
|
|
82
|
+
"@serenity-js/local-server": "3.25.1",
|
|
83
|
+
"@serenity-js/mocha": "3.25.1",
|
|
84
84
|
"@serenity-js/web": "3.1.1",
|
|
85
85
|
"@types/chai": "4.3.16",
|
|
86
86
|
"@types/express": "4.17.21",
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
"cross-env": "7.0.3",
|
|
93
93
|
"express": "4.19.2",
|
|
94
94
|
"html-minifier": "4.0.0",
|
|
95
|
-
"mocha": "10.
|
|
95
|
+
"mocha": "10.6.0",
|
|
96
96
|
"mocha-multi": "1.1.7",
|
|
97
97
|
"protractor": "7.0.0",
|
|
98
98
|
"start-server-and-test": "2.0.4",
|
|
99
99
|
"ts-node": "10.9.2",
|
|
100
100
|
"typescript": "5.2.2"
|
|
101
101
|
},
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "450b994115cf9f1a1547ef92ac9387e0c57821ce"
|
|
103
103
|
}
|
package/src/adapter/Config.ts
CHANGED
|
@@ -7,14 +7,14 @@ import type { Config as ProtractorConfig } from 'protractor';
|
|
|
7
7
|
*
|
|
8
8
|
* ## Learn more
|
|
9
9
|
* - [Protractor config](https://github.com/angular/protractor/blob/master/lib/config.ts)
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
10
|
+
* - [`SerenityConfig`](https://serenity-js.org/api/core/class/SerenityConfig/)
|
|
11
|
+
* - [`configure`](https://serenity-js.org/api/core/function/configure/)
|
|
12
12
|
*
|
|
13
13
|
* @group Configuration
|
|
14
14
|
*/
|
|
15
15
|
export interface Config extends ProtractorConfig {
|
|
16
16
|
/**
|
|
17
|
-
* See
|
|
17
|
+
* See [`SerenityConfig`](https://serenity-js.org/api/core/class/SerenityConfig/)
|
|
18
18
|
*/
|
|
19
19
|
serenity: SerenityConfig & { runner?: string };
|
|
20
20
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { SpecResult } from 'protractor/built/plugins';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* A JSON object which needs to be returned to Protractor
|
|
4
|
+
* A JSON object which needs to be returned to Protractor
|
|
5
|
+
* when [`ProtractorFrameworkAdapter`](https://serenity-js.org/api/protractor-adapter/function/run/)
|
|
5
6
|
* is done with executing the test scenarios.
|
|
6
7
|
*
|
|
7
8
|
* ## Learn more
|
|
@@ -4,7 +4,7 @@ import type { Config as ProtractorConfig } from 'protractor';
|
|
|
4
4
|
import type { TestRunnerLoader } from './TestRunnerLoader';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Detects the
|
|
7
|
+
* Detects the [`TestRunnerAdapter`](https://serenity-js.org/api/core-adapter/interface/TestRunnerAdapter/) to use,
|
|
8
8
|
* based on Protractor configuration.
|
|
9
9
|
*
|
|
10
10
|
* @group Integration
|
|
@@ -6,7 +6,7 @@ import type { CucumberConfig } from '@serenity-js/cucumber/lib/adapter';
|
|
|
6
6
|
import type { CucumberAdapterConfig } from './CucumberAdapterConfig';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Loads a
|
|
9
|
+
* Loads a [`TestRunnerAdapter`](https://serenity-js.org/api/core-adapter/interface/TestRunnerAdapter/) needed to invoke
|
|
10
10
|
* the chosen test runner programmatically.
|
|
11
11
|
*
|
|
12
12
|
* @group Integration
|
|
@@ -21,9 +21,9 @@ export class TestRunnerLoader {
|
|
|
21
21
|
* @param cwd
|
|
22
22
|
* Current working directory; used to resolve glob paths to files for Cucumber.js to `require`,
|
|
23
23
|
* and instructing Serenity/JS where to look for this module's optional
|
|
24
|
-
* dependencies, like [`@serenity-js/cucumber`](/api/cucumber),
|
|
25
|
-
* [`@serenity-js/mocha`](/api/mocha),
|
|
26
|
-
* [`@serenity-js/jasmine`](/api/jasmine), etc.
|
|
24
|
+
* dependencies, like [`@serenity-js/cucumber`](https://serenity-js.org/api/cucumber),
|
|
25
|
+
* [`@serenity-js/mocha`](https://serenity-js.org/api/mocha),
|
|
26
|
+
* [`@serenity-js/jasmine`](https://serenity-js.org/api/jasmine), etc.
|
|
27
27
|
*
|
|
28
28
|
* @param runnerId
|
|
29
29
|
* Unique identifier used to differentiate output files produced by native Cucumber.js formatters.
|
|
@@ -36,7 +36,7 @@ export class TestRunnerLoader {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* See
|
|
39
|
+
* See [`JasmineConfig`](https://serenity-js.org/api/jasmine-adapter/interface/JasmineConfig/)
|
|
40
40
|
*
|
|
41
41
|
* @param jasmineNodeOpts
|
|
42
42
|
*/
|
|
@@ -46,7 +46,7 @@ export class TestRunnerLoader {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* See
|
|
49
|
+
* See [`MochaConfig`](https://serenity-js.org/api/mocha-adapter/interface/MochaConfig/)
|
|
50
50
|
*
|
|
51
51
|
* @param mochaOpts
|
|
52
52
|
*/
|
|
@@ -56,7 +56,7 @@ export class TestRunnerLoader {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* See
|
|
59
|
+
* See [`CucumberConfig`](https://serenity-js.org/api/cucumber-adapter/interface/CucumberConfig/)
|
|
60
60
|
*
|
|
61
61
|
* @param cucumberOpts
|
|
62
62
|
* @param adapterConfig
|
|
@@ -5,8 +5,8 @@ import type * as protractor from 'protractor';
|
|
|
5
5
|
import { ProtractorBrowsingSession } from '../models';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* This implementation of the
|
|
9
|
-
* enables the
|
|
8
|
+
* This implementation of the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
9
|
+
* enables the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to interact with web front-ends using [Protractor](http://www.protractortest.org/#/).
|
|
10
10
|
*
|
|
11
11
|
* ## Using Protractor to `BrowseTheWeb`
|
|
12
12
|
*
|
|
@@ -32,9 +32,9 @@ import { ProtractorBrowsingSession } from '../models';
|
|
|
32
32
|
*
|
|
33
33
|
* ## Learn more
|
|
34
34
|
* - [Protractor website](https://www.protractortest.org/)
|
|
35
|
-
* -
|
|
36
|
-
* -
|
|
37
|
-
* -
|
|
35
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
36
|
+
* - [`Ability`](https://serenity-js.org/api/core/class/Ability/)
|
|
37
|
+
* - [`Actor`](https://serenity-js.org/api/core/class/Actor/)
|
|
38
38
|
*
|
|
39
39
|
* @group Abilities
|
|
40
40
|
*/
|
|
@@ -93,7 +93,7 @@ export class BrowseTheWebWithProtractor extends BrowseTheWeb<protractor.ElementF
|
|
|
93
93
|
* @param path
|
|
94
94
|
* Either a name or a dot-delimited path to the param.
|
|
95
95
|
*
|
|
96
|
-
* @throws
|
|
96
|
+
* @throws [`ConfigurationError`](https://serenity-js.org/api/core/class/ConfigurationError/)
|
|
97
97
|
* Throws a `ConfigurationError` if the parameter is `undefined`
|
|
98
98
|
*/
|
|
99
99
|
param<T = any>(path: string): T {
|
|
@@ -4,7 +4,7 @@ import { BrowseTheWebWithProtractor } from '../abilities';
|
|
|
4
4
|
import type { ProtractorPage } from '../models';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Instructs the
|
|
7
|
+
* Instructs the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to enable or disable automated synchronisation between Protractor and Angular 1.x application.
|
|
8
8
|
*
|
|
9
9
|
* Useful when a test scenario needs to interact with both Angular-based
|
|
10
10
|
* and non-Angular web apps, e.g. use an external sign-in form.
|
|
@@ -56,7 +56,7 @@ import type { ProtractorPage } from '../models';
|
|
|
56
56
|
export class UseAngular {
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* Produces an
|
|
59
|
+
* Produces an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/) that instructs the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to disable
|
|
60
60
|
* synchronisation between Protractor and an Angular 1.x app.
|
|
61
61
|
*/
|
|
62
62
|
static disableSynchronisation(): Interaction {
|
|
@@ -68,7 +68,7 @@ export class UseAngular {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
|
-
* Produces an
|
|
71
|
+
* Produces an [`Interaction`](https://serenity-js.org/api/core/class/Interaction/) that instructs the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to enable
|
|
72
72
|
* synchronisation between Protractor and an Angular 1.x app.
|
|
73
73
|
*/
|
|
74
74
|
static enableSynchronisation(): Interaction {
|
|
@@ -9,7 +9,7 @@ import { ProtractorErrorHandler } from './ProtractorErrorHandler';
|
|
|
9
9
|
import { ProtractorModalDialogHandler } from './ProtractorModalDialogHandler';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Protractor-specific implementation of
|
|
12
|
+
* Protractor-specific implementation of [`BrowsingSession`](https://serenity-js.org/api/web/class/BrowsingSession/).
|
|
13
13
|
*
|
|
14
14
|
* @group Models
|
|
15
15
|
*/
|
|
@@ -7,7 +7,7 @@ import { ensure, isDefined } from 'tiny-types';
|
|
|
7
7
|
import { promised } from '../promised';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Protractor-specific implementation of
|
|
10
|
+
* Protractor-specific implementation of [`Cookie`](https://serenity-js.org/api/web/class/Cookie/).
|
|
11
11
|
*
|
|
12
12
|
* @group Models
|
|
13
13
|
*/
|
|
@@ -7,7 +7,7 @@ import { promised } from '../promised';
|
|
|
7
7
|
import type { ProtractorErrorHandler } from './ProtractorErrorHandler';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Protractor-specific implementation of
|
|
10
|
+
* Protractor-specific implementation of [`ModalDialogHandler`](https://serenity-js.org/api/web/class/ModalDialogHandler/).
|
|
11
11
|
*
|
|
12
12
|
* @group Models
|
|
13
13
|
*/
|
|
@@ -15,7 +15,7 @@ import type { ProtractorErrorHandler } from './ProtractorErrorHandler';
|
|
|
15
15
|
import { ProtractorPageElement } from './ProtractorPageElement';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Protractor-specific implementation of
|
|
18
|
+
* Protractor-specific implementation of [`Page`](https://serenity-js.org/api/web/class/Page/).
|
|
19
19
|
*
|
|
20
20
|
* @group Models
|
|
21
21
|
*/
|
|
@@ -9,7 +9,7 @@ import { promised } from '../promised';
|
|
|
9
9
|
import type { ProtractorLocator } from './locators';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Protractor-specific implementation of
|
|
12
|
+
* Protractor-specific implementation of [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
13
13
|
*
|
|
14
14
|
* @group Models
|
|
15
15
|
*/
|
|
@@ -188,6 +188,15 @@ export class ProtractorPageElement extends PageElement<ElementFinder> {
|
|
|
188
188
|
));
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
+
async html(): Promise<string> {
|
|
192
|
+
const element: ElementFinder = await this.nativeElement();
|
|
193
|
+
const webElement: WebElement = await element.getWebElement();
|
|
194
|
+
|
|
195
|
+
return await promised(
|
|
196
|
+
webElement.getDriver().executeScript('return arguments[0].outerHTML;', webElement),
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
191
200
|
async switchTo(): Promise<SwitchableOrigin> {
|
|
192
201
|
const element: ElementFinder = await this.locator.nativeElement();
|
|
193
202
|
|
|
@@ -10,7 +10,7 @@ import type { ProtractorRootLocator } from './ProtractorRootLocator';
|
|
|
10
10
|
import { ProtractorSelectors } from './ProtractorSelectors';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* Protractor-specific implementation of
|
|
13
|
+
* Protractor-specific implementation of [`Locator`](https://serenity-js.org/api/web/class/Locator/).
|
|
14
14
|
*
|
|
15
15
|
* @group Models
|
|
16
16
|
*/
|
|
@@ -4,7 +4,7 @@ import type * as protractor from 'protractor';
|
|
|
4
4
|
import { promised } from '../../promised';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Protractor-specific implementation of
|
|
7
|
+
* Protractor-specific implementation of [`RootLocator`](https://serenity-js.org/api/web/class/RootLocator/).
|
|
8
8
|
*
|
|
9
9
|
* @group Models
|
|
10
10
|
*/
|
|
@@ -61,7 +61,7 @@ import { BrowseTheWebWithProtractor } from '../abilities';
|
|
|
61
61
|
* ```
|
|
62
62
|
*
|
|
63
63
|
* ## Learn more
|
|
64
|
-
* -
|
|
64
|
+
* - [`BrowseTheWebWithProtractor.param`](https://serenity-js.org/api/protractor/class/BrowseTheWebWithProtractor/#param)
|
|
65
65
|
*
|
|
66
66
|
* @group Questions
|
|
67
67
|
*/
|