Skip to content

Commit

Permalink
cherry-pick(#11396): docs: commit release notes for 1.18 (#11397)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov authored Jan 14, 2022
1 parent dd02142 commit 2745a18
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions docs/src/release-notes-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,66 @@ title: "Release notes"

<!-- TOC -->

## Version 1.18

### Locator Improvements

- [`method: Locator.dragTo`]
- [`expect(locator).toBeChecked({ checked })`](./api/class-locatorassertions#locator-assertions-to-be-checked)
- Each locator can now be optionally filtered by the text it contains: [`locator('button', { hasText: 'Submit' })`](./api/class-locator#locator-locator-option-has-text)

### Testing API improvements

- [`expect(response).toBeOK()`](./api/class-apiresponseassertions)
- [`testInfo.attach()`](./api/class-testinfo#test-info-attach)
- [`test.info()`](./api/class-test#test-info)

### Improved TypeScript Support

1. Playwright Test now respects `tsconfig.json`'s [`baseUrl`](https://www.typescriptlang.org/tsconfig#baseUrl) and [`paths`](https://www.typescriptlang.org/tsconfig#paths), so you can use aliases
1. There is a new environment variable `PW_EXPERIMENTAL_TS_ESM` that allows importing ESM modules in your TS code, without the need for the compile step. Don't forget the `.js` suffix when you are importing your esm modules. Run your tests as follows:

```bash
npm i --save-dev @playwright/test@1.18.0-rc1
PW_EXPERIMENTAL_TS_ESM=1 npx playwright test
```

### Testing Scenarios Cookbook

We now have a testing scenarios cookbook! Check out http://aka.ms/playwright/samples
Feel free to file an issue to that repo if something is missing.

### Create Playwright

The `npm init playwright` command is now generally available for your use:

```sh
# Run from your project's root directory
npm init playwright
# Or create a new project
npm init playwright new-project
```

This will create a Playwright Test configuration file, optionally add examples, a GitHub Action workflow and a first test `example.spec.ts`.

### New APIs & changes

- new [`testCase.repeatEachIndex`](./api/class-testcase#test-case-repeat-each-index) API
- new [option fixtures](./test-fixtures#fixtures-options)
- [`acceptDownloads`](./api/class-browser#browser-new-context-option-accept-downloads) option now defaults to `true`

### Browser Versions

- Chromium 99.0.4812.0
- Mozilla Firefox 95.0
- WebKit 15.4

This version was also tested against the following stable channels:

- Google Chrome 97
- Microsoft Edge 97


## Version 1.17

### Frame Locators
Expand Down

0 comments on commit 2745a18

Please sign in to comment.