diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.md index 2901ff268f..f9d1d7a981 100644 --- a/docs/src/release-notes-csharp.md +++ b/docs/src/release-notes-csharp.md @@ -5,6 +5,62 @@ title: "Release notes" +## Version 1.20 + +### Web-First Assertions + +Playwright for .NET 1.20 introduces [Web-First Assertions](./api/class-playwrightassertions). + +Consider the following example: + +```csharp +using System.Threading.Tasks; +using Microsoft.Playwright.NUnit; +using NUnit.Framework; + +namespace Playwright.TestingHarnessTest.NUnit +{ + public class ExampleTests : PageTest + { + [Test] + public async Task StatusBecomesSubmitted() + { + await Expect(Page.Locator(".status")).ToHaveTextAsync("Submitted"); + } + } +} +``` + +Playwright will be re-testing the node with the selector `.status` until +fetched Node has the `"Submitted"` text. It will be re-fetching the node and +checking it over and over, until the condition is met or until the timeout is +reached. You can pass this timeout as an option. + +Read more in [our documentation](./api/class-playwrightassertions). + +### Other Updates + +- New options for methods [`method: Page.screenshot`], [`method: Locator.screenshot`] and [`method: ElementHandle.screenshot`]: + * Option `ScreenshotAnimations.Disabled` rewinds all CSS animations and transitions to a consistent state + * Option `mask: Locator[]` masks given elements, overlaying them with pink `#FF00FF` boxes. +- [Trace Viewer](./trace-viewer) now shows [API testing requests](./src/test-api-testing). +- [`method: Locator.highlight`] visually reveals element(s) for easier debugging. + +### Announcements + +- v1.20 is the last release to receive WebKit update for macOS 10.15 Catalina. Please update MacOS to keep using latest & greatest WebKit! + +### Browser Versions + +- Chromium 101.0.4921.0 +- Mozilla Firefox 97.0.1 +- WebKit 15.4 + +This version was also tested against the following stable channels: + +- Google Chrome 99 +- Microsoft Edge 99 + ## Version 1.19 ### Highlights diff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.md index dd64943ae9..008f9c6f4d 100644 --- a/docs/src/release-notes-java.md +++ b/docs/src/release-notes-java.md @@ -5,6 +5,32 @@ title: "Release notes" +## Version 1.20 + +### Highlights + +- New options for methods [`method: Page.screenshot`], [`method: Locator.screenshot`] and [`method: ElementHandle.screenshot`]: + * Option `ScreenshotAnimations.DISABLED` rewinds all CSS animations and transitions to a consistent state + * Option `mask: Locator[]` masks given elements, overlaying them with pink `#FF00FF` boxes. +- [Trace Viewer](./trace-viewer) now shows [API testing requests](./src/test-api-testing). +- [`method: Locator.highlight`] visually reveals element(s) for easier debugging. + +### Announcements + +- v1.20 is the last release to receive WebKit update for macOS 10.15 Catalina. Please update MacOS to keep using latest & greatest WebKit! + +### Browser Versions + +- Chromium 101.0.4921.0 +- Mozilla Firefox 97.0.1 +- WebKit 15.4 + +This version was also tested against the following stable channels: + +- Google Chrome 99 +- Microsoft Edge 99 + + ## Version 1.19 ### Highlights diff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.md index 9a9044b140..09dba9c968 100644 --- a/docs/src/release-notes-js.md +++ b/docs/src/release-notes-js.md @@ -7,28 +7,21 @@ title: "Release notes" ## Version 1.20 -### Visual Regression Testing +### Highlights - New options for methods [`method: Page.screenshot`], [`method: Locator.screenshot`] and [`method: ElementHandle.screenshot`]: * Option `animations: "disabled"` rewinds all CSS animations and transitions to a consistent state * Option `mask: Locator[]` masks given elements, overlaying them with pink `#FF00FF` boxes. -- New web-first assertions for screenshots: [`method: PageAssertions.toHaveScreenshot`] and [`method: LocatorAssertions.toHaveScreenshot`]. These methods will re-take screenshot until it matches the saved expectation. When generating a new expectation, the method will re-take screenshots until 2 consecutive screenshots match. - - New methods support both named and anonymous (auto-named) expectations: +- `expect().toMatchSnapshot()` now supports anonymous snapshots: when snapshot name is missing, Playwright Test will generate one + automatically: ```js - // Take a full-page screenshot with a named expectation `fullpage.png`. - await expect(page).toHaveScreenshot('fullpage.png', { fullPage: true }); - // Take a screenshot of an element with anonymous expectation. - await expect(page.locator('text=Booking')).toHaveScreenshot(); + expect('Web is Awesome <3').toMatchSnapshot(); ``` - - Methods support all screenshot options from [`method: Page.screenshot`] and [`method: Locator.screenshot`]. - - These methods also support new `maxDiffPixels` and `maxDiffPixelRatio` options for fine-grained screenshot comparison: +- New `maxDiffPixels` and `maxDiffPixelRatio` options for fine-grained screenshot comparison using `expect().toMatchSnapshot()`: ```js - await expect(page).toHaveScreenshot({ + expect(await page.screenshot()).toMatchSnapshot({ fullPage: true, // take a full page screenshot maxDiffPixels: 27, // allow no more than 27 different pixels. }); @@ -36,8 +29,6 @@ title: "Release notes" It is most convenient to specify `maxDiffPixels` or `maxDiffPixelRatio` once in [`property: TestConfig.expect`]. -### Other Updates - - Playwright Test now adds [`property: TestConfig.fullyParallel`] mode. By default, Playwright Test parallelizes between files. In fully parallel mode, tests inside a single file are also run in parallel. You can also use `--fully-parallel` command line flag. ```ts @@ -62,21 +53,13 @@ title: "Release notes" ``` - [Trace Viewer](./trace-viewer) now shows [API testing requests](./test-api-testing). -- `expect().toMatchSnapshot()` now supports anonymous snapshots: when snapshot name is missing, Playwright Test will generate one - automatically: - - ```js - expect('Web is Awesome <3').toMatchSnapshot(); - ``` - - [`method: Locator.highlight`] visually reveals element(s) for easier debugging. ### Announcements - We now ship a designated Python docker image `mcr.microsoft.com/playwright/python`. Please switch over to it if you use Python. This is the last release that includes Python inside our javascript `mcr.microsoft.com/playwright` docker image. -- v1.20 is the last release that ships WebKit for macOS 10.15 Catalina. All future versions will support WebKit for macOS 11 BigSur - and up. +- v1.20 is the last release to receive WebKit update for macOS 10.15 Catalina. Please update MacOS to keep using latest & greatest WebKit! ### Browser Versions diff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.md index 3df16e28cf..9d67f4edfc 100644 --- a/docs/src/release-notes-python.md +++ b/docs/src/release-notes-python.md @@ -5,6 +5,33 @@ title: "Release notes" +## Version 1.20 + +### Highlights + +- New options for methods [`method: Page.screenshot`], [`method: Locator.screenshot`] and [`method: ElementHandle.screenshot`]: + * Option `animations: "disabled"` rewinds all CSS animations and transitions to a consistent state + * Option `mask: Locator[]` masks given elements, overlaying them with pink `#FF00FF` boxes. +- [Trace Viewer](./trace-viewer) now shows [API testing requests](./src/test-api-testing). +- [`method: Locator.highlight`] visually reveals element(s) for easier debugging. + +### Announcements + +- We now ship a designated Python docker image `mcr.microsoft.com/playwright/python`. Please switch over to it if you use + Python. This is the last release that includes Python inside our javascript `mcr.microsoft.com/playwright` docker image. +- v1.20 is the last release to receive WebKit update for macOS 10.15 Catalina. Please update MacOS to keep using latest & greatest WebKit! + +### Browser Versions + +- Chromium 101.0.4921.0 +- Mozilla Firefox 97.0.1 +- WebKit 15.4 + +This version was also tested against the following stable channels: + +- Google Chrome 99 +- Microsoft Edge 99 + ## Version 1.19 ### Highlights