Skip to content

Commit

Permalink
docs: add release notes for 1.22 (#14100)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov committed May 12, 2022
1 parent f6712ec commit 5268dd7
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/src/release-notes-csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ title: "Release notes"

<!-- TOC -->

## Version 1.22

### Highlights

- Role selectors that allow selecting elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles), [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).

```csharp
// Click a button with accessible name "log in"
await page.ClickAsync("role=button[name='log in']")
```

Read more in [our documentation](./selectors#role-selector).

- New [`method: Locator.filter`] API to filter an existing locator

```csharp
var buttons = page.Locator("role=button");
// ...
var submitLocator = buttons.Filter(new LocatorFilterOptions { HasText = "Sign up" });
await submitLocator.ClickAsync();
```

## Version 1.21

### Highlights
Expand Down
26 changes: 26 additions & 0 deletions docs/src/release-notes-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,32 @@ title: "Release notes"

<!-- TOC -->

## Version 1.22

### Highlights

- Role selectors that allow selecting elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles), [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).

```java
// Click a button with accessible name "log in"
page.click("role=button[name='log in']")
```

Read more in [our documentation](./selectors#role-selector).

- New [`method: Locator.filter`] API to filter an existing locator

```java
Locator buttonsLocator = page.locator("role=button");
// ...
Locator submitButton = buttonsLocator.filter(new Locator.FilterOptions().setHasText("Submit"));
submitButton.click();
```

- Playwright for Java now supports **Ubuntu 20.04 ARM64** and **Apple M1**.
You can now run Playwright for Java tests on Apple M1, inside Docker on Apple M1, and on Raspberry Pi.


## Version 1.21

### Highlights
Expand Down
70 changes: 70 additions & 0 deletions docs/src/release-notes-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,76 @@ title: "Release notes"

<!-- TOC -->

## Version 1.22

### Highlights

- Components Testing (preview)

Playwright Test can now test your [React](https://reactjs.org/),
[Vue.js](https://vuejs.org/) or [Svelte](https://svelte.dev/) components.
You can use all the features
of Playwright Test (such as parallelization, emulation & debugging) while running components
in real browsers.

Here is what a typical component test looks like:

```ts
// App.spec.tsx
import { test, expect } from '@playwright/experimental-ct-react';
import App from './App';

// Let's test component in a dark scheme!
test.use({ colorScheme: 'dark' });

test('should render', async ({ mount }) => {
const component = await mount(<App></App>);

// As with any Playwright test, assert locator text.
await expect(component).toContainText('React');
// Or do a screenshot 🚀
await expect(component).toHaveScreenshot();
// Or use any Playwright method
await component.click();
});
```

Read more in [our documentation](./test-components).

- Role selectors that allow selecting elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles), [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).

```js
// Click a button with accessible name "log in"
await page.click('role=button[name="log in"]')
```

Read more in [our documentation](./selectors#role-selector).

- New [`method: Locator.filter`] API to filter an existing locator

```js
const buttons = page.locator('role=button');
// ...
const submitButton = buttons.filter({ hasText: 'Submit' });
await submitButton.click();
```

- New web-first assertions [`method: PageAssertions.toHaveScreenshot`] and [`method: LocatorAssertions.toHaveScreenshot`] that
wait for screenshot stabilization and enhances test reliability.

The new assertions has screenshot-specific defaults, such as:
* disables animations
* uses CSS scale option

```js
await page.goto('https://playwright.dev');
await expect(page).toHaveScreenshot();
```

The new [`method: PageAssertions.toHaveScreenshot`] saves screenshots at the same
location as [`method: ScreenshotAssertions.toMatchSnapshot#1`].


## Version 1.21

### Highlights
Expand Down
28 changes: 28 additions & 0 deletions docs/src/release-notes-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,34 @@ title: "Release notes"

<!-- TOC -->

## Version 1.22

### Highlights

- Role selectors that allow selecting elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles), [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).

```py
# Click a button with accessible name "log in"
page.click("role=button[name='log in']")
```

Read more in [our documentation](./selectors#role-selector).

- New [`method: Locator.filter`] API to filter an existing locator

```py
buttons = page.locator("role=button")
# ...
submit_button = buttons.filter(has_text="Submit")
submit_button.click()
```

- Codegen now supports generating Pytest Tests

![Graphics](https://user-images.githubusercontent.com/746130/168098384-40784024-6c26-4426-8255-e714862af6fc.png)



## Version 1.21

### Highlights
Expand Down

0 comments on commit 5268dd7

Please sign in to comment.