chore(deps): update dependency @playwright/test to v1.52.0 #52
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/playwright-test-1.x-lockfile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
1.45.1
->1.52.0
Release Notes
microsoft/playwright (@playwright/test)
v1.52.0
Compare Source
Highlights
New method expect(locator).toContainClass() to ergonomically assert individual class names on the element.
Aria Snapshots got two new properties:
/children
for strict matching and/url
for links.Test Runner
--fail-on-flaky-tests
. This is useful for CI/CD environments where you want to ensure that all tests are stable before deploying.Miscellaneous
maxRedirects
in apiRequest.newContext() to control the maximum number of redirects.ref
in locator.ariaSnapshot() to generate reference for each element in the snapshot which can later be used to locate the element.!@​my-tag
or!my-file.spec.ts
or!p:my-project
.Breaking Changes
?
wildcard is not supported any more, it will always match question mark?
character.[]
are not supported anymore. We recommend using regular expressions instead.Cookie
header anymore. If aCookie
header is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use browserContext.addCookies().Browser Versions
This version was also tested against the following stable channels:
v1.51.1
Compare Source
Highlights
https://github.com/microsoft/playwright/issues/35093 - [Regression]: TimeoutOverflowWarning:
2149630
.634 does not fit into a 32-bit signed integerhttps://github.com/microsoft/playwright/issues/35138 - [Regression]: TypeError: Cannot read properties of undefined (reading 'expectInfo')
Browser Versions
This version was also tested against the following stable channels:
v1.51.0
Compare Source
StorageState for indexedDB
New option
indexedDB
for browserContext.storageState() allows to save and restore IndexedDB contents. Useful when your application uses IndexedDB API to store authentication tokens, like Firebase Authentication.Here is an example following the authentication guide:
Copy prompt
New "Copy prompt" button on errors in the HTML report, trace viewer and UI mode. Click to copy a pre-filled LLM prompt that contains the error message and useful context for fixing the error.
Filter visible elements
New option
visible
for locator.filter() allows matching only visible elements.Git information in HTML report
Set option testConfig.captureGitInfo to capture git information into testConfig.metadata.
HTML report will show this information when available:
Test Step improvements
A new TestStepInfo object is now available in test steps. You can add step attachments or skip the step under some conditions.
Miscellaneous
contrast
for methods page.emulateMedia() and browser.newContext() allows to emulate theprefers-contrast
media feature.failOnStatusCode
makes all fetch requests made through the APIRequestContext throw on response codes other than 2xx and 3xx.Browser Versions
This version was also tested against the following stable channels:
v1.50.1
Compare Source
Highlights
https://github.com/microsoft/playwright/issues/34483 - [Feature]: single aria snapshot for different engines/browsers
https://github.com/microsoft/playwright/issues/34497 - [Bug]: Firefox not handling keepalive: true fetch requests
https://github.com/microsoft/playwright/issues/34504 - [Bug]: update snapshots not creating good diffs
https://github.com/microsoft/playwright/issues/34507 - [Bug]: snapshotPathTemplate doesnt work when multiple projects
https://github.com/microsoft/playwright/issues/34462 - [Bug]: updateSnapshots "changed" throws an error
Browser Versions
This version was also tested against the following stable channels:
v1.50.0
Compare Source
Test runner
New option
timeout
allows specifying a maximum run time for an individual test step. A timed-out step will fail the execution of the test.New method test.step.skip() to disable execution of a test step.
Expanded expect(locator).toMatchAriaSnapshot() to allow storing of aria snapshots in separate YAML files.
Added method expect(locator).toHaveAccessibleErrorMessage() to assert the Locator points to an element with a given aria errormessage.
Option testConfig.updateSnapshots added the configuration enum
changed
.changed
updates only the snapshots that have changed, whereasall
now updates all snapshots, regardless of whether there are any differences.New option testConfig.updateSourceMethod defines the way source code is updated when testConfig.updateSnapshots is configured. Added
overwrite
and3-way
modes that write the changes into source code, on top of existingpatch
mode that creates a patch file.Option testConfig.webServer added a
gracefulShutdown
field for specifying a process kill signal other than the defaultSIGKILL
.Exposed testStep.attachments from the reporter API to allow retrieval of all attachments created by that step.
New option
pathTemplate
fortoHaveScreenshot
andtoMatchAriaSnapshot
assertions in the testConfig.expect configuration.UI updates
canvas
content in traces is error-prone. Display is now disabled by default, and can be enabled via theDisplay canvas content
UI setting.Call
andNetwork
panels now display additional time information.Breaking
<input>
,<select>
, or a number of other editable elements.all
, rather than only the failed/changed snapshots. Use the new enumchanged
to keep the old functionality of only updating the changed snapshots.Browser Versions
This version was also tested against the following stable channels:
v1.49.1
Compare Source
Highlights
https://github.com/microsoft/playwright/issues/33802 - [Bug]: Codegen's Clear button doesn't work if not recording
https://github.com/microsoft/playwright/issues/33806 - [Bug]: playwright hangs while waiting for pending navigations
https://github.com/microsoft/playwright/issues/33787 - [Bug]: VSC extension isn't capturing all entered text
https://github.com/microsoft/playwright/issues/33788 - [Regression]: Double clicking the steps in trace viewer doesn't filter actions
https://github.com/microsoft/playwright/issues/33772 - [Bug]: aria_snapshot generates invalid yaml when combined with an aria-label attribut
https://github.com/microsoft/playwright/issues/33791 - [Bug]: text input with number value raises "container is not iterable" with to_match_aria_snapshot
https://github.com/microsoft/playwright/issues/33644 - [Bug]: getByRole can't find element with the accessible name from label element when aria-labelledby is not valid
https://github.com/microsoft/playwright/issues/33660 - [Regression]: Unable to open Playwright UI in Dark Mode
Browser Versions
This version was also tested against the following stable channels:
v1.49.0
Compare Source
Aria snapshots
New assertion expect(locator).toMatchAriaSnapshot() verifies page structure by comparing to an expected accessibility tree, represented as YAML.
You can generate this assertion with Test Generator and update the expected snapshot with
--update-snapshots
command line flag.Learn more in the aria snapshots guide.
Test runner
tsconfig
to be used for all tests.'on-first-failure'
for testOptions.screenshot.Error.cause
.Breaking: channels
chrome
,msedge
and similar switch to new headlessThis change affects you if you're using one of the following channels in your
playwright.config.ts
:chrome
,chrome-dev
,chrome-beta
, orchrome-canary
msedge
,msedge-dev
,msedge-beta
, ormsedge-canary
What do I need to do?
After updating to Playwright v1.49, run your test suite. If it still passes, you're good to go. If not, you will probably need to update your snapshots, and adapt some of your test code around PDF viewers and extensions. See issue #33566 for more details.
Other breaking changes
@playwright/experimental-ct-vue2
will no longer be updated.@playwright/experimental-ct-solid
will no longer be updated.Try new Chromium headless
You can opt into the new headless mode by using
'chromium'
channel. As official Chrome documentation puts it:See issue #33566 for the list of possible breakages you could encounter and more details on Chromium headless. Please file an issue if you see any problems after opting in.
Miscellaneous
<canvas>
elements inside a snapshot now draw a preview.Browser Versions
This version was also tested against the following stable channels:
v1.48.2
Compare Source
Highlights
https://github.com/microsoft/playwright/issues/33141 - [Bug]: UI Mode crashed
https://github.com/microsoft/playwright/issues/33219 - [BUG] Trace Viewer PWA crashes with "Aw, Snap!"
https://github.com/microsoft/playwright/issues/33086 - [Bug]: UI Mode Memory problem
https://github.com/microsoft/playwright/issues/33000 - [Regression]: Inspector and Browser doesn't close on CTRL+C
https://github.com/microsoft/playwright/issues/33204 - [Bug]: Chrome tab and inspector not closing after terminating session in terminal
Browser Versions
This version was also tested against the following stable channels:
v1.48.1
Compare Source
Highlights
https://github.com/microsoft/playwright/issues/33023 - [Bug]: command line flag --headed has no effect in ui mode
https://github.com/microsoft/playwright/issues/33107 - [REGRESSION]: page.waitForRequest does not get resolved since 1.48.0
https://github.com/microsoft/playwright/issues/33085 - [Bug]: WebSocket route does not handle full URLs in Playwright
https://github.com/microsoft/playwright/issues/33052 - [Regression]: Inspector not showing recorded steps
https://github.com/microsoft/playwright/issues/33132 - [Bug]: Wrong Ubuntu release name in Dockerfile.noble
https://github.com/microsoft/playwright/pull/32996 - [BUG] Trace attachments have small unusable height
Browser Versions
This version was also tested against the following stable channels:
v1.48.0
Compare Source
WebSocket routing
New methods page.routeWebSocket() and browserContext.routeWebSocket() allow to intercept, modify and mock WebSocket connections initiated in the page. Below is a simple example that mocks WebSocket communication by responding to a
"request"
with a"response"
.See WebSocketRoute for more details.
UI updates
Miscellaneous
form
and similar ones now accept FormData.location
to pass custom step location.Browser Versions
This version was also tested against the following stable channels:
v1.47.2
Compare Source
Highlights
https://github.com/microsoft/playwright/pull/32699- [REGRESSION]: fix(codegen): use content_frame property in python/.NET
https://github.com/microsoft/playwright/issues/32706- [REGRESSION]: page.pause() does not pause test timeout after 1.47
https://github.com/microsoft/playwright/pull/32661 - fix(trace-viewer): time delta between local and remote actions
Browser Versions
This version was also tested against the following stable channels:
v1.47.1
Compare Source
Highlights
https://github.com/microsoft/playwright/issues/32480 - [REGRESSION]: tsconfig.json's compilerOptions.paths no longer working in 1.47
https://github.com/microsoft/playwright/issues/32552 - [REGRESSION]: broken UI in Trace Viewer while showing network response body
Browser Versions
This version was also tested against the following stable channels:
v1.47.0
Compare Source
Network Tab improvements
The Network tab in the UI mode and trace viewer has several nice improvements:
Credit to @kubajanik for these wonderful improvements!
--tsconfig
CLI optionBy default, Playwright will look up the closest tsconfig for each imported file using a heuristic. You can now specify a single tsconfig file in the command line, and Playwright will use it for all imported files, not only test files:
APIRequestContext now accepts
URLSearchParams
andstring
as query parametersYou can now pass
URLSearchParams
andstring
as query parameters to APIRequestContext:Miscellaneous
mcr.microsoft.com/playwright:v1.47.0
now serves a Playwright image based on Ubuntu 24.04 Noble.To use the 22.04 jammy-based image, please use
mcr.microsoft.com/playwright:v1.47.0-jammy
instead.:latest
/:focal
/:jammy
tag for Playwright Docker images is no longer being published. Pin to a specific version for better stability and reproducibility.behavior
in page.removeAllListeners(), browser.removeAllListeners() and browserContext.removeAllListeners() to wait for ongoing listeners to complete.cert
andkey
as buffers instead of file paths.text/html
content type can now be opened in a new tab in the HTML report. This is useful for including third-party reports or other HTML content in the Playwright test report and distributing it to your team.noWaitAfter
in locator.selectOption() was deprecated.macos-13
. We recommend upgrading GitHub Actions tomacos-14
.Browser Versions
This version was also tested against the following stable channels:
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
This version was also tested against the following stable channels:
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
:You can also provide client certificates to a particular test project or as a parameter of browser.newContext() and apiRequest.newContext().
--only-changed
cli optionNew 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".Component Testing: New
router
fixtureThis release introduces an experimental
router
fixture to intercept and handle network requests in component testing.There are two ways to use the router fixture:
router.route(url, handler)
that behaves similarly to page.route().router.use(handlers)
and pass MSW library request handlers to it.Here is an example of reusing your existing MSW handlers in the test.
This fixture is only available in component tests.
UI Mode / Trace Viewer Updates
baseURL
.Miscellaneous
maxRetries
option in apiRequestContext.fetch() which retries on theECONNRESET
network error.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:Browser Versions
This version was also tested against the following stable channels:
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
This version was also tested against the following stable channels:
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
This version was also tested against the following stable channels:
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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 Renovate Bot.
6178496cda
to7510f10458
chore(deps): update dependency @playwright/test to v1.49.0to chore(deps): update dependency @playwright/test to v1.49.17510f10458
to7c6cfde1fc
chore(deps): update dependency @playwright/test to v1.49.1to chore(deps): update dependency @playwright/test to v1.50.0chore(deps): update dependency @playwright/test to v1.50.0to chore(deps): update dependency @playwright/test to v1.50.17c6cfde1fc
toec0c78b12d
ec0c78b12d
tofad2eef6a4
chore(deps): update dependency @playwright/test to v1.50.1to chore(deps): update dependency @playwright/test to v1.51.0fad2eef6a4
to4c4f67ff4e
chore(deps): update dependency @playwright/test to v1.51.0to chore(deps): update dependency @playwright/test to v1.51.14c4f67ff4e
toa80cb9ed26
chore(deps): update dependency @playwright/test to v1.51.1to chore(deps): update dependency @playwright/test to v1.52.0Checkout
From your project repository, check out a new branch and test the changes.