Commit 394582c
authored
chore(deps): update dependency @playwright/test to v1.60.0 (#829)
This PR contains the following updates:
| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@playwright/test](https://playwright.dev)
([source](https://redirect.github.com/microsoft/playwright)) | [`1.59.1`
→
`1.60.0`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.59.1/1.60.0)
|

|

|
---
> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/316) for more information.
---
### Release Notes
<details>
<summary>microsoft/playwright (@​playwright/test)</summary>
###
[`v1.60.0`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.60.0)
[Compare
Source](https://redirect.github.com/microsoft/playwright/compare/v1.59.1...v1.60.0)
#### 🌐 HAR recording on Tracing
[tracing.startHar()](https://playwright.dev/docs/api/class-tracing#tracing-start-har)
/
[tracing.stopHar()](https://playwright.dev/docs/api/class-tracing#tracing-stop-har)
expose HAR recording as a first-class tracing API, with the same
`content`, `mode` and `urlFilter` options as `recordHar`. The returned
[Disposable](https://playwright.dev/docs/api/class-disposable) makes it
easy to scope a recording with `await using`:
```js
await using har = await context.tracing.startHar('trace.har');
const page = await context.newPage();
await page.goto('https://playwright.dev');
// HAR is finalized when `har` goes out of scope.
```
#### 🪝 Drop API
New
[locator.drop()](https://playwright.dev/docs/api/class-locator#locator-drop)
simulates an external drag-and-drop of files or clipboard-like data onto
an element. Playwright dispatches `dragenter`, `dragover`, and `drop`
with a synthetic \[DataTransfer] in the page context — works
cross-browser and is great for testing upload zones:
```js
await page.locator('#dropzone').drop({
files: { name: 'note.txt', mimeType: 'text/plain', buffer: Buffer.from('hello') },
});
await page.locator('#dropzone').drop({
data: {
'text/plain': 'hello world',
'text/uri-list': 'https://example.com',
},
});
```
#### 🎯 Aria snapshots
-
[expect(page).toMatchAriaSnapshot()](https://playwright.dev/docs/api/class-pageassertions#page-assertions-to-match-aria-snapshot)
now works on a [Page](https://playwright.dev/docs/api/class-page), in
addition to a [Locator](https://playwright.dev/docs/api/class-locator) —
equivalent to asserting against `page.locator('body')`.
- New `boxes` option on
[locator.ariaSnapshot()](https://playwright.dev/docs/api/class-locator#locator-aria-snapshot)
/
[page.ariaSnapshot()](https://playwright.dev/docs/api/class-page#page-aria-snapshot)
appends each element's bounding box as `[box=x,y,width,height]`, useful
for AI consumption.
#### 🛑 test.abort()
New
[test.abort()](https://playwright.dev/docs/api/class-test#test-abort)
aborts the currently running test from a fixture, hook, or route handler
with an optional message. Use it when you have detected an unrecoverable
misuse and want to fail the test right away:
```js
test('does not publish to the shared page', async ({ page }) => {
await page.route('**/publish', route => {
test.abort('Tests must not publish to the shared page. Use the `clone` option.');
return route.abort();
});
// ...
});
```
#### New APIs
##### Browser, Context and Page
- Event
[browser.on('context')](https://playwright.dev/docs/api/class-browser#browser-event-context)
— fired when a new context is created on the browser.
- [BrowserContext](https://playwright.dev/docs/api/class-browsercontext)
now mirrors lifecycle events from its pages:
[browserContext.on('download')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-download),
[browserContext.on('frameattached')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-frame-attached),
[browserContext.on('framedetached')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-frame-detached),
[browserContext.on('framenavigated')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-frame-navigated),
[browserContext.on('pageclose')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page-close),
[browserContext.on('pageload')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page-load).
##### Locators and Assertions
- New option `description` in
[page.getByRole()](https://playwright.dev/docs/api/class-page#page-get-by-role)
/
[locator.getByRole()](https://playwright.dev/docs/api/class-locator#locator-get-by-role)
/
[frame.getByRole()](https://playwright.dev/docs/api/class-frame#frame-get-by-role)
/
[frameLocator.getByRole()](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role)
for matching the [accessible
description](https://www.w3.org/TR/wai-aria-1.2/#dfn-accessible-description).
- New option `pseudo` in
[expect(locator).toHaveCSS()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-css)
reads computed styles from `::before` or `::after`.
- New option `style` in
[locator.highlight()](https://playwright.dev/docs/api/class-locator#locator-highlight)
applies extra inline CSS to the highlight overlay, plus new
[page.hideHighlight()](https://playwright.dev/docs/api/class-page#page-hide-highlight)
to clear all highlights.
##### Network
-
[webSocketRoute.protocols()](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-protocols)
returns the WebSocket subprotocols requested by the page.
- New option `noDefaults` in
[browserType.connectOverCDP()](https://playwright.dev/docs/api/class-browsertype#browser-type-connect-over-cdp)
disables Playwright's default overrides on the default context (download
behavior, focus emulation, media emulation), so attaching to a user's
daily-driver browser doesn't disturb its state.
##### Errors and Reporting
- New
[webError.location()](https://playwright.dev/docs/api/class-weberror#web-error-location)
mirrors
[consoleMessage.location()](https://playwright.dev/docs/api/class-consolemessage#console-message-location).
-
[consoleMessage.location()](https://playwright.dev/docs/api/class-consolemessage#console-message-location)
now exposes `line` / `column` properties (`lineNumber` / `columnNumber`
are deprecated).
- New
[testInfoError.errorContext](https://playwright.dev/docs/api/class-testinfoerror#test-info-error-error-context)
surfaces additional diagnostic context, such as the aria snapshot of the
receiver at the time of an `expect(...)` matcher failure.
-
[reporter.onError()](https://playwright.dev/docs/api/class-reporter#reporter-on-error)
now receives a `workerInfo` argument with details about the worker for
fixture teardown errors.
##### Test runner
- New `{testFileBaseName}` token in
[testProject.snapshotPathTemplate](https://playwright.dev/docs/api/class-testproject#test-project-snapshot-path-template)
— file name without extension.
- Test runner now errors when a config tries to override a non-option
fixture, and rejects `workers: 0` or negative values.
#### 🛠️ Other improvements
- HTML reporter:
- `npx playwright show-report` accepts `.zip` files directly — no need
to unzip first.
- Steps that contain attachments inside nested children show an
indicator on the parent step.
- The `repeatEachIndex` is shown in the test header when non-zero.
- Trace Viewer adds a pretty-print toggle for JSON / form request and
response bodies in the network details panel.
#### Breaking Changes 7 files changed
Lines changed: 45 additions & 18 deletions
File tree
- .ddev/commands/host
- Build/Scripts
- Tests/E2E
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
| 520 | + | |
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
11 | 38 | | |
0 commit comments