@serenity-js/protractor 3.0.0-rc.41 → 3.0.0-rc.43

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 CHANGED
@@ -3,6 +3,26 @@
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.0.0-rc.43](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.42...v3.0.0-rc.43) (2023-03-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **deps:** update dependency deepmerge to ^4.3.0 ([ac08d09](https://github.com/serenity-js/serenity-js/commit/ac08d091eb61a666c9b9c53209b59fe7157c06d9))
12
+ * **protractor:** default actors receive abilities to BrowseTheWebWithProtractor and TakeNotes ([edcf734](https://github.com/serenity-js/serenity-js/commit/edcf73426827ad76427deb457786b163423aaf96)), closes [#1523](https://github.com/serenity-js/serenity-js/issues/1523)
13
+
14
+
15
+
16
+
17
+
18
+ # [3.0.0-rc.42](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.41...v3.0.0-rc.42) (2023-02-12)
19
+
20
+ **Note:** Version bump only for package @serenity-js/protractor
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.0.0-rc.41](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.40...v3.0.0-rc.41) (2023-02-07)
7
27
 
8
28
 
package/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Serenity/JS
2
2
 
3
+ [![Follow Serenity/JS on LinkedIn](https://img.shields.io/badge/Follow-Serenity%2FJS%20-0077B5?logo=linkedin)](https://www.linkedin.com/company/serenity-js)
4
+ [![Watch Serenity/JS on YouTube](https://img.shields.io/badge/Watch-@serenity--js-E62117?logo=youtube)](https://www.youtube.com/@serenity-js)
5
+ [![Join Serenity/JS Community Chat](https://img.shields.io/badge/Chat-Serenity%2FJS%20Community-FBD30B?logo=matrix)](https://matrix.to/#/#serenity-js:gitter.im)
6
+ [![Support Serenity/JS on GitHub](https://img.shields.io/badge/Support-@serenity--js-703EC8?logo=github)](https://matrix.to/#/#serenity-js:gitter.im)
7
+
3
8
  [Serenity/JS](https://serenity-js.org) is a framework designed to make acceptance and regression testing
4
9
  of modern full-stack applications faster, more collaborative and easier to scale.
5
10
 
@@ -10,7 +15,7 @@ and [API docs](https://serenity-js.org/modules/), and follow [@SerenityJS](https
10
15
 
11
16
  To learn more about Serenity/JS, check out the video below, read the [tutorial](https://serenity-js.org/handbook/thinking-in-serenity-js/index.html), review the [examples](https://github.com/serenity-js/serenity-js/tree/main/examples), and create your own test suite with [Serenity/JS template projects](https://github.com/serenity-js).
12
17
 
13
- If you have any questions, join us on [Serenity/JS Community Chat](https://gitter.im/serenity-js/Lobby).
18
+ If you have any questions, join us on the [Serenity/JS Community Chat](https://matrix.to/#/#serenity-js:gitter.im).
14
19
 
15
20
  [![Full-Stack Acceptance Testing with Serenity/JS and the Screenplay Pattern](https://img.youtube.com/vi/djPMf-n93Rw/0.jpg)](https://www.youtube.com/watch?v=djPMf-n93Rw)
16
21
 
@@ -87,10 +92,12 @@ exports.config = {
87
92
  // runner: 'cucumber',
88
93
  // runner: 'mocha',
89
94
  crew: [
90
- ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
91
- ConsoleReporter.forDarkTerminals(),
92
- Photographer.whoWill(TakePhotosOfFailures), // or Photographer.whoWill(TakePhotosOfInteractions),
93
- new SerenityBDDReporter(),
95
+ '@serenity-js/console-reporter',
96
+ '@serenity-js/serenity-bdd',
97
+ [ '@serenity-js/core:ArtifactArchiver', { outputDirectory: './target/site/serenity' } ],
98
+ [ '@serenity-js/web:Photographer', {
99
+ strategy: 'TakePhotosOfFailures', // or: 'TakePhotosOfInteractions'
100
+ } ],
94
101
  ]
95
102
  },
96
103
 
@@ -1 +1 @@
1
- {"version":3,"file":"ProtractorFrameworkAdapter.d.ts","sourceRoot":"","sources":["../../src/adapter/ProtractorFrameworkAdapter.ts"],"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;CASxB"}
@@ -8,6 +8,8 @@ const browser_detector_1 = require("./browser-detector");
8
8
  const reporter_1 = require("./reporter");
9
9
  const runner_1 = require("./runner");
10
10
  const deepmerge = require("deepmerge");
11
+ const core_2 = require("@serenity-js/core");
12
+ const screenplay_1 = require("../screenplay");
11
13
  const querySelectorShadowDomPlugin = require('query-selector-shadow-dom/plugins/protractor'); // eslint-disable-line @typescript-eslint/no-var-requires
12
14
  /**
13
15
  * @private
@@ -34,7 +36,7 @@ class ProtractorFrameworkAdapter {
34
36
  });
35
37
  this.serenity.configure({
36
38
  cueTimeout: config.serenity.cueTimeout,
37
- actors: config.serenity.actors,
39
+ actors: config.serenity.actors || core_1.Cast.where(actor => actor.whoCan(screenplay_1.BrowseTheWebWithProtractor.using(protractor_1.protractor.browser), core_2.TakeNotes.usingAnEmptyNotepad())),
38
40
  diffFormatter: (_e = config.serenity.diffFormatter) !== null && _e !== void 0 ? _e : new core_1.AnsiDiffFormatter(),
39
41
  crew: [
40
42
  browser_detector_1.BrowserDetector.with(browser_detector_1.StandardisedCapabilities.of(() => protractor_1.protractor.browser)),
@@ -1 +1 @@
1
- {"version":3,"file":"ProtractorFrameworkAdapter.js","sourceRoot":"","sources":["../../src/adapter/ProtractorFrameworkAdapter.ts"],"names":[],"mappings":";;;AAAA,4CAAkF;AAClF,2CAAgD;AAChD,oDAAkD;AAElD,yDAA+E;AAE/E,yCAAkE;AAClE,qCAA8C;AAC9C,uCAAwC;AAExC,MAAM,4BAA4B,GAAG,OAAO,CAAC,8CAA8C,CAAC,CAAC,CAAG,yDAAyD;AAEzJ;;GAEG;AACH,MAAa,0BAA0B;IACnC,YACqB,QAAkB,EAClB,gBAAwB,EACxB,QAA4B;QAF5B,aAAQ,GAAR,QAAQ,CAAU;QAClB,qBAAgB,GAAhB,gBAAgB,CAAQ;QACxB,aAAQ,GAAR,QAAQ,CAAoB;IAEjD,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,KAAe;;QAEf,IAAI,CAAE,CA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;aACnB,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,2BAAkB,CAAC,oBAAoB,EAAE,CAAC,CAAC;aAC5F,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC9B,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;aACxB,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,EAAE,CAAC;aACzC,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACvC,CAAC;IAEO,aAAa;QACjB,OAAO;YACH,QAAQ,EAAE;gBACN,IAAI,EAAE;oBACF,uBAAgB,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,sBAAsB,CAAC;iBAC7E;aACJ;SACJ,CAAC;IACN,CAAC;CACJ;AAxDD,gEAwDC;AAED,eAAe;AACf,SAAS,IAAI;IACT,QAAQ;AACZ,CAAC"}
@@ -47,7 +47,7 @@ import { Interaction } from '@serenity-js/core';
47
47
  *
48
48
  * - [Cross-application testing with Serenity/JS](https://janmolak.com/cross-application-testing-with-serenity-js-4103a272b75b)
49
49
  *
50
- * @group Interactions
50
+ * @group Activities
51
51
  */
52
52
  export declare class UseAngular {
53
53
  /**
@@ -51,7 +51,7 @@ const abilities_1 = require("../abilities");
51
51
  *
52
52
  * - [Cross-application testing with Serenity/JS](https://janmolak.com/cross-application-testing-with-serenity-js-4103a272b75b)
53
53
  *
54
- * @group Interactions
54
+ * @group Activities
55
55
  */
56
56
  class UseAngular {
57
57
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serenity-js/protractor",
3
- "version": "3.0.0-rc.41",
3
+ "version": "3.0.0-rc.43",
4
4
  "description": "Test your web apps with Serenity/JS",
5
5
  "author": {
6
6
  "name": "Jan Molak",
@@ -48,9 +48,9 @@
48
48
  "npm": "^6 || ^7 || ^8"
49
49
  },
50
50
  "dependencies": {
51
- "@serenity-js/assertions": "3.0.0-rc.41",
52
- "@serenity-js/core": "3.0.0-rc.41",
53
- "deepmerge": "^4.2.2",
51
+ "@serenity-js/assertions": "3.0.0-rc.43",
52
+ "@serenity-js/core": "3.0.0-rc.43",
53
+ "deepmerge": "^4.3.0",
54
54
  "query-selector-shadow-dom": "^1.0.1",
55
55
  "selenium-webdriver": "^3.6.0",
56
56
  "tiny-types": "^1.19.0"
@@ -74,19 +74,19 @@
74
74
  },
75
75
  "devDependencies": {
76
76
  "@integration/testing-tools": "3.0.0",
77
- "@serenity-js/cucumber": "3.0.0-rc.41",
78
- "@serenity-js/jasmine": "3.0.0-rc.41",
79
- "@serenity-js/local-server": "3.0.0-rc.41",
80
- "@serenity-js/mocha": "3.0.0-rc.41",
81
- "@serenity-js/rest": "3.0.0-rc.41",
82
- "@serenity-js/web": "3.0.0-rc.41",
77
+ "@serenity-js/cucumber": "3.0.0-rc.43",
78
+ "@serenity-js/jasmine": "3.0.0-rc.43",
79
+ "@serenity-js/local-server": "3.0.0-rc.43",
80
+ "@serenity-js/mocha": "3.0.0-rc.43",
81
+ "@serenity-js/rest": "3.0.0-rc.43",
82
+ "@serenity-js/web": "3.0.0-rc.43",
83
83
  "@types/chai": "^4.3.4",
84
- "@types/express": "^4.17.15",
84
+ "@types/express": "^4.17.17",
85
85
  "@types/html-minifier": "^4.0.2",
86
86
  "@types/mocha": "^10.0.1",
87
87
  "@types/selenium-webdriver": "^3.0.20",
88
88
  "axios": "^1.2.2",
89
- "body-parser": "^1.20.1",
89
+ "body-parser": "^1.20.2",
90
90
  "cross-env": "^7.0.3",
91
91
  "express": "^4.18.2",
92
92
  "html-minifier": "^4.0.0",
@@ -94,9 +94,9 @@
94
94
  "nyc": "15.1.0",
95
95
  "protractor": "^7.0.0",
96
96
  "selenium-webdriver": "^3.6.0",
97
- "start-server-and-test": "^1.15.2",
97
+ "start-server-and-test": "^1.15.4",
98
98
  "ts-node": "^10.9.1",
99
- "typescript": "^4.9.4"
99
+ "typescript": "^4.9.5"
100
100
  },
101
- "gitHead": "e74f8f4989f18fe37edde3f8500b2084289d385b"
101
+ "gitHead": "683d2fc1fd69444369b666d4318da95f8a5951fc"
102
102
  }
@@ -1,4 +1,4 @@
1
- import { AnsiDiffFormatter, ArtifactArchiver, Serenity } from '@serenity-js/core';
1
+ import { AnsiDiffFormatter, ArtifactArchiver, Cast, Serenity } from '@serenity-js/core';
2
2
  import { protractor, Runner } from 'protractor';
3
3
  import { isRecord } from 'tiny-types/lib/objects';
4
4
 
@@ -7,6 +7,9 @@ import { Config } from './Config';
7
7
  import { ProtractorReport, ProtractorReporter } from './reporter';
8
8
  import { TestRunnerDetector } from './runner';
9
9
  import deepmerge = require('deepmerge');
10
+ import { TakeNotes } from '@serenity-js/core';
11
+
12
+ import { BrowseTheWebWithProtractor } from '../screenplay';
10
13
 
11
14
  const querySelectorShadowDomPlugin = require('query-selector-shadow-dom/plugins/protractor'); // eslint-disable-line @typescript-eslint/no-var-requires
12
15
 
@@ -40,7 +43,10 @@ export class ProtractorFrameworkAdapter {
40
43
 
41
44
  this.serenity.configure({
42
45
  cueTimeout: config.serenity.cueTimeout,
43
- actors: config.serenity.actors,
46
+ actors: config.serenity.actors || Cast.where(actor => actor.whoCan(
47
+ BrowseTheWebWithProtractor.using(protractor.browser),
48
+ TakeNotes.usingAnEmptyNotepad(),
49
+ )),
44
50
  diffFormatter: config.serenity.diffFormatter ?? new AnsiDiffFormatter(),
45
51
  crew: [
46
52
  BrowserDetector.with(StandardisedCapabilities.of(() => protractor.browser)),
@@ -51,7 +51,7 @@ import { ProtractorPage } from '../models';
51
51
  *
52
52
  * - [Cross-application testing with Serenity/JS](https://janmolak.com/cross-application-testing-with-serenity-js-4103a272b75b)
53
53
  *
54
- * @group Interactions
54
+ * @group Activities
55
55
  */
56
56
  export class UseAngular {
57
57