Microsoft/playwright
### [`v1.24.1`](https://togithub.com/microsoft/playwright/releases/tag/v1.24.1)
[Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.24.0...v1.24.1)
#### Highlights
This patch includes the following bug fixes:
[https://github.com/microsoft/playwright/issues/15898](https://togithub.com/microsoft/playwright/issues/15898) - \[BUG] Typescript error: The type for webServer config property (TestConfigWebServer) is not typed correctly[https://github.com/microsoft/playwright/issues/15913](https://togithub.com/microsoft/playwright/issues/15913)3 - \[BUG] hooksConfig is required for mount fixtur[https://github.com/microsoft/playwright/issues/15932](https://togithub.com/microsoft/playwright/issues/15932)32 - \[BUG] - Install MS Edge on CI Fails
#### Browser Versions
- Chromium 104.0.5112.48
- Mozilla Firefox 102.0
- WebKit 16.0
This version was also tested against the following stable channels:
- Google Chrome 103
- Microsoft Edge 103
### [`v1.24.0`](https://togithub.com/microsoft/playwright/releases/tag/v1.24.0)
[Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.23.4...v1.24.0)
#### 🌍 Multiple Web Servers in `playwright.config.ts`
Launch multiple web servers, databases, or other processes by passing an array of configurations:
```ts
// playwright.config.ts
import type { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
webServer: [
{
command: 'npm run start',
port: 3000,
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
},
{
command: 'npm run backend',
port: 3333,
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
}
],
use: {
baseURL: 'http://localhost:3000/',
},
};
export default config;
```
#### 🐂 Debian 11 Bullseye Support
Playwright now supports Debian 11 Bullseye on x86\_64 for Chromium, Firefox and WebKit. Let us know
if you encounter any issues!
Linux support looks like this:
| | Ubuntu 18.04 | Ubuntu 20.04 | Ubuntu 22.04 | Debian 11
| :--- | :---: | :---: | :---: | :---: |
| Chromium | ✅ | ✅ | ✅ | ✅ |
| WebKit | ✅ | ✅ | ✅ | ✅ |
| Firefox | ✅ | ✅ | ✅ | ✅ |
#### 🕵️ Anonymous Describe
It is now possible to call [`test.describe(callback)`](https://playwright.dev/docs/api/class-test#test-describe-2) to create suites without a title. This is useful for giving a group of tests a common option with [`test.use(options)`](https://playwright.dev/docs/api/class-test#test-use).
```ts
test.describe(() => {
test.use({ colorScheme: 'dark' });
test('one', async ({ page }) => {
// ...
});
test('two', async ({ page }) => {
// ...
});
});
```
#### 🧩 Component Tests Update
Playwright 1.24 Component Tests introduce `beforeMount` and `afterMount` hooks.
Use these to configure your app for tests.
##### Vue + Vue Router
For example, this could be used to setup App router in Vue.js:
```js
// src/component.spec.ts
import { test } from '@playwright/experimental-ct-vue';
import { Component } from './mycomponent';
test('should work', async ({ mount }) => {
const component = await mount(Component, {
hooksConfig: {
/* anything to configure your app */
}
});
});
```
```js
// playwright/index.ts
import { router } from '../router';
import { beforeMount } from '@playwright/experimental-ct-vue/hooks';
beforeMount(async ({ app, hooksConfig }) => {
app.use(router);
});
```
##### React + Next.js
A similar configuration in Next.js would look like this:
```js
// src/component.spec.jsx
import { test } from '@playwright/experimental-ct-react';
import { Component } from './mycomponent';
test('should work', async ({ mount }) => {
const component = await mount(, {
// Pass mock value from test into `beforeMount`.
hooksConfig: {
router: {
query: { page: 1, per_page: 10 },
asPath: '/posts'
}
}
});
});
```
```js
// playwright/index.js
import router from 'next/router';
import { beforeMount } from '@playwright/experimental-ct-react/hooks';
beforeMount(async ({ hooksConfig }) => {
// Before mount, redefine useRouter to return mock value from test.
router.useRouter = () => hooksConfig.router;
});
```
#### Browser Versions
- Chromium 104.0.5112.48
- Mozilla Firefox 102.0
- WebKit 16.0
This version was also tested against the following stable channels:
- Google Chrome 103
- Microsoft Edge 103
### [`v1.23.4`](https://togithub.com/microsoft/playwright/releases/tag/v1.23.4)
[Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.23.3...v1.23.4)
#### Highlights
This patch includes the following bug fix:
[https://github.com/microsoft/playwright/issues/15717](https://togithub.com/microsoft/playwright/issues/15717) - \[REGRESSION]: Suddenly stopped working despite nothing having changed (`experimentalLoader.js:load` did not call the next hook in its chain and did not explicitly signal a short circuit)
#### Browser Versions
- Chromium 104.0.5112.20
- Mozilla Firefox 100.0.2
- WebKit 15.4
This version was also tested against the following stable channels:
- Google Chrome 103
- Microsoft Edge 103
### [`v1.23.3`](https://togithub.com/microsoft/playwright/releases/tag/v1.23.3)
[Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.23.2...v1.23.3)
#### Highlights
This patch includes the following bug fixes:
[https://github.com/microsoft/playwright/issues/15557](https://togithub.com/microsoft/playwright/issues/15557) - \[REGRESSION]: Event Listeners not being removed if same handler is used for different events
#### Browser Versions
- Chromium 104.0.5112.20
- Mozilla Firefox 100.0.2
- WebKit 15.4
This version was also tested against the following stable channels:
- Google Chrome 103
- Microsoft Edge 103
### [`v1.23.2`](https://togithub.com/microsoft/playwright/releases/tag/v1.23.2)
[Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.23.1...v1.23.2)
##### Highlights
This patch includes the following bug fixes:
[https://github.com/microsoft/playwright/issues/15273](https://togithub.com/microsoft/playwright/issues/15273) - \[BUG] LaunchOptions config has no effect after update to v1.23.0[https://github.com/microsoft/playwright/issues/15351](https://togithub.com/microsoft/playwright/issues/15351)1 - \[REGRESSION]: Component testing project does not compile anymor[https://github.com/microsoft/playwright/issues/15431](https://togithub.com/microsoft/playwright/issues/15431)31 - \[BUG] Regression: page.on('console') is ignored in 1.23
##### Browser Versions
- Chromium 104.0.5112.20
- Mozilla Firefox 100.0.2
- WebKit 15.4
This version was also tested against the following stable channels:
- Google Chrome 103
- Microsoft Edge 103
### [`v1.23.1`](https://togithub.com/microsoft/playwright/releases/tag/v1.23.1)
[Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.23.0...v1.23.1)
#### Highlights
This patch includes the following bug fixes:
[https://github.com/microsoft/playwright/issues/15219](https://togithub.com/microsoft/playwright/issues/15219) - \[REGRESSION]: playwright-core 1.23.0 issue with 'TypeError \[ERR_INVALID_ARG_TYPE]: The "listener" argument'
#### Browser Versions
- Chromium 104.0.5112.20
- Mozilla Firefox 100.0.2
- WebKit 15.4
This version was also tested against the following stable channels:
- Google Chrome 103
- Microsoft Edge 103
### [`v1.23.0`](https://togithub.com/microsoft/playwright/releases/tag/v1.23.0)
[Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.22.2...v1.23.0)
Playwright v1.23 updates
#### Network Replay
Now you can record network traffic into a HAR file and re-use the data in your tests.
To record network into HAR file:
```bash
npx playwright open --save-har=github.har.zip https://github.com/microsoft
```
Alternatively, you can record HAR programmatically:
```ts
const context = await browser.newContext({
recordHar: { path: 'github.har.zip' }
});
// ... do stuff ...
await context.close();
```
Use the new methods [`page.routeFromHAR()`](https://playwright.dev/docs/api/class-page#page-route-from-har) or [`browserContext.routeFromHAR()`](https://playwright.dev/docs/api/class-browsercontext#browser-context-route-from-har) to serve matching responses from the [HAR](http://www.softwareishard.com/blog/har-12-spec/) file:
```ts
await context.routeFromHAR('github.har.zip');
```
Read more in [our documentation](https://playwright.dev/docs/network#record-and-replay-requests).
##### Advanced Routing
You can now use [`route.fallback()`](https://playwright.dev/docs/api/class-route#route-fallback) to defer routing to other handlers.
Consider the following example:
```ts
// Remove a header from all requests.
test.beforeEach(async ({ page }) => {
await page.route('**/*', route => {
const headers = route.request().headers();
delete headers['if-none-match'];
route.fallback({ headers });
});
});
test('should work', async ({ page }) => {
await page.route('**/*', route => {
if (route.request().resourceType() === 'image')
route.abort();
else
route.fallback();
});
});
```
Note that the new methods [`page.routeFromHAR()`](https://playwright.dev/docs/api/class-page#page-route-from-har) and [`browserContext.routeFromHAR()`](https://playwright.dev/docs/api/class-browsercontext#browser-context-route-from-har) also participate in routing and could be deferred to.
##### Web-First Assertions Update
- New method [`expect(locator).toHaveValues()`](https://playwright.dev/docs/test-assertions#locator-assertions-to-have-values) that asserts all selected values of `
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
1.22.2
->1.24.1
Release Notes
Microsoft/playwright
### [`v1.24.1`](https://togithub.com/microsoft/playwright/releases/tag/v1.24.1) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.24.0...v1.24.1) #### Highlights This patch includes the following bug fixes: [https://github.com/microsoft/playwright/issues/15898](https://togithub.com/microsoft/playwright/issues/15898) - \[BUG] Typescript error: The type for webServer config property (TestConfigWebServer) is not typed correctly[https://github.com/microsoft/playwright/issues/15913](https://togithub.com/microsoft/playwright/issues/15913)3 - \[BUG] hooksConfig is required for mount fixtur[https://github.com/microsoft/playwright/issues/15932](https://togithub.com/microsoft/playwright/issues/15932)32 - \[BUG] - Install MS Edge on CI Fails #### Browser Versions - Chromium 104.0.5112.48 - Mozilla Firefox 102.0 - WebKit 16.0 This version was also tested against the following stable channels: - Google Chrome 103 - Microsoft Edge 103 ### [`v1.24.0`](https://togithub.com/microsoft/playwright/releases/tag/v1.24.0) [Compare Source](https://togithub.com/Microsoft/playwright/compare/v1.23.4...v1.24.0) #### 🌍 Multiple Web Servers in `playwright.config.ts` Launch multiple web servers, databases, or other processes by passing an array of configurations: ```ts // playwright.config.ts import type { PlaywrightTestConfig } from '@playwright/test'; const config: PlaywrightTestConfig = { webServer: [ { command: 'npm run start', port: 3000, timeout: 120 * 1000, reuseExistingServer: !process.env.CI, }, { command: 'npm run backend', port: 3333, timeout: 120 * 1000, reuseExistingServer: !process.env.CI, } ], use: { baseURL: 'http://localhost:3000/', }, }; export default config; ``` #### 🐂 Debian 11 Bullseye Support Playwright now supports Debian 11 Bullseye on x86\_64 for Chromium, Firefox and WebKit. Let us know if you encounter any issues! Linux support looks like this: | | Ubuntu 18.04 | Ubuntu 20.04 | Ubuntu 22.04 | Debian 11 | :--- | :---: | :---: | :---: | :---: | | Chromium | ✅ | ✅ | ✅ | ✅ | | WebKit | ✅ | ✅ | ✅ | ✅ | | Firefox | ✅ | ✅ | ✅ | ✅ | #### 🕵️ Anonymous Describe It is now possible to call [`test.describe(callback)`](https://playwright.dev/docs/api/class-test#test-describe-2) to create suites without a title. This is useful for giving a group of tests a common option with [`test.use(options)`](https://playwright.dev/docs/api/class-test#test-use). ```ts test.describe(() => { test.use({ colorScheme: 'dark' }); test('one', async ({ page }) => { // ... }); test('two', async ({ page }) => { // ... }); }); ``` #### 🧩 Component Tests Update Playwright 1.24 Component Tests introduce `beforeMount` and `afterMount` hooks. Use these to configure your app for tests. ##### Vue + Vue Router For example, this could be used to setup App router in Vue.js: ```js // src/component.spec.ts import { test } from '@playwright/experimental-ct-vue'; import { Component } from './mycomponent'; test('should work', async ({ mount }) => { const component = await mount(Component, { hooksConfig: { /* anything to configure your app */ } }); }); ``` ```js // playwright/index.ts import { router } from '../router'; import { beforeMount } from '@playwright/experimental-ct-vue/hooks'; beforeMount(async ({ app, hooksConfig }) => { app.use(router); }); ``` ##### React + Next.js A similar configuration in Next.js would look like this: ```js // src/component.spec.jsx import { test } from '@playwright/experimental-ct-react'; import { Component } from './mycomponent'; test('should work', async ({ mount }) => { const component = await mount(Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.