chore(deps): update dependency @playwright/test to v1.46.1 #23

Merged
kjuulh merged 1 commits from renovate/playwright-monorepo into main 2024-08-22 00:20:17 +02:00
Owner

This PR contains the following updates:

Package Type Update Change
@playwright/test (source) devDependencies minor 1.45.1 -> 1.46.1

Release Notes

microsoft/playwright (@​playwright/test)

v1.46.1

Compare Source

Highlights

https://github.com/microsoft/playwright/issues/32004 - [REGRESSION]: Client Certificates don't work with Microsoft IIS
https://github.com/microsoft/playwright/issues/32004 - [REGRESSION]: Websites stall on TLS handshake errors when using Client Certificates
https://github.com/microsoft/playwright/issues/32146 - [BUG]: Credential scanners warn about internal socks-proxy TLS certificates
https://github.com/microsoft/playwright/issues/32056 - [REGRESSION]: 1.46.0 (TypeScript) - custom fixtures extend no longer chainable
https://github.com/microsoft/playwright/issues/32070 - [Bug]: --only-changed flag and project dependencies
https://github.com/microsoft/playwright/issues/32188 - [Bug]: --only-changed with shallow clone throws "unknown revision" error

Browser Versions

  • Chromium 128.0.6613.18
  • Mozilla Firefox 128.0
  • WebKit 18.0

This version was also tested against the following stable channels:

  • Google Chrome 127
  • Microsoft Edge 127

v1.46.0

Compare Source

TLS Client Certificates

Playwright now allows to supply client-side certificates, so that server can verify them, as specified by TLS Client Authentication.

When client certificates are specified, all browser traffic is routed through a proxy that establishes the secure TLS connection, provides client certificates to the server and validates server certificates.

The following snippet sets up a client certificate for https://example.com:

import { defineConfig } from '@​playwright/test';

export default defineConfig({
  // ...
  use: {
    clientCertificates: [{
      origin: 'https://example.com',
      certPath: './cert.pem',
      keyPath: './key.pem',
      passphrase: 'mysecretpassword',
    }],
  },
  // ...
});

You can also provide client certificates to a particular test project or as a parameter of browser.newContext() and apiRequest.newContext().

--only-changed cli option

New CLI option --only-changed allows to only run test files that have been changed since the last git commit or from a specific git "ref".


### Only run test files with uncommitted changes
npx playwright test --only-changed

### Only run test files changed relative to the "main" branch
npx playwright test --only-changed=main

Component Testing: New router fixture

This release introduces an experimental router fixture to intercept and handle network requests in component testing.
There are two ways to use the router fixture:

  • Call router.route(url, handler) that behaves similarly to page.route().
  • Call router.use(handlers) and pass MSW library request handlers to it.

Here is an example of reusing your existing MSW handlers in the test.

import { handlers } from '@​src/mocks/handlers';

test.beforeEach(async ({ router }) => {
  // install common handlers before each test
  await router.use(...handlers);
});

test('example test', async ({ mount }) => {
  // test as usual, your handlers are active
  // ...
});

This fixture is only available in component tests.

UI Mode / Trace Viewer Updates

  • Test annotations are now shown in UI mode.
  • Content of text attachments is now rendered inline in the attachments pane.
  • New setting to show/hide routing actions like route.continue().
  • Request method and status are shown in the network details tab.
  • New button to copy source file location to clipboard.
  • Metadata pane now displays the baseURL.

Miscellaneous

Possibly breaking change

Fixture values that are array of objects, when specified in the test.use() block, may require being wrapped into a fixture tuple. This is best seen on the example:

import { test as base } from '@​playwright/test';

// Define an option fixture that has an "array of objects" value
type User = { name: string, password: string };
const test = base.extend<{ users: User[] }>({
  users: [ [], { option: true } ],
}); 

// Specify option value in the test.use block.
test.use({
  // WRONG: this syntax may not work for you
  users: [
    { name: 'John Doe', password: 'secret' },
    { name: 'John Smith', password: 's3cr3t' },
  ],
  // CORRECT: this syntax will work. Note extra [] around the value, and the "scope" property.
  users: [[
    { name: 'John Doe', password: 'secret' },
    { name: 'John Smith', password: 's3cr3t' },
  ], { scope: 'test' }],
});

test('example test', async () => {
  // ...
});

Browser Versions

  • Chromium 128.0.6613.18
  • Mozilla Firefox 128.0
  • WebKit 18.0

This version was also tested against the following stable channels:

  • Google Chrome 127
  • Microsoft Edge 127

v1.45.3

Compare Source

Highlights

https://github.com/microsoft/playwright/issues/31764 - [Bug]: some actions do not appear in the trace file
https://github.com/microsoft/playwright-java/issues/1617 - [Bug]: Traceviewer not reporting all actions

Browser Versions

  • Chromium 127.0.6533.5
  • Mozilla Firefox 127.0
  • WebKit 17.4

This version was also tested against the following stable channels:

  • Google Chrome 126
  • Microsoft Edge 126

v1.45.2

Compare Source

Highlights

https://github.com/microsoft/playwright/issues/31613 - [REGRESSION]: Trace is not showing any screenshots nor test name
https://github.com/microsoft/playwright/issues/31601 - [REGRESSION]: missing trace for 2nd browser
https://github.com/microsoft/playwright/issues/31541 - [REGRESSION]: Failing tests have a trace with no images and with steps missing

Browser Versions

  • Chromium 127.0.6533.5
  • Mozilla Firefox 127.0
  • WebKit 17.4

This version was also tested against the following stable channels:

  • Google Chrome 126
  • Microsoft Edge 126

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, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@playwright/test](https://playwright.dev) ([source](https://github.com/microsoft/playwright)) | devDependencies | minor | [`1.45.1` -> `1.46.1`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.45.1/1.46.1) | --- ### Release Notes <details> <summary>microsoft/playwright (@&#8203;playwright/test)</summary> ### [`v1.46.1`](https://github.com/microsoft/playwright/releases/tag/v1.46.1) [Compare Source](https://github.com/microsoft/playwright/compare/v1.46.0...v1.46.1) ##### Highlights https://github.com/microsoft/playwright/issues/32004 - \[REGRESSION]: Client Certificates don't work with Microsoft IIS https://github.com/microsoft/playwright/issues/32004 - \[REGRESSION]: Websites stall on TLS handshake errors when using Client Certificates https://github.com/microsoft/playwright/issues/32146 - \[BUG]: Credential scanners warn about internal socks-proxy TLS certificates https://github.com/microsoft/playwright/issues/32056 - \[REGRESSION]: 1.46.0 (TypeScript) - custom fixtures extend no longer chainable https://github.com/microsoft/playwright/issues/32070 - \[Bug]: --only-changed flag and project dependencies https://github.com/microsoft/playwright/issues/32188 - \[Bug]: --only-changed with shallow clone throws "unknown revision" error #### Browser Versions - Chromium 128.0.6613.18 - Mozilla Firefox 128.0 - WebKit 18.0 This version was also tested against the following stable channels: - Google Chrome 127 - Microsoft Edge 127 ### [`v1.46.0`](https://github.com/microsoft/playwright/releases/tag/v1.46.0) [Compare Source](https://github.com/microsoft/playwright/compare/v1.45.3...v1.46.0) #### TLS Client Certificates Playwright now allows to supply client-side certificates, so that server can verify them, as specified by TLS Client Authentication. When client certificates are specified, all browser traffic is routed through a proxy that establishes the secure TLS connection, provides client certificates to the server and validates server certificates. The following snippet sets up a client certificate for `https://example.com`: ```ts import { defineConfig } from '@&#8203;playwright/test'; export default defineConfig({ // ... use: { clientCertificates: [{ origin: 'https://example.com', certPath: './cert.pem', keyPath: './key.pem', passphrase: 'mysecretpassword', }], }, // ... }); ``` You can also provide client certificates to a particular [test project](https://playwright.dev/docs/api/class-testproject#test-project-use) or as a parameter of [browser.newContext()](https://playwright.dev/docs/api/class-browser#browser-new-context) and [apiRequest.newContext()](https://playwright.dev/docs/api/class-apirequest#api-request-new-context). #### `--only-changed` cli option New CLI option `--only-changed` allows to only run test files that have been changed since the last git commit or from a specific git "ref". ```sh ### Only run test files with uncommitted changes npx playwright test --only-changed ### Only run test files changed relative to the "main" branch npx playwright test --only-changed=main ``` #### Component Testing: New `router` fixture This release introduces an experimental `router` fixture to intercept and handle network requests in component testing. There are two ways to use the router fixture: - Call `router.route(url, handler)` that behaves similarly to [page.route()](https://playwright.dev/docs/api/class-page#page-route). - Call `router.use(handlers)` and pass [MSW library](https://mswjs.io) request handlers to it. Here is an example of reusing your existing MSW handlers in the test. ```ts import { handlers } from '@&#8203;src/mocks/handlers'; test.beforeEach(async ({ router }) => { // install common handlers before each test await router.use(...handlers); }); test('example test', async ({ mount }) => { // test as usual, your handlers are active // ... }); ``` This fixture is only available in [component tests](https://playwright.dev/docs/test-components#handling-network-requests). #### UI Mode / Trace Viewer Updates - Test annotations are now shown in UI mode. - Content of text attachments is now rendered inline in the attachments pane. - New setting to show/hide routing actions like [route.continue()](https://playwright.dev/docs/api/class-route#route-continue). - Request method and status are shown in the network details tab. - New button to copy source file location to clipboard. - Metadata pane now displays the `baseURL`. #### Miscellaneous - New `maxRetries` option in [apiRequestContext.fetch()](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-fetch) which retries on the `ECONNRESET` network error. - New option to [box a fixture](https://playwright.dev/docs/test-fixtures#box-fixtures) to minimize the fixture exposure in test reports and error messages. - New option to provide a [custom fixture title](https://playwright.dev/docs/test-fixtures#custom-fixture-title) to be used in test reports and error messages. #### Possibly breaking change Fixture values that are array of objects, when specified in the `test.use()` block, may require being wrapped into a fixture tuple. This is best seen on the example: ```ts import { test as base } from '@&#8203;playwright/test'; // Define an option fixture that has an "array of objects" value type User = { name: string, password: string }; const test = base.extend<{ users: User[] }>({ users: [ [], { option: true } ], }); // Specify option value in the test.use block. test.use({ // WRONG: this syntax may not work for you users: [ { name: 'John Doe', password: 'secret' }, { name: 'John Smith', password: 's3cr3t' }, ], // CORRECT: this syntax will work. Note extra [] around the value, and the "scope" property. users: [[ { name: 'John Doe', password: 'secret' }, { name: 'John Smith', password: 's3cr3t' }, ], { scope: 'test' }], }); test('example test', async () => { // ... }); ``` #### Browser Versions - Chromium 128.0.6613.18 - Mozilla Firefox 128.0 - WebKit 18.0 This version was also tested against the following stable channels: - Google Chrome 127 - Microsoft Edge 127 ### [`v1.45.3`](https://github.com/microsoft/playwright/releases/tag/v1.45.3) [Compare Source](https://github.com/microsoft/playwright/compare/v1.45.2...v1.45.3) ##### Highlights https://github.com/microsoft/playwright/issues/31764 - \[Bug]: some actions do not appear in the trace file https://github.com/microsoft/playwright-java/issues/1617 - \[Bug]: Traceviewer not reporting all actions #### Browser Versions - Chromium 127.0.6533.5 - Mozilla Firefox 127.0 - WebKit 17.4 This version was also tested against the following stable channels: - Google Chrome 126 - Microsoft Edge 126 ### [`v1.45.2`](https://github.com/microsoft/playwright/releases/tag/v1.45.2) [Compare Source](https://github.com/microsoft/playwright/compare/v1.45.1...v1.45.2) ##### Highlights https://github.com/microsoft/playwright/issues/31613 - \[REGRESSION]: Trace is not showing any screenshots nor test name https://github.com/microsoft/playwright/issues/31601 - \[REGRESSION]: missing trace for 2nd browser https://github.com/microsoft/playwright/issues/31541 - \[REGRESSION]: Failing tests have a trace with no images and with steps missing #### Browser Versions - Chromium 127.0.6533.5 - Mozilla Firefox 127.0 - WebKit 17.4 This version was also tested against the following stable channels: - Google Chrome 126 - Microsoft Edge 126 </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjQuMyIsInVwZGF0ZWRJblZlciI6IjM3LjQyNC4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
kjuulh added 1 commit 2024-08-22 00:19:43 +02:00
chore(deps): update dependency @playwright/test to v1.46.1
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
c36bc80fee
kjuulh scheduled this pull request to auto merge when all checks succeed 2024-08-22 00:19:43 +02:00
kjuulh force-pushed renovate/playwright-monorepo from fdc0ecafda to c36bc80fee 2024-08-22 00:19:44 +02:00 Compare
kjuulh merged commit d4f80f2c7f into main 2024-08-22 00:20:17 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kjuulh/como-web#23
No description provided.