@serenity-js/playwright-test 3.10.0 → 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 +19 -0
  2. package/README.md +20 -17
  3. package/package.json +7 -7
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.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
+
17
+ ## [3.10.1](https://github.com/serenity-js/serenity-js/compare/v3.10.0...v3.10.1) (2023-09-01)
18
+
19
+ **Note:** Version bump only for package @serenity-js/playwright-test
20
+
21
+
22
+
23
+
24
+
6
25
  # [3.10.0](https://github.com/serenity-js/serenity-js/compare/v3.9.1...v3.10.0) (2023-08-23)
7
26
 
8
27
  **Note:** Version bump only for package @serenity-js/playwright-test
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),
@@ -26,18 +27,20 @@ and fixtures that integrate [Playwright Test](https://playwright.dev/docs/intro)
26
27
 
27
28
  ### Installation
28
29
 
29
- To install this module, use an existing [Playwright project](https://playwright.dev/docs/intro) or generate a new one by running:
30
+ To install this module, use an existing [Playwright Test project](https://playwright.dev/docs/intro) or generate a new one by running:
30
31
 
31
- ```bash
32
+ ```sh
32
33
  npm init playwright@latest
33
34
  ```
34
35
 
35
- Next, run the following command in your Playwright project directory:
36
+ Install the below Serenity/JS modules in your Playwright Test project directory:
36
37
 
37
- ```bash
38
- npm install --save-dev @serenity-js/{assertions,console-reporter,core,serenity-bdd,web,playwright,playwright-test}
38
+ ```sh
39
+ npm install --save-dev @serenity-js/assertions @serenity-js/console-reporter @serenity-js/core @serenity-js/serenity-bdd @serenity-js/web @serenity-js/playwright @serenity-js/playwright-test
39
40
  ```
40
41
 
42
+ To learn more about Serenity/JS and how to use it on your project, follow the [Serenity/JS Getting Started guide for Playwright Test](https://serenity-js.org/handbook/getting-started/serenity-js-with-playwright-test/).
43
+
41
44
  ### Serenity/JS Playwright Fixtures
42
45
 
43
46
  To use Serenity/JS Screenplay Pattern APIs and benefit from the in-depth reporting capabilities,
@@ -241,14 +244,14 @@ To get started with component testing:
241
244
 
242
245
  + const { test, expect } = useBase(componentTest)
243
246
 
244
- import App from './App';
247
+ import App from './App'
245
248
 
246
- test.use({ viewport: { width: 500, height: 500 } });
249
+ test.use({ viewport: { width: 500, height: 500 } })
247
250
 
248
251
  test('should work', async ({ mount }) => {
249
- const component = await mount(<App />);
250
- await expect(component).toContainText('Learn React');
251
- });
252
+ const component = await mount(<App />)
253
+ await expect(component).toContainText('Learn React')
254
+ })
252
255
  ```
253
256
 
254
257
  #### Using Serenity/JS Screenplay Pattern Actors for Component Testing
@@ -267,7 +270,7 @@ import { Ensure, contain } from '@serenity-js/assertions'
267
270
  import { useBase } from '@serenity-js/playwright-test'
268
271
  import { Enter, PageElement, CssClasses } from '@serenity-js/web'
269
272
 
270
- import EmailInput from './EmailInput';
273
+ import EmailInput from './EmailInput'
271
274
 
272
275
  const { it, describe } = useBase(componentTest).useFixtures<{ emailAddress: string }>({
273
276
  emailAddress: ({ actor }, use) => {
@@ -278,9 +281,9 @@ const { it, describe } = useBase(componentTest).useFixtures<{ emailAddress: stri
278
281
  describe('EmailInput', () => {
279
282
 
280
283
  it('allows valid email addresses', async ({ actor, mount, emailAddress }) => {
281
- const nativeComponent = await mount(<EmailInput/>);
284
+ const nativeComponent = await mount(<EmailInput/>)
282
285
 
283
- const component = PageElement.from(nativeComponent);
286
+ const component = PageElement.from(nativeComponent)
284
287
 
285
288
  await actor.attemptsTo(
286
289
  Enter.theValue(emailAddress).into(component),
@@ -298,7 +301,7 @@ To use Serenity/JS reporting capabilities, register the `@serenity-js/playwright
298
301
  For example, to enable Serenity/JS Console Reporter and Serenity BDD reporter, install the relevant modules:
299
302
 
300
303
  ```bash
301
- npm install --save-dev @serenity-js/{console-reporter,serenity-bdd}
304
+ npm install --save-dev @serenity-js/console-reporter @serenity-js/serenity-bdd
302
305
  ```
303
306
 
304
307
  Next, configure your Playwright project as follows:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serenity-js/playwright-test",
3
- "version": "3.10.0",
3
+ "version": "3.10.2",
4
4
  "description": "Serenity/JS reporter and test APIs for Playwright Test",
5
5
  "author": {
6
6
  "name": "Jan Molak",
@@ -45,21 +45,21 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@playwright/test": "^1.37.1",
48
- "@serenity-js/core": "3.10.0",
49
- "@serenity-js/playwright": "3.10.0",
50
- "@serenity-js/web": "3.10.0",
48
+ "@serenity-js/core": "3.10.2",
49
+ "@serenity-js/playwright": "3.10.2",
50
+ "@serenity-js/web": "3.10.2",
51
51
  "deepmerge": "^4.3.1",
52
52
  "tiny-types": "^1.20.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@integration/testing-tools": "3.0.0",
56
- "@types/chai": "^4.3.5",
56
+ "@types/chai": "^4.3.6",
57
57
  "@types/mocha": "^10.0.1",
58
58
  "c8": "8.0.1",
59
59
  "mocha": "^10.2.0",
60
60
  "mocha-multi": "^1.1.7",
61
61
  "ts-node": "^10.9.1",
62
- "typescript": "^5.1.6"
62
+ "typescript": "5.1.6"
63
63
  },
64
- "gitHead": "06ae5d8a702be0be2890e989c120715c32f6578a"
64
+ "gitHead": "6834827fffe5dd8dd3d2f39d2fea2c4039ab1d3d"
65
65
  }