From 75b8af1b409c5846d65bebb52ac41167faef7ee4 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Wed, 13 Nov 2024 09:16:43 +0000 Subject: [PATCH] chore: release notes for v1.49 js --- docs/src/release-notes-js.md | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.md index 7a2669bc6f9b9..023f38b6c06e1 100644 --- a/docs/src/release-notes-js.md +++ b/docs/src/release-notes-js.md @@ -8,6 +8,36 @@ import LiteYouTube from '@site/src/components/LiteYouTube'; ## Version 1.49 +### Aria snapshots + +New assertion [`method: LocatorAssertions.toMatchAriaSnapshot`] verifies page structure by comparing to an expected accessibility tree, represented as YAML. + +```js +await page.goto('https://playwright.dev'); +await expect(page.locator('body')).toMatchAriaSnapshot(` + - banner: + - heading /Playwright enables reliable/ [level=1] + - link "Get started" + - link "Star microsoft/playwright on GitHub" + - main: + - img "Browsers (Chromium, Firefox, WebKit)" + - heading "Any browser • Any platform • One API" +`); +``` + +You can generate this assertion with [Test Generator](./codegen) and update the expected snapshot with `--update-snapshots` command line flag. + +Learn more in the [aria snapshots guide](./aria-snapshots). + +### Test runner + +- New option [`property: TestConfig.tsconfig`] allows to specify a single `tsconfig` to be used for all tests. +- New method [`method: Test.fail.only`] to focus on a failing test. +- Options [`property: TestConfig.globalSetup`] and [`property: TestConfig.globalTeardown`] now support multiple setups/teardowns. +- New value `'on-first-failure'` for [`property: TestOptions.screenshot`]. +- Added "previous" and "next" buttons to the HTML report to quickly switch between test cases. +- New properties [`property: TestInfoError.cause`] and [`property: TestError.cause`] mirroring [`Error.cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause). + ### Breaking: channels `chrome`, `msedge` and similar switch to new headless Prior to this release, Playwright was running the old established implementation of [Chromium headless mode](https://developer.chrome.com/docs/chromium/headless). However, Chromium had entirely **switched to the new headless mode**, and **removed the old one**. @@ -56,6 +86,18 @@ export default defineConfig({ }); ``` +### Other breaking changes + +- There will be no more updates for WebKit on Ubuntu 20.04 and Debian 11. We recommend updating your OS to a later version. +- Package `@playwright/experimental-ct-vue2` will no longer be updated. +- Package `@playwright/experimental-ct-solid` will no longer be updated. + +### Miscellaneous + +- `` elements inside a snapshot now draw a preview. +- New method [`method: Tracing.group`] to visually group actions in the trace. +- Playwright docker images switched from Node.js v20 to Node.js v22 LTS. + ### Browser Versions - Chromium 131.0.6778.33