From def82d1d27763911deb0a5c80fb9bce6daa3d42f Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Fri, 19 May 2023 17:36:42 +0000 Subject: [PATCH] docs: update release notes (#23165) Signed-off-by: Andrey Lushnikov Signed-off-by: Max Schmitt Co-authored-by: Max Schmitt --- docs/src/release-notes-js.md | 16 +++++++++++++++- docs/src/test-assertions-js.md | 5 ++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.md index 15c8acf2a8..f058cd5a09 100644 --- a/docs/src/release-notes-js.md +++ b/docs/src/release-notes-js.md @@ -8,8 +8,10 @@ import LiteYouTube from '@site/src/components/LiteYouTube'; ## Version 1.34 -### New APIs +### Highlights +* UI Mode now shows steps, fixtures and attachments: + ![UI Mode attachments](https://github.com/microsoft/playwright/assets/746130/1d280419-d79a-4a56-b2dc-54d631281d56) * New property [`property: TestProject.teardown`] to specify a project that needs to run after this and all dependent projects have finished. Teardown is useful to cleanup any resources acquired by this project. @@ -46,6 +48,18 @@ import LiteYouTube from '@site/src/components/LiteYouTube'; ], }); ``` +* New method [`expect.configure`](./test-assertions.md#expectconfigure) to + create pre-configured expect instance with its own defaults such as `timeout` + and `soft`. + + ```js + const slowExpect = expect.configure({ timeout: 10000 }); + await slowExpect(locator).toHaveText('Submit'); + + // Always do soft assertions. + const softExpect = expect.configure({ soft: true }); + ``` + * New options `stderr` and `stdout` in [`property: TestConfig.webServer`] to configure output handling: ```js title="playwright.config.ts" diff --git a/docs/src/test-assertions-js.md b/docs/src/test-assertions-js.md index 085fdc1f25..4714d12ae2 100644 --- a/docs/src/test-assertions-js.md +++ b/docs/src/test-assertions-js.md @@ -128,7 +128,10 @@ defaults such as `timeout` and `soft`. ```js const slowExpect = expect.configure({ timeout: 10000 }); -await slowExpect(locator).toHaveText('Submit); +await slowExpect(locator).toHaveText('Submit'); + +// Always do soft assertions. +const softExpect = expect.configure({ soft: true }); ``` ## expect.poll