From 9e3c972b68688a5301a1cfef5d9c852acbb9afef Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 14 Sep 2022 22:00:03 +0200 Subject: [PATCH 1/3] docs(release-notes): add 1.26 release notes for language ports --- docs/src/api/class-locatorassertions.md | 2 +- docs/src/release-notes-csharp.md | 32 ++++++++++++++++++++++++ docs/src/release-notes-java.md | 30 ++++++++++++++++++++++ docs/src/release-notes-js.md | 1 + docs/src/release-notes-python.md | 30 ++++++++++++++++++++++ packages/playwright-test/types/test.d.ts | 2 +- 6 files changed, 95 insertions(+), 2 deletions(-) diff --git a/docs/src/api/class-locatorassertions.md b/docs/src/api/class-locatorassertions.md index 935fa90ed2ce8..9fb6b2eaf47b8 100644 --- a/docs/src/api/class-locatorassertions.md +++ b/docs/src/api/class-locatorassertions.md @@ -958,7 +958,7 @@ presence. ```js const locator = page.locator('input'); -// Assert attribute existance. +// Assert attribute existence. await expect(locator).toHaveAttribute('disabled'); await expect(locator).not.toHaveAttribute('open'); ``` diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.md index 91f01a9c75b26..1de622b0a4cfa 100644 --- a/docs/src/release-notes-csharp.md +++ b/docs/src/release-notes-csharp.md @@ -4,6 +4,38 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.26 + +### Assertions + +- [`method: LocatorAssertions.toHaveAttribute`] can now be used for asserting attribute existence. +- New option `Enabled` for [`method: LocatorAssertions.toBeEnabled`]. +- [`method: LocatorAssertions.toHaveText`] now pierces open shadow roots. +- New option `Editable` for [`method: LocatorAssertions.toBeEditable`]. +- New option `Visible` for [`method: LocatorAssertions.toBeVisible`]. +- [`method: ResponseAssertions.toBeOK`] is now available. + +### Other highlights + +- New option `MaxRedirects` for [`method: APIRequestContext.get`] and others to limit redirect count. +- Codegen supports now NUnit and MSTest frameworks. +- ASP .NET is now supported. + +### Behavior Change + +A bunch of Playwright APIs already support the `WaitUntil: WaitUntilState.DOMContentLoaded` option. +For example: + +```csharp +await Page.GotoAsync("https://playwright.dev", new() { WaitUntil = WaitUntilState.DOMContentLoaded }); +``` + +Prior to 1.26, this would wait for all iframes to fire the `DOMContentLoaded` +event. + +To align with web specification, the `WaitUntilState.DOMContentLoaded` value only waits for +the target frame to fire the `'DOMContentLoaded'` event. Use `WaitUntil: WaitUntilState.Load` to wait for all iframes. + ## Version 1.25 ### New .runsettings file support diff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.md index 1e57cb3fda26d..3c49efc246e33 100644 --- a/docs/src/release-notes-java.md +++ b/docs/src/release-notes-java.md @@ -4,6 +4,36 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.26 + +### Assertions + +- [`method: LocatorAssertions.toHaveAttribute`] can now be used for asserting attribute existence. +- New option `setEnabled` for [`method: LocatorAssertions.toBeEnabled`]. +- [`method: LocatorAssertions.toHaveText`] now pierces open shadow roots. +- New option `setEditable` for [`method: LocatorAssertions.toBeEditable`]. +- New option `setVisible` for [`method: LocatorAssertions.toBeVisible`]. + +### Other highlights + +- New option `setMaxRedirects` for [`method: APIRequestContext.get`] and others to limit redirect count. +- Docker images are now using OpenJDK 17. + +### Behavior Change + +A bunch of Playwright APIs already support the `setWaitUntil(WaitUntilState.DOMCONTENTLOADED)` option. +For example: + +```js +page.navigate("https://playwright.dev", new Page.NavigateOptions().setWaitUntil(WaitUntilState.DOMCONTENTLOADED)); +``` + +Prior to 1.26, this would wait for all iframes to fire the `DOMContentLoaded` +event. + +To align with web specification, the `WaitUntilState.DOMCONTENTLOADED` value only waits for +the target frame to fire the `'DOMContentLoaded'` event. Use `setWaitUntil(WaitUntilState.LOAD)` to wait for all iframes. + ## Version 1.25 ### New APIs & changes diff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.md index fab7e1f28e262..1fe7fa3217dda 100644 --- a/docs/src/release-notes-js.md +++ b/docs/src/release-notes-js.md @@ -18,6 +18,7 @@ Read more in [our documentation](./docker#experimental-playwright-test-docker-in ### Assertions +- [`method: LocatorAssertions.toHaveAttribute`] can now be used for asserting attribute existence. - New option `enabled` for [`method: LocatorAssertions.toBeEnabled`]. - [`method: LocatorAssertions.toHaveText`] now pierces open shadow roots. - New option `editable` for [`method: LocatorAssertions.toBeEditable`]. diff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.md index 4fcea137c1609..6becb125c7448 100644 --- a/docs/src/release-notes-python.md +++ b/docs/src/release-notes-python.md @@ -4,6 +4,36 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.26 + +### Assertions + +- [`method: LocatorAssertions.toHaveAttribute`] can now be used for asserting attribute existence. +- New option `enabled` for [`method: LocatorAssertions.toBeEnabled`]. +- [`method: LocatorAssertions.toHaveText`] now pierces open shadow roots. +- New option `editable` for [`method: LocatorAssertions.toBeEditable`]. +- New option `visible` for [`method: LocatorAssertions.toBeVisible`]. + +### Other highlights + +- New option `max_redirects` for [`method: APIRequestContext.get`] and others to limit redirect count. +- Python 3.11 is now supported. + +### Behavior Change + +A bunch of Playwright APIs already support the `wait_ntil: "domcontentloaded"` option. +For example: + +```python +page.goto("https://playwright.dev", waitUntil="domcontentloaded") +``` + +Prior to 1.26, this would wait for all iframes to fire the `DOMContentLoaded` +event. + +To align with web specification, the `'domcontentloaded'` value only waits for +the target frame to fire the `'DOMContentLoaded'` event. Use `wait_until="load"` to wait for all iframes. + ## Version 1.25 ### Announcements diff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright-test/types/test.d.ts index 4687c35e279b9..c5750e9cb4c84 100644 --- a/packages/playwright-test/types/test.d.ts +++ b/packages/playwright-test/types/test.d.ts @@ -3461,7 +3461,7 @@ interface LocatorAssertions { * * ```js * const locator = page.locator('input'); - * // Assert attribute existance. + * // Assert attribute existence. * await expect(locator).toHaveAttribute('disabled'); * await expect(locator).not.toHaveAttribute('open'); * ``` From bb88406dcea4c4695daab87374cc5ae42208664f Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 14 Sep 2022 22:27:52 +0200 Subject: [PATCH 2/3] review --- docs/src/release-notes-csharp.md | 2 +- docs/src/release-notes-java.md | 6 +++--- docs/src/release-notes-python.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.md index 1de622b0a4cfa..e0e69d2da0b39 100644 --- a/docs/src/release-notes-csharp.md +++ b/docs/src/release-notes-csharp.md @@ -18,7 +18,7 @@ toc_max_heading_level: 2 ### Other highlights - New option `MaxRedirects` for [`method: APIRequestContext.get`] and others to limit redirect count. -- Codegen supports now NUnit and MSTest frameworks. +- Codegen now supports NUnit and MSTest frameworks. - ASP .NET is now supported. ### Behavior Change diff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.md index 3c49efc246e33..9e84e8dba94ad 100644 --- a/docs/src/release-notes-java.md +++ b/docs/src/release-notes-java.md @@ -9,10 +9,10 @@ toc_max_heading_level: 2 ### Assertions - [`method: LocatorAssertions.toHaveAttribute`] can now be used for asserting attribute existence. -- New option `setEnabled` for [`method: LocatorAssertions.toBeEnabled`]. +- New option `enabled` for [`method: LocatorAssertions.toBeEnabled`]. - [`method: LocatorAssertions.toHaveText`] now pierces open shadow roots. -- New option `setEditable` for [`method: LocatorAssertions.toBeEditable`]. -- New option `setVisible` for [`method: LocatorAssertions.toBeVisible`]. +- New option `editable` for [`method: LocatorAssertions.toBeEditable`]. +- New option `visible` for [`method: LocatorAssertions.toBeVisible`]. ### Other highlights diff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.md index 6becb125c7448..956e2caf14a0d 100644 --- a/docs/src/release-notes-python.md +++ b/docs/src/release-notes-python.md @@ -21,11 +21,11 @@ toc_max_heading_level: 2 ### Behavior Change -A bunch of Playwright APIs already support the `wait_ntil: "domcontentloaded"` option. +A bunch of Playwright APIs already support the `wait_until: "domcontentloaded"` option. For example: ```python -page.goto("https://playwright.dev", waitUntil="domcontentloaded") +page.goto("https://playwright.dev", wait_until="domcontentloaded") ``` Prior to 1.26, this would wait for all iframes to fire the `DOMContentLoaded` From 22cbb187489aa38e308d28d33882d7903e5c8c8e Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 14 Sep 2022 22:30:37 +0200 Subject: [PATCH 3/3] fixes --- docs/src/release-notes-csharp.md | 4 ++-- docs/src/release-notes-java.md | 2 +- docs/src/release-notes-js.md | 2 +- docs/src/release-notes-python.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.md index e0e69d2da0b39..24f29b117aaf2 100644 --- a/docs/src/release-notes-csharp.md +++ b/docs/src/release-notes-csharp.md @@ -8,12 +8,12 @@ toc_max_heading_level: 2 ### Assertions -- [`method: LocatorAssertions.toHaveAttribute`] can now be used for asserting attribute existence. +- [`method: LocatorAssertions.toHaveAttribute#2`] can now be used for asserting attribute existence. - New option `Enabled` for [`method: LocatorAssertions.toBeEnabled`]. - [`method: LocatorAssertions.toHaveText`] now pierces open shadow roots. - New option `Editable` for [`method: LocatorAssertions.toBeEditable`]. - New option `Visible` for [`method: LocatorAssertions.toBeVisible`]. -- [`method: ResponseAssertions.toBeOK`] is now available. +- [`method: APIResponseAssertions.toBeOK`] is now available. ### Other highlights diff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.md index 9e84e8dba94ad..16b4240dbaa07 100644 --- a/docs/src/release-notes-java.md +++ b/docs/src/release-notes-java.md @@ -8,7 +8,7 @@ toc_max_heading_level: 2 ### Assertions -- [`method: LocatorAssertions.toHaveAttribute`] can now be used for asserting attribute existence. +- [`method: LocatorAssertions.toHaveAttribute#2`] can now be used for asserting attribute existence. - New option `enabled` for [`method: LocatorAssertions.toBeEnabled`]. - [`method: LocatorAssertions.toHaveText`] now pierces open shadow roots. - New option `editable` for [`method: LocatorAssertions.toBeEditable`]. diff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.md index 1fe7fa3217dda..d744c0c4017a3 100644 --- a/docs/src/release-notes-js.md +++ b/docs/src/release-notes-js.md @@ -18,7 +18,7 @@ Read more in [our documentation](./docker#experimental-playwright-test-docker-in ### Assertions -- [`method: LocatorAssertions.toHaveAttribute`] can now be used for asserting attribute existence. +- [`method: LocatorAssertions.toHaveAttribute#2`] can now be used for asserting attribute existence. - New option `enabled` for [`method: LocatorAssertions.toBeEnabled`]. - [`method: LocatorAssertions.toHaveText`] now pierces open shadow roots. - New option `editable` for [`method: LocatorAssertions.toBeEditable`]. diff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.md index 956e2caf14a0d..3988b841565a7 100644 --- a/docs/src/release-notes-python.md +++ b/docs/src/release-notes-python.md @@ -8,7 +8,7 @@ toc_max_heading_level: 2 ### Assertions -- [`method: LocatorAssertions.toHaveAttribute`] can now be used for asserting attribute existence. +- [`method: LocatorAssertions.toHaveAttribute#2`] can now be used for asserting attribute existence. - New option `enabled` for [`method: LocatorAssertions.toBeEnabled`]. - [`method: LocatorAssertions.toHaveText`] now pierces open shadow roots. - New option `editable` for [`method: LocatorAssertions.toBeEditable`].