@serenity-js/playwright 3.10.1 → 3.10.2

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +32 -30
  3. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.2](https://github.com/serenity-js/serenity-js/compare/v3.10.1...v3.10.2) (2023-09-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **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)
12
+
13
+
14
+
15
+
16
+
6
17
  ## [3.10.1](https://github.com/serenity-js/serenity-js/compare/v3.10.0...v3.10.1) (2023-09-01)
7
18
 
8
19
  **Note:** Version bump only for package @serenity-js/playwright
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),
@@ -29,27 +30,38 @@ for [Playwright](https://playwright.dev/), that helps with testing Web-based app
29
30
  To install this module, run the following command in your [Playwright project directory](https://playwright.dev/docs/intro):
30
31
 
31
32
  ```bash
32
- npm install --save-dev @serenity-js/{assertions,console-reporter,core,serenity-bdd,web,playwright}
33
+ npm install --save-dev @serenity-js/assertions @serenity-js/console-reporter @serenity-js/core @serenity-js/serenity-bdd @serenity-js/web @serenity-js/playwright
33
34
  ```
34
35
 
36
+ To learn more about Serenity/JS and how to use it on your project, follow the [Serenity/JS Getting Started guide](https://serenity-js.org/handbook/getting-started/).
37
+
38
+ ## Usage with `@playwright/test`
39
+
40
+ Follow the [Serenity/JS Getting Started guide for Playwright Test](https://serenity-js.org/handbook/getting-started/serenity-js-with-playwright-test/).
41
+
42
+ ## Usage with Cucumber
43
+
44
+ Follow the [Serenity/JS configuration guide for Cucumber](https://serenity-js.org/handbook/test-runners/cucumber/)
45
+ and review the [Serenity/JS Cucumber and Playwright Project Template](https://github.com/serenity-js/serenity-js-cucumber-playwright-template).
46
+
35
47
  ### Usage with Mocha
36
48
 
37
49
  ```typescript
38
- import { Ensure, equals } from '@serenity-js/assertions';
39
- import { actorCalled, Actor, ArtifactArchiver, Cast, configure, Duration } from '@serenity-js/core';
40
- import { ConsoleReporter } from '@serenity-js/console-reporter';
41
- import { BrowseTheWebWithPlaywright, PlaywrightOptions } from '@serenity-js/playwright';
42
- import { SerenityBDDReporter } from '@serenity-js/serenity-bdd';
43
- import { By, Navigate, PageElement, Photographer, TakePhotosOfFailures, Text } from '@serenity-js/web';
50
+ import { Ensure, equals } from '@serenity-js/assertions'
51
+ import { actorCalled, Actor, ArtifactArchiver, Cast, configure, Duration } from '@serenity-js/core'
52
+ import { ConsoleReporter } from '@serenity-js/console-reporter'
53
+ import { BrowseTheWebWithPlaywright, PlaywrightOptions } from '@serenity-js/playwright'
54
+ import { SerenityBDDReporter } from '@serenity-js/serenity-bdd'
55
+ import { By, Navigate, PageElement, Photographer, TakePhotosOfFailures, Text } from '@serenity-js/web'
44
56
 
45
- import { describe, it, beforeAll, afterAll } from 'mocha';
46
- import * as playwright from 'playwright';
57
+ import { describe, it, beforeAll, afterAll } from 'mocha'
58
+ import * as playwright from 'playwright'
47
59
 
48
60
  // example Lean Page Object describing a widget we interact with in the test
49
61
  class SerenityJSWebsite {
50
62
  static header = () =>
51
63
  PageElement.located(By.css('h1')) // selector to identify the interactable element
52
- .describedAs('header'); // description to be used in reports
64
+ .describedAs('header') // description to be used in reports
53
65
  }
54
66
 
55
67
  // example Actors class, confgures Serenity/JS actors to use Playwright
@@ -64,13 +76,13 @@ class Actors implements Cast {
64
76
  return actor.whoCan(
65
77
  BrowseTheWebWithPlaywright.using(this.browser, this.options),
66
78
  // ... add other abilities as needed, like CallAnApi or TakeNotes
67
- );
79
+ )
68
80
  }
69
81
  }
70
82
 
71
83
  describe('Serenity/JS', () => {
72
84
 
73
- let browser: playwright.Browser;
85
+ let browser: playwright.Browser
74
86
 
75
87
  beforeAll(async () => {
76
88
  // Start a single browser before all the tests,
@@ -78,7 +90,7 @@ describe('Serenity/JS', () => {
78
90
  // and manage Playwright browser context as needed
79
91
  browser = await playwright.chromium.launch({
80
92
  headless: true
81
- });
93
+ })
82
94
 
83
95
  // Configure Serenity/JS providing your Actors
84
96
  // and required "stage crew memebers" (a.k.a. reporting services)
@@ -94,8 +106,8 @@ describe('Serenity/JS', () => {
94
106
  new SerenityBDDReporter(),
95
107
  ConsoleReporter.forDarkTerminals(),
96
108
  ]
97
- });
98
- });
109
+ })
110
+ })
99
111
 
100
112
  it('supports Playwright', async () => {
101
113
  // actorCalled(name) instantiates or retrieves an existing actor identified by name
@@ -115,8 +127,8 @@ describe('Serenity/JS', () => {
115
127
  if (browser) {
116
128
  await browser.close()
117
129
  }
118
- });
119
- });
130
+ })
131
+ })
120
132
  ```
121
133
 
122
134
  Next steps:
@@ -124,16 +136,6 @@ Next steps:
124
136
  - Learn about the [Screenplay Pattern](https://serenity-js.org/handbook/design/screenplay-pattern.html)
125
137
  - Explore [`@serenity-js/web`](https://serenity-js.org/api/web) and [`@serenity-js/assertions`](https://serenity-js.org/api/assertions) APIs
126
138
 
127
- ## Usage with `@playwright/test`
128
-
129
- See [@serenity-js/playwright-test](https://serenity-js.org/api/playwright-test).
130
-
131
- ## Usage with Cucumber
132
-
133
- Tutorial coming soon!
134
-
135
- Follow [@SerenityJS on Twitter](https://twitter.com/@SerenityJS) to get notified about new tutorials.
136
-
137
139
  ## 📣 Stay up to date
138
140
 
139
141
  New features, tutorials, and demos are coming soon!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serenity-js/playwright",
3
- "version": "3.10.1",
3
+ "version": "3.10.2",
4
4
  "description": "Serenity/JS Screenplay Pattern library for Playwright",
5
5
  "author": {
6
6
  "name": "Jan Molak",
@@ -43,14 +43,14 @@
43
43
  "node": "^16.13 || ^18.12 || ^20"
44
44
  },
45
45
  "dependencies": {
46
- "@serenity-js/core": "3.10.1",
47
- "@serenity-js/web": "3.10.1",
46
+ "@serenity-js/core": "3.10.2",
47
+ "@serenity-js/web": "3.10.2",
48
48
  "playwright-core": "^1.37.1",
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": "6834827fffe5dd8dd3d2f39d2fea2c4039ab1d3d"
62
62
  }