@serenity-js/web 3.10.1 → 3.10.3

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,25 @@
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.10.3](https://github.com/serenity-js/serenity-js/compare/v3.10.2...v3.10.3) (2023-09-15)
7
+
8
+ **Note:** Version bump only for package @serenity-js/web
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.10.2](https://github.com/serenity-js/serenity-js/compare/v3.10.1...v3.10.2) (2023-09-10)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **core:** updated installation instruction in the README ([ec3f277](https://github.com/serenity-js/serenity-js/commit/ec3f2778334abbd7324497ceaa2df9f0560a103e)), closes [#1915](https://github.com/serenity-js/serenity-js/issues/1915)
20
+
21
+
22
+
23
+
24
+
6
25
  ## [3.10.1](https://github.com/serenity-js/serenity-js/compare/v3.10.0...v3.10.1) (2023-09-01)
7
26
 
8
27
  **Note:** Version bump only for package @serenity-js/web
package/README.md CHANGED
@@ -9,9 +9,10 @@
9
9
  of complex software systems faster, more collaborative and easier to scale.
10
10
 
11
11
  ⭐️ Get started with Serenity/JS!
12
- - [Serenity/JS Handbook](https://serenity-js.org/handbook) and [tutorial](https://serenity-js.org/handbook/web-testing/your-first-web-scenario),
13
- - [API documentation](https://serenity-js.org/api/core),
14
- - [Serenity/JS project templates on GitHub](https://serenity-js.org/handbook/getting-started#serenityjs-project-templates).
12
+ - [Serenity/JS web testing tutorial](https://serenity-js.org/handbook/web-testing/your-first-web-scenario)
13
+ - [Serenity/JS Handbook](https://serenity-js.org/handbook) and [Getting Started guides](https://serenity-js.org/handbook/getting-started/)
14
+ - [API documentation](https://serenity-js.org/api/core)
15
+ - [Serenity/JS Project Templates on GitHub](https://serenity-js.org/handbook/getting-started#serenityjs-project-templates)
15
16
 
16
17
  👋 Join the Serenity/JS Community!
17
18
  - Meet other Serenity/JS developers and maintainers on the [Serenity/JS Community chat channel](https://matrix.to/#/#serenity-js:gitter.im),
@@ -5,7 +5,7 @@ import * as strategies from './strategies';
5
5
  * The Photographer is a {@apilink StageCrewMember} who takes screenshots
6
6
  * using the web browser associated with the {@apilink Actor} that is currently {@apilink actorInTheSpotlight|in the spotlight}.
7
7
  *
8
- * ## Programmatically assigning the `Photographer` to the {@apilink Stage}
8
+ * ## Registering Photographer programmatically
9
9
  *
10
10
  * ```ts
11
11
  * import { configure, ArtifactArchiver } from '@serenity-js/core'
@@ -19,12 +19,43 @@ import * as strategies from './strategies';
19
19
  * })
20
20
  * ```
21
21
  *
22
+ * ## Using Photographer with Playwright Test
23
+ *
24
+ * ```ts
25
+ * // playwright.config.ts
26
+ * import type { PlaywrightTestConfig } from '@serenity-js/playwright-test'
27
+ *
28
+ * const config: PlaywrightTestConfig = {
29
+ * reporter: [
30
+ * [ '@serenity-js/playwright-test', {
31
+ * crew: [
32
+ * '@serenity-js/serenity-bdd',
33
+ * [ '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
34
+ * ]
35
+ * // other Serenity/JS config
36
+ * }]
37
+ * ],
38
+ *
39
+ * use: {
40
+ * crew: [
41
+ * [ '@serenity-js/web:Photographer', {
42
+ * strategy: 'TakePhotosOfFailures',
43
+ * // strategy: 'TakePhotosOfInteractions',
44
+ * } ]
45
+ * ],
46
+ * },
47
+ * };
48
+ * export default config;
49
+ * ```
50
+ *
51
+ * #### Learn more
52
+ * - {@apilink SerenityOptions}
53
+ *
22
54
  * ## Using `Photographer` with WebdriverIO
23
55
  *
24
56
  * ```ts
25
57
  * // wdio.conf.ts
26
58
  * import { ArtifactArchiver } from '@serenity-js/core'
27
- * import { Photographer, TakePhotosOfFailures } from '@serenity-js/web'
28
59
  * import { WebdriverIOConfig } from '@serenity-js/webdriverio'
29
60
  *
30
61
  * export const config: WebdriverIOConfig= {
@@ -43,8 +74,12 @@ import * as strategies from './strategies';
43
74
  *
44
75
  * // Register StageCrewMembers we've imported at the top of this file
45
76
  * crew: [
46
- * ArtifactArchiver.storingArtifactsAt(process.cwd(), 'target/site/serenity'),
47
- * Photographer.whoWill(TakePhotosOfFailures),
77
+ * '@serenity-js/serenity-bdd',
78
+ * [ '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
79
+ * [ '@serenity-js/web:Photographer', {
80
+ * strategy: 'TakePhotosOfFailures',
81
+ * // strategy: 'TakePhotosOfInteractions',
82
+ * } ]
48
83
  * ]
49
84
  * },
50
85
  *
@@ -52,32 +87,10 @@ import * as strategies from './strategies';
52
87
  * }
53
88
  * ```
54
89
  *
55
- * ## Using `Photographer` with Playwright Test
56
- *
57
- * ```ts
58
- * // playwright.config.ts
59
- * import type { PlaywrightTestConfig } from '@serenity-js/playwright-test'
60
- *
61
- * const config: PlaywrightTestConfig = {
62
- * use: {
63
- * crew: [
64
- * [ '@serenity-js/web:Photographer', { strategy: 'TakePhotosOfFailures' } ] // or 'TakePhotosOfInteractions'
65
- * ],
66
- * },
67
- * };
68
- * export default config;
69
- * ```
70
- *
71
- * #### Learn more
72
- * - {@apilink SerenityOptions}
73
- *
74
90
  * ## Using `Photographer` with Protractor
75
91
  *
76
92
  * ```ts
77
93
  * // protractor.conf.js
78
- * const { ArtifactArchiver } = require('@serenity-js/core')
79
- * const { Photographer, TakePhotosOfFailures } = require('@serenity-js/web')
80
- *
81
94
  * exports.config = {
82
95
  *
83
96
  * // Tell Protractor to use the Serenity/JS framework Protractor Adapter
@@ -85,16 +98,20 @@ import * as strategies from './strategies';
85
98
  * frameworkPath: require.resolve('@serenity-js/protractor/adapter'),
86
99
  *
87
100
  * serenity: {
88
- * runner: 'jasmine',
89
- * // runner: 'cucumber',
90
- * // runner: 'mocha',
91
- * crew: [
92
- * ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
93
- * Photographer.whoWill(TakePhotosOfFailures),
94
- * ]
95
- * },
96
- *
97
- * // ... rest of the config omitted for brevity
101
+ * runner: 'jasmine',
102
+ * // runner: 'cucumber',
103
+ * // runner: 'mocha',
104
+ * crew: [
105
+ * @serenity-js/serenity-bdd',
106
+ * '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
107
+ * '@serenity-js/web:Photographer', {
108
+ * strategy: 'TakePhotosOfFailures',
109
+ * // strategy: 'TakePhotosOfInteractions',
110
+ * ]
111
+ * ]
112
+ * },
113
+ *
114
+ * // ... rest of the config omitted for brevity
98
115
  * }
99
116
  * ```
100
117
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Photographer.d.ts","sourceRoot":"","sources":["../../../../src/stage/crew/photographer/Photographer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiIG;AACH,qBAAa,YAAa,YAAW,eAAe;IAqC5C,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,KAAK,CAAC;IApClB;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,UAAU,CAAC,mBAAmB,GAAG,eAAe;IAInF;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,MAAM,OAAO,UAAU,EAAE,qBAAqB,CAAC,CAAA;KAAE,GAAG,eAAe;gBAkBzF,mBAAmB,EAAE,UAAU,CAAC,mBAAmB,EAC5D,KAAK,CAAC,EAAE,KAAK;IAIzB;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe;IAKzC;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAarC"}
1
+ {"version":3,"file":"Photographer.d.ts","sourceRoot":"","sources":["../../../../src/stage/crew/photographer/Photographer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkJG;AACH,qBAAa,YAAa,YAAW,eAAe;IAqC5C,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,KAAK,CAAC;IApClB;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,UAAU,CAAC,mBAAmB,GAAG,eAAe;IAInF;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,MAAM,OAAO,UAAU,EAAE,qBAAqB,CAAC,CAAA;KAAE,GAAG,eAAe;gBAkBzF,mBAAmB,EAAE,UAAU,CAAC,mBAAmB,EAC5D,KAAK,CAAC,EAAE,KAAK;IAIzB;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe;IAKzC;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAarC"}
@@ -31,7 +31,7 @@ const strategies = __importStar(require("./strategies"));
31
31
  * The Photographer is a {@apilink StageCrewMember} who takes screenshots
32
32
  * using the web browser associated with the {@apilink Actor} that is currently {@apilink actorInTheSpotlight|in the spotlight}.
33
33
  *
34
- * ## Programmatically assigning the `Photographer` to the {@apilink Stage}
34
+ * ## Registering Photographer programmatically
35
35
  *
36
36
  * ```ts
37
37
  * import { configure, ArtifactArchiver } from '@serenity-js/core'
@@ -45,12 +45,43 @@ const strategies = __importStar(require("./strategies"));
45
45
  * })
46
46
  * ```
47
47
  *
48
+ * ## Using Photographer with Playwright Test
49
+ *
50
+ * ```ts
51
+ * // playwright.config.ts
52
+ * import type { PlaywrightTestConfig } from '@serenity-js/playwright-test'
53
+ *
54
+ * const config: PlaywrightTestConfig = {
55
+ * reporter: [
56
+ * [ '@serenity-js/playwright-test', {
57
+ * crew: [
58
+ * '@serenity-js/serenity-bdd',
59
+ * [ '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
60
+ * ]
61
+ * // other Serenity/JS config
62
+ * }]
63
+ * ],
64
+ *
65
+ * use: {
66
+ * crew: [
67
+ * [ '@serenity-js/web:Photographer', {
68
+ * strategy: 'TakePhotosOfFailures',
69
+ * // strategy: 'TakePhotosOfInteractions',
70
+ * } ]
71
+ * ],
72
+ * },
73
+ * };
74
+ * export default config;
75
+ * ```
76
+ *
77
+ * #### Learn more
78
+ * - {@apilink SerenityOptions}
79
+ *
48
80
  * ## Using `Photographer` with WebdriverIO
49
81
  *
50
82
  * ```ts
51
83
  * // wdio.conf.ts
52
84
  * import { ArtifactArchiver } from '@serenity-js/core'
53
- * import { Photographer, TakePhotosOfFailures } from '@serenity-js/web'
54
85
  * import { WebdriverIOConfig } from '@serenity-js/webdriverio'
55
86
  *
56
87
  * export const config: WebdriverIOConfig= {
@@ -69,8 +100,12 @@ const strategies = __importStar(require("./strategies"));
69
100
  *
70
101
  * // Register StageCrewMembers we've imported at the top of this file
71
102
  * crew: [
72
- * ArtifactArchiver.storingArtifactsAt(process.cwd(), 'target/site/serenity'),
73
- * Photographer.whoWill(TakePhotosOfFailures),
103
+ * '@serenity-js/serenity-bdd',
104
+ * [ '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
105
+ * [ '@serenity-js/web:Photographer', {
106
+ * strategy: 'TakePhotosOfFailures',
107
+ * // strategy: 'TakePhotosOfInteractions',
108
+ * } ]
74
109
  * ]
75
110
  * },
76
111
  *
@@ -78,32 +113,10 @@ const strategies = __importStar(require("./strategies"));
78
113
  * }
79
114
  * ```
80
115
  *
81
- * ## Using `Photographer` with Playwright Test
82
- *
83
- * ```ts
84
- * // playwright.config.ts
85
- * import type { PlaywrightTestConfig } from '@serenity-js/playwright-test'
86
- *
87
- * const config: PlaywrightTestConfig = {
88
- * use: {
89
- * crew: [
90
- * [ '@serenity-js/web:Photographer', { strategy: 'TakePhotosOfFailures' } ] // or 'TakePhotosOfInteractions'
91
- * ],
92
- * },
93
- * };
94
- * export default config;
95
- * ```
96
- *
97
- * #### Learn more
98
- * - {@apilink SerenityOptions}
99
- *
100
116
  * ## Using `Photographer` with Protractor
101
117
  *
102
118
  * ```ts
103
119
  * // protractor.conf.js
104
- * const { ArtifactArchiver } = require('@serenity-js/core')
105
- * const { Photographer, TakePhotosOfFailures } = require('@serenity-js/web')
106
- *
107
120
  * exports.config = {
108
121
  *
109
122
  * // Tell Protractor to use the Serenity/JS framework Protractor Adapter
@@ -111,16 +124,20 @@ const strategies = __importStar(require("./strategies"));
111
124
  * frameworkPath: require.resolve('@serenity-js/protractor/adapter'),
112
125
  *
113
126
  * serenity: {
114
- * runner: 'jasmine',
115
- * // runner: 'cucumber',
116
- * // runner: 'mocha',
117
- * crew: [
118
- * ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
119
- * Photographer.whoWill(TakePhotosOfFailures),
120
- * ]
121
- * },
122
- *
123
- * // ... rest of the config omitted for brevity
127
+ * runner: 'jasmine',
128
+ * // runner: 'cucumber',
129
+ * // runner: 'mocha',
130
+ * crew: [
131
+ * @serenity-js/serenity-bdd',
132
+ * '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
133
+ * '@serenity-js/web:Photographer', {
134
+ * strategy: 'TakePhotosOfFailures',
135
+ * // strategy: 'TakePhotosOfInteractions',
136
+ * ]
137
+ * ]
138
+ * },
139
+ *
140
+ * // ... rest of the config omitted for brevity
124
141
  * }
125
142
  * ```
126
143
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Photographer.js","sourceRoot":"","sources":["../../../../src/stage/crew/photographer/Photographer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAmE;AAEnE,yDAAgF;AAGhF,yDAA2C;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiIG;AACH,MAAa,YAAY;IAErB;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,CAAC,QAAkD;QAC7D,OAAO,IAAI,YAAY,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,MAA4E;QACxF,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,EAAE;YAC3B,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,KAAK,UAAU,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAA,CAAI,yBAAyB;YAErJ,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAkB,CAAC,EAAE;gBACzD,OAAO,IAAI,YAAY,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,QAAkB,CAAC,EAAE,CAAC,CAAC;aACxE;YAED,MAAM,IAAI,yBAAkB,CACxB,IAAK,MAAM,CAAC,QAAS,6CAA6C;gBAClE,yBAA0B,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAE,GAAG,CAC/D,CAAC;SACL;QAED,OAAO,IAAI,YAAY,CAAC,IAAI,UAAU,CAAC,oBAAoB,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,YACqB,mBAAmD,EAC5D,KAAa;QADJ,wBAAmB,GAAnB,mBAAmB,CAAgC;QAC5D,UAAK,GAAL,KAAK,CAAQ;IAEzB,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,KAAY;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,KAAkB;QACvB,IAAI,CAAE,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,IAAI,iBAAU,CAAC,8FAA8F,CAAC,CAAC;SACxH;QAED,IAAI,CAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE;YAClC,OAAO,KAAK,CAAC,CAAC;SACjB;QAED,IAAI,KAAK,YAAY,uBAAc,IAAI,KAAK,YAAY,yBAAgB,EAAE;YACtE,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;SACnE;IACL,CAAC;CACJ;AAxED,oCAwEC"}
1
+ {"version":3,"file":"Photographer.js","sourceRoot":"","sources":["../../../../src/stage/crew/photographer/Photographer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAmE;AAEnE,yDAAgF;AAGhF,yDAA2C;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkJG;AACH,MAAa,YAAY;IAErB;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,CAAC,QAAkD;QAC7D,OAAO,IAAI,YAAY,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,MAA4E;QACxF,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,EAAE;YAC3B,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,KAAK,UAAU,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAA,CAAI,yBAAyB;YAErJ,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAkB,CAAC,EAAE;gBACzD,OAAO,IAAI,YAAY,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,QAAkB,CAAC,EAAE,CAAC,CAAC;aACxE;YAED,MAAM,IAAI,yBAAkB,CACxB,IAAK,MAAM,CAAC,QAAS,6CAA6C;gBAClE,yBAA0B,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAE,GAAG,CAC/D,CAAC;SACL;QAED,OAAO,IAAI,YAAY,CAAC,IAAI,UAAU,CAAC,oBAAoB,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,YACqB,mBAAmD,EAC5D,KAAa;QADJ,wBAAmB,GAAnB,mBAAmB,CAAgC;QAC5D,UAAK,GAAL,KAAK,CAAQ;IAEzB,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,KAAY;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,KAAkB;QACvB,IAAI,CAAE,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,IAAI,iBAAU,CAAC,8FAA8F,CAAC,CAAC;SACxH;QAED,IAAI,CAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE;YAClC,OAAO,KAAK,CAAC,CAAC;SACjB;QAED,IAAI,KAAK,YAAY,uBAAc,IAAI,KAAK,YAAY,yBAAgB,EAAE;YACtE,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;SACnE;IACL,CAAC;CACJ;AAxED,oCAwEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serenity-js/web",
3
- "version": "3.10.1",
3
+ "version": "3.10.3",
4
4
  "description": "Serenity/JS Screenplay Pattern APIs for the Web",
5
5
  "author": {
6
6
  "name": "Jan Molak",
@@ -44,13 +44,13 @@
44
44
  "node": "^16.13 || ^18.12 || ^20"
45
45
  },
46
46
  "dependencies": {
47
- "@serenity-js/assertions": "3.10.1",
48
- "@serenity-js/core": "3.10.1",
47
+ "@serenity-js/assertions": "3.10.3",
48
+ "@serenity-js/core": "3.10.3",
49
49
  "tiny-types": "^1.20.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@integration/testing-tools": "3.0.0",
53
- "@types/chai": "^4.3.5",
53
+ "@types/chai": "^4.3.6",
54
54
  "@types/mocha": "^10.0.1",
55
55
  "c8": "8.0.1",
56
56
  "mocha": "^10.2.0",
@@ -58,5 +58,5 @@
58
58
  "ts-node": "^10.9.1",
59
59
  "typescript": "5.1.6"
60
60
  },
61
- "gitHead": "7ab90f30b17ed745cad713363a27edfd7cdce08a"
61
+ "gitHead": "064edb63e8d4dee447feaab63cf61cbcf6414fdf"
62
62
  }
@@ -9,7 +9,7 @@ import * as strategies from './strategies';
9
9
  * The Photographer is a {@apilink StageCrewMember} who takes screenshots
10
10
  * using the web browser associated with the {@apilink Actor} that is currently {@apilink actorInTheSpotlight|in the spotlight}.
11
11
  *
12
- * ## Programmatically assigning the `Photographer` to the {@apilink Stage}
12
+ * ## Registering Photographer programmatically
13
13
  *
14
14
  * ```ts
15
15
  * import { configure, ArtifactArchiver } from '@serenity-js/core'
@@ -23,12 +23,43 @@ import * as strategies from './strategies';
23
23
  * })
24
24
  * ```
25
25
  *
26
+ * ## Using Photographer with Playwright Test
27
+ *
28
+ * ```ts
29
+ * // playwright.config.ts
30
+ * import type { PlaywrightTestConfig } from '@serenity-js/playwright-test'
31
+ *
32
+ * const config: PlaywrightTestConfig = {
33
+ * reporter: [
34
+ * [ '@serenity-js/playwright-test', {
35
+ * crew: [
36
+ * '@serenity-js/serenity-bdd',
37
+ * [ '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
38
+ * ]
39
+ * // other Serenity/JS config
40
+ * }]
41
+ * ],
42
+ *
43
+ * use: {
44
+ * crew: [
45
+ * [ '@serenity-js/web:Photographer', {
46
+ * strategy: 'TakePhotosOfFailures',
47
+ * // strategy: 'TakePhotosOfInteractions',
48
+ * } ]
49
+ * ],
50
+ * },
51
+ * };
52
+ * export default config;
53
+ * ```
54
+ *
55
+ * #### Learn more
56
+ * - {@apilink SerenityOptions}
57
+ *
26
58
  * ## Using `Photographer` with WebdriverIO
27
59
  *
28
60
  * ```ts
29
61
  * // wdio.conf.ts
30
62
  * import { ArtifactArchiver } from '@serenity-js/core'
31
- * import { Photographer, TakePhotosOfFailures } from '@serenity-js/web'
32
63
  * import { WebdriverIOConfig } from '@serenity-js/webdriverio'
33
64
  *
34
65
  * export const config: WebdriverIOConfig= {
@@ -47,8 +78,12 @@ import * as strategies from './strategies';
47
78
  *
48
79
  * // Register StageCrewMembers we've imported at the top of this file
49
80
  * crew: [
50
- * ArtifactArchiver.storingArtifactsAt(process.cwd(), 'target/site/serenity'),
51
- * Photographer.whoWill(TakePhotosOfFailures),
81
+ * '@serenity-js/serenity-bdd',
82
+ * [ '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
83
+ * [ '@serenity-js/web:Photographer', {
84
+ * strategy: 'TakePhotosOfFailures',
85
+ * // strategy: 'TakePhotosOfInteractions',
86
+ * } ]
52
87
  * ]
53
88
  * },
54
89
  *
@@ -56,32 +91,10 @@ import * as strategies from './strategies';
56
91
  * }
57
92
  * ```
58
93
  *
59
- * ## Using `Photographer` with Playwright Test
60
- *
61
- * ```ts
62
- * // playwright.config.ts
63
- * import type { PlaywrightTestConfig } from '@serenity-js/playwright-test'
64
- *
65
- * const config: PlaywrightTestConfig = {
66
- * use: {
67
- * crew: [
68
- * [ '@serenity-js/web:Photographer', { strategy: 'TakePhotosOfFailures' } ] // or 'TakePhotosOfInteractions'
69
- * ],
70
- * },
71
- * };
72
- * export default config;
73
- * ```
74
- *
75
- * #### Learn more
76
- * - {@apilink SerenityOptions}
77
- *
78
94
  * ## Using `Photographer` with Protractor
79
95
  *
80
96
  * ```ts
81
97
  * // protractor.conf.js
82
- * const { ArtifactArchiver } = require('@serenity-js/core')
83
- * const { Photographer, TakePhotosOfFailures } = require('@serenity-js/web')
84
- *
85
98
  * exports.config = {
86
99
  *
87
100
  * // Tell Protractor to use the Serenity/JS framework Protractor Adapter
@@ -89,16 +102,20 @@ import * as strategies from './strategies';
89
102
  * frameworkPath: require.resolve('@serenity-js/protractor/adapter'),
90
103
  *
91
104
  * serenity: {
92
- * runner: 'jasmine',
93
- * // runner: 'cucumber',
94
- * // runner: 'mocha',
95
- * crew: [
96
- * ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
97
- * Photographer.whoWill(TakePhotosOfFailures),
98
- * ]
99
- * },
100
- *
101
- * // ... rest of the config omitted for brevity
105
+ * runner: 'jasmine',
106
+ * // runner: 'cucumber',
107
+ * // runner: 'mocha',
108
+ * crew: [
109
+ * @serenity-js/serenity-bdd',
110
+ * '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
111
+ * '@serenity-js/web:Photographer', {
112
+ * strategy: 'TakePhotosOfFailures',
113
+ * // strategy: 'TakePhotosOfInteractions',
114
+ * ]
115
+ * ]
116
+ * },
117
+ *
118
+ * // ... rest of the config omitted for brevity
102
119
  * }
103
120
  * ```
104
121
  *