@serenity-js/playwright-test 3.0.0-rc.42 → 3.0.0-rc.44
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 +25 -0
- package/README.md +9 -14
- package/lib/api/SerenityFixtures.d.ts +5 -3
- package/lib/api/SerenityFixtures.d.ts.map +1 -1
- package/lib/api/SerenityOptions.d.ts +10 -8
- package/lib/api/SerenityOptions.d.ts.map +1 -1
- package/lib/api/test-api.js +1 -1
- package/lib/api/test-api.js.map +1 -1
- package/package.json +11 -10
- package/src/api/SerenityFixtures.ts +5 -3
- package/src/api/SerenityOptions.ts +10 -8
- package/src/api/test-api.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
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.44](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.43...v3.0.0-rc.44) (2023-03-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **core:** support for NPM 9 ([0493474](https://github.com/serenity-js/serenity-js/commit/0493474a1e28b86b1b60f69ec0d591c1a3265425))
|
|
12
|
+
* **deps:** update dependency tiny-types to ^1.19.1 ([ce335eb](https://github.com/serenity-js/serenity-js/commit/ce335ebca434d1fd0e6e809a65a0882fd10a311a))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# [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)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **deps:** update dependency deepmerge to ^4.3.0 ([ac08d09](https://github.com/serenity-js/serenity-js/commit/ac08d091eb61a666c9b9c53209b59fe7157c06d9))
|
|
24
|
+
* **deps:** update playwright dependencies to ^1.31.2 ([ebac2ff](https://github.com/serenity-js/serenity-js/commit/ebac2ff37b7a922686daed0201d122f52b1d1040))
|
|
25
|
+
* **playwright-test:** ensure each new actor gets their own Playwright browser ([f4c527b](https://github.com/serenity-js/serenity-js/commit/f4c527b27446e32c31a230de3a4d29575ecc8c34)), closes [#1523](https://github.com/serenity-js/serenity-js/issues/1523)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
6
31
|
# [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)
|
|
7
32
|
|
|
8
33
|
|
package/README.md
CHANGED
|
@@ -2,23 +2,22 @@ _** This README is for Serenity/JS version 3.0-RC. Some links might not work yet
|
|
|
2
2
|
|
|
3
3
|
# Serenity/JS
|
|
4
4
|
|
|
5
|
+
[](https://www.linkedin.com/company/serenity-js)
|
|
6
|
+
[](https://www.youtube.com/@serenity-js)
|
|
7
|
+
[](https://matrix.to/#/#serenity-js:gitter.im)
|
|
8
|
+
[](https://matrix.to/#/#serenity-js:gitter.im)
|
|
9
|
+
|
|
5
10
|
[Serenity/JS](https://serenity-js.org) is a framework designed to make acceptance and regression testing
|
|
6
11
|
of modern full-stack applications faster, more collaborative and easier to scale.
|
|
7
12
|
|
|
8
13
|
Visit [serenity-js.org](https://serenity-js.org/) for the [latest tutorials](https://serenity-js.org/handbook/)
|
|
9
14
|
and [API docs](https://serenity-js.org/modules/), and follow [@SerenityJS](https://twitter.com/SerenityJS) and [@JanMolak](https://twitter.com/JanMolak) on Twitter for project updates.
|
|
10
15
|
|
|
11
|
-
[](https://twitter.com/@SerenityJS)
|
|
12
|
-
[](https://twitter.com/@JanMolak)
|
|
13
|
-
[](https://gitter.im/serenity-js/Lobby)
|
|
14
|
-
|
|
15
|
-
Subscribe to [Serenity/JS YouTube channel](https://www.youtube.com/channel/UC0RdeVPyjtJopVHvlLrXd1Q) to get notified when new demos and video tutorials are available.
|
|
16
|
-
|
|
17
16
|
### Learning Serenity/JS
|
|
18
17
|
|
|
19
18
|
To learn more about Serenity/JS, [follow 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 using the [Serenity/JS template projects](https://github.com/serenity-js).
|
|
20
19
|
|
|
21
|
-
If you have any questions, join us on [Serenity/JS Community Chat](https://
|
|
20
|
+
If you have any questions, join us on the [Serenity/JS Community Chat](https://matrix.to/#/#serenity-js:gitter.im).
|
|
22
21
|
|
|
23
22
|
## Serenity/JS Playwright Test
|
|
24
23
|
|
|
@@ -179,11 +178,11 @@ import { CallAnApi } from '@serenity-js/rest'
|
|
|
179
178
|
test.use({
|
|
180
179
|
actors: async ({ browser, baseURL }, use) => {
|
|
181
180
|
await use(
|
|
182
|
-
Cast.
|
|
181
|
+
Cast.where(actor => actor.whoCan(
|
|
183
182
|
BrowseTheWebWithPlaywright.using(browser),
|
|
184
183
|
TakeNotes.usingAnEmptyNotepad(),
|
|
185
184
|
CallAnApi.at(baseURL),
|
|
186
|
-
)
|
|
185
|
+
))
|
|
187
186
|
)
|
|
188
187
|
},
|
|
189
188
|
})
|
|
@@ -275,11 +274,7 @@ GitHub repository](https://github.com/serenity-js/serenity-js/tree/main/examples
|
|
|
275
274
|
|
|
276
275
|
## More coming soon!
|
|
277
276
|
|
|
278
|
-
New features, tutorials, and demos are coming soon, so follow us on
|
|
279
|
-
|
|
280
|
-
[](https://twitter.com/@SerenityJS)
|
|
281
|
-
[](https://twitter.com/@JanMolak)
|
|
282
|
-
[](https://gitter.im/serenity-js/Lobby)
|
|
277
|
+
New features, tutorials, and demos are coming soon, so follow us on [LinkedIn](https://www.linkedin.com/company/serenity-js) and join the [Serenity/JS Community Chat channel](https://matrix.to/#/#serenity-js:gitter.im) to stay up to date!
|
|
283
278
|
|
|
284
279
|
If you enjoy using Serenity/JS and would like to keep new features coming, become our [GitHub Sponsor](https://github.com/sponsors/serenity-js)
|
|
285
280
|
and donate as much or as little as you find appropriate.
|
|
@@ -71,9 +71,11 @@ export interface SerenityFixtures {
|
|
|
71
71
|
* test.use({
|
|
72
72
|
* defaultActorName: 'Serena',
|
|
73
73
|
* actors: ({ browser, contextOptions }, use) => {
|
|
74
|
-
* const cast = Cast.
|
|
75
|
-
*
|
|
76
|
-
*
|
|
74
|
+
* const cast = Cast.where(actor =>
|
|
75
|
+
* actor.whoCan(
|
|
76
|
+
* BrowseTheWebWithPlaywright.using(browser, contextOptions),
|
|
77
|
+
* TakeNotes.usingAnEmptyNotepad(),
|
|
78
|
+
* )
|
|
77
79
|
* )
|
|
78
80
|
*
|
|
79
81
|
* // Make sure to pass your custom cast to Playwright `use` callback
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SerenityFixtures.d.ts","sourceRoot":"","sources":["../../src/api/SerenityFixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,gBAAgB;IAE7B;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAE5C
|
|
1
|
+
{"version":3,"file":"SerenityFixtures.d.ts","sourceRoot":"","sources":["../../src/api/SerenityFixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,gBAAgB;IAE7B;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,MAAM,EAAE,IAAI,CAAC;IAEb;;;;;;;;;;;;OAYG;IACH,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC;IAErC;;;;;;;;;OASG;IACH,KAAK,EAAE,KAAK,CAAC;CAChB"}
|
|
@@ -45,10 +45,12 @@ import { PlaywrightOptions } from '@serenity-js/playwright';
|
|
|
45
45
|
* // Register a custom cast of Serenity/JS actors
|
|
46
46
|
* // if you don't want to use the default one
|
|
47
47
|
* actors: ({ browser, contextOptions, apiUrl }, use) => {
|
|
48
|
-
* const cast = Cast.
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
48
|
+
* const cast = Cast.where(actor =>
|
|
49
|
+
* actor.whoCan(
|
|
50
|
+
* BrowseTheWebWithPlaywright.using(browser, contextOptions),
|
|
51
|
+
* TakeNotes.usingAnEmptyNotepad(),
|
|
52
|
+
* CallAnApi.at(apiUrl),
|
|
53
|
+
* )
|
|
52
54
|
* )
|
|
53
55
|
*
|
|
54
56
|
* use(cast)
|
|
@@ -119,11 +121,11 @@ export interface SerenityOptions {
|
|
|
119
121
|
* // as well as any other custom properties you define in the destructuring expression,
|
|
120
122
|
* // such as `apiUrl`.
|
|
121
123
|
* actors: ({ browser, contextOptions, apiUrl }, use) => {
|
|
122
|
-
* const cast = Cast.
|
|
124
|
+
* const cast = Cast.where(actor => actor.whoCan(
|
|
123
125
|
* BrowseTheWebWithPlaywright.using(browser, contextOptions),
|
|
124
126
|
* TakeNotes.usingAnEmptyNotepad(),
|
|
125
127
|
* CallAnApi.at(apiUrl),
|
|
126
|
-
* )
|
|
128
|
+
* ))
|
|
127
129
|
*
|
|
128
130
|
* // Make sure to pass your custom cast to Playwright `use` callback
|
|
129
131
|
* use(cast)
|
|
@@ -234,10 +236,10 @@ export interface SerenityOptions {
|
|
|
234
236
|
* // Custom cast of actors receives `contextOptions` with the
|
|
235
237
|
* // additional Serenity/JS properties.
|
|
236
238
|
* actors: ({ browser, contextOptions }, use) => {
|
|
237
|
-
* const cast = Cast.
|
|
239
|
+
* const cast = Cast.where(actor => actor.whoCan(
|
|
238
240
|
* BrowseTheWebWithPlaywright.using(browser, contextOptions),
|
|
239
241
|
* TakeNotes.usingAnEmptyNotepad(),
|
|
240
|
-
* )
|
|
242
|
+
* ))
|
|
241
243
|
*
|
|
242
244
|
* use(cast)
|
|
243
245
|
* },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SerenityOptions.d.ts","sourceRoot":"","sources":["../../src/api/SerenityOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"SerenityOptions.d.ts","sourceRoot":"","sources":["../../src/api/SerenityOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,MAAM,WAAW,eAAe;IAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4DG;IACH,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,qBAAqB,GAAG,oBAAoB,CAAC,CAAA;IAEvE;;;;;;;OAOG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,IAAI,EAAE,KAAK,CAAC,gBAAgB,GAAG,eAAe,GAAG,sBAAsB,CAAC,CAAC;IAEzE;;;;;;;;OAQG;IACH,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC;IAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6DG;IACH,cAAc,EAAE,iBAAiB,CAAC;CACrC"}
|
package/lib/api/test-api.js
CHANGED
|
@@ -92,7 +92,7 @@ const reporter_1 = require("../reporter");
|
|
|
92
92
|
*/
|
|
93
93
|
exports.it = test_1.test.extend({
|
|
94
94
|
actors: [
|
|
95
|
-
({ browser, contextOptions }, use) => use(core_1.Cast.
|
|
95
|
+
({ browser, contextOptions }, use) => use(core_1.Cast.where(actor => actor.whoCan(playwright_1.BrowseTheWebWithPlaywright.using(browser, contextOptions), core_1.TakeNotes.usingAnEmptyNotepad()))),
|
|
96
96
|
{ option: true },
|
|
97
97
|
],
|
|
98
98
|
defaultActorName: [
|
package/lib/api/test-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-api.js","sourceRoot":"","sources":["../../src/api/test-api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA0D;AAC1D,4CAA+G;AAC/G,yDAA0E;AAC1E,uDAAsE;AACtE,wDAAqF;AACrF,0CAAsE;AACtE,uCAAyB;AACzB,2CAAqE;AAErE,0CAA2H;AAK3H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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playwright-test",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.44",
|
|
4
4
|
"description": "Serenity/JS reporter and test APIs for Playwright Test",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"testing"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"clean": "rimraf
|
|
30
|
+
"clean": "rimraf target",
|
|
31
31
|
"~test": "nyc playwright test",
|
|
32
32
|
"compile": "rimraf lib && tsc --project tsconfig.build.json"
|
|
33
33
|
},
|
|
@@ -41,24 +41,25 @@
|
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": "^14 || ^16 || ^18",
|
|
44
|
-
"npm": "^6 || ^7 || ^8"
|
|
44
|
+
"npm": "^6 || ^7 || ^8 || ^9"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@playwright/test": "^1.
|
|
48
|
-
"@serenity-js/core": "3.0.0-rc.
|
|
49
|
-
"@serenity-js/playwright": "3.0.0-rc.
|
|
50
|
-
"@serenity-js/web": "3.0.0-rc.
|
|
51
|
-
"deepmerge": "^4.
|
|
52
|
-
"tiny-types": "^1.19.
|
|
47
|
+
"@playwright/test": "^1.31.2",
|
|
48
|
+
"@serenity-js/core": "3.0.0-rc.44",
|
|
49
|
+
"@serenity-js/playwright": "3.0.0-rc.44",
|
|
50
|
+
"@serenity-js/web": "3.0.0-rc.44",
|
|
51
|
+
"deepmerge": "^4.3.0",
|
|
52
|
+
"tiny-types": "^1.19.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@integration/testing-tools": "3.0.0",
|
|
56
56
|
"@types/chai": "^4.3.4",
|
|
57
57
|
"@types/mocha": "^10.0.1",
|
|
58
58
|
"mocha": "^10.2.0",
|
|
59
|
+
"mocha-multi": "^1.1.7",
|
|
59
60
|
"nyc": "15.1.0",
|
|
60
61
|
"ts-node": "^10.9.1",
|
|
61
62
|
"typescript": "^4.9.5"
|
|
62
63
|
},
|
|
63
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "be0c603085f922841e8050f1c50103b7eef7fdc0"
|
|
64
65
|
}
|
|
@@ -72,9 +72,11 @@ export interface SerenityFixtures {
|
|
|
72
72
|
* test.use({
|
|
73
73
|
* defaultActorName: 'Serena',
|
|
74
74
|
* actors: ({ browser, contextOptions }, use) => {
|
|
75
|
-
* const cast = Cast.
|
|
76
|
-
*
|
|
77
|
-
*
|
|
75
|
+
* const cast = Cast.where(actor =>
|
|
76
|
+
* actor.whoCan(
|
|
77
|
+
* BrowseTheWebWithPlaywright.using(browser, contextOptions),
|
|
78
|
+
* TakeNotes.usingAnEmptyNotepad(),
|
|
79
|
+
* )
|
|
78
80
|
* )
|
|
79
81
|
*
|
|
80
82
|
* // Make sure to pass your custom cast to Playwright `use` callback
|
|
@@ -46,10 +46,12 @@ import { PlaywrightOptions } from '@serenity-js/playwright';
|
|
|
46
46
|
* // Register a custom cast of Serenity/JS actors
|
|
47
47
|
* // if you don't want to use the default one
|
|
48
48
|
* actors: ({ browser, contextOptions, apiUrl }, use) => {
|
|
49
|
-
* const cast = Cast.
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
49
|
+
* const cast = Cast.where(actor =>
|
|
50
|
+
* actor.whoCan(
|
|
51
|
+
* BrowseTheWebWithPlaywright.using(browser, contextOptions),
|
|
52
|
+
* TakeNotes.usingAnEmptyNotepad(),
|
|
53
|
+
* CallAnApi.at(apiUrl),
|
|
54
|
+
* )
|
|
53
55
|
* )
|
|
54
56
|
*
|
|
55
57
|
* use(cast)
|
|
@@ -121,11 +123,11 @@ export interface SerenityOptions {
|
|
|
121
123
|
* // as well as any other custom properties you define in the destructuring expression,
|
|
122
124
|
* // such as `apiUrl`.
|
|
123
125
|
* actors: ({ browser, contextOptions, apiUrl }, use) => {
|
|
124
|
-
* const cast = Cast.
|
|
126
|
+
* const cast = Cast.where(actor => actor.whoCan(
|
|
125
127
|
* BrowseTheWebWithPlaywright.using(browser, contextOptions),
|
|
126
128
|
* TakeNotes.usingAnEmptyNotepad(),
|
|
127
129
|
* CallAnApi.at(apiUrl),
|
|
128
|
-
* )
|
|
130
|
+
* ))
|
|
129
131
|
*
|
|
130
132
|
* // Make sure to pass your custom cast to Playwright `use` callback
|
|
131
133
|
* use(cast)
|
|
@@ -240,10 +242,10 @@ export interface SerenityOptions {
|
|
|
240
242
|
* // Custom cast of actors receives `contextOptions` with the
|
|
241
243
|
* // additional Serenity/JS properties.
|
|
242
244
|
* actors: ({ browser, contextOptions }, use) => {
|
|
243
|
-
* const cast = Cast.
|
|
245
|
+
* const cast = Cast.where(actor => actor.whoCan(
|
|
244
246
|
* BrowseTheWebWithPlaywright.using(browser, contextOptions),
|
|
245
247
|
* TakeNotes.usingAnEmptyNotepad(),
|
|
246
|
-
* )
|
|
248
|
+
* ))
|
|
247
249
|
*
|
|
248
250
|
* use(cast)
|
|
249
251
|
* },
|
package/src/api/test-api.ts
CHANGED
|
@@ -73,10 +73,10 @@ export const it: SerenityTestType = base.extend<Omit<SerenityOptions, 'actors'>
|
|
|
73
73
|
|
|
74
74
|
actors: [
|
|
75
75
|
({ browser, contextOptions }, use) =>
|
|
76
|
-
use(Cast.
|
|
76
|
+
use(Cast.where(actor => actor.whoCan(
|
|
77
77
|
BrowseTheWebWithPlaywright.using(browser, contextOptions),
|
|
78
78
|
TakeNotes.usingAnEmptyNotepad(),
|
|
79
|
-
)),
|
|
79
|
+
))),
|
|
80
80
|
{ option: true },
|
|
81
81
|
],
|
|
82
82
|
|