-
Notifications
You must be signed in to change notification settings - Fork 0
[Snyk] Upgrade @playwright/test from 1.42.1 to 1.50.1 #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[Snyk] Upgrade @playwright/test from 1.42.1 to 1.50.1 #47
Conversation
Snyk has created this PR to upgrade @playwright/test from 1.42.1 to 1.50.1. See this package in npm: @playwright/test See this project in Snyk: https://app.snyk.io/org/nerds-github/project/a6d95be2-6fa7-418d-8fd1-0cd3974eee23?utm_source=github&utm_medium=referral&page=upgrade-pr
Reviewer's Guide by SourceryThis pull request upgrades the Sequence Diagram for WebSocket RoutingsequenceDiagram
participant Page
participant WebSocket
participant WebSocketRoute
Page->>Page: routeWebSocket('/ws', callback)
Page->>WebSocket: Initiate connection to /ws
activate WebSocket
WebSocket->>WebSocketRoute: onMessage(message)
activate WebSocketRoute
alt message === 'request'
WebSocketRoute->>WebSocket: send('response')
end
deactivate WebSocketRoute
deactivate WebSocket
Updated Class Diagram for TestConfigclassDiagram
class TestConfig {
+updateSnapshots: enum
+updateSourceMethod: enum
+webServer: Object
+globalSetup: Array<string>
+globalTeardown: Array<string>
+tsconfig: string
+expect: Object
}
note for TestConfig "Added tsconfig option, updateSnapshots enum value 'changed', updateSourceMethod option, gracefulShutdown field to webServer, pathTemplate for expect"
Updated Class Diagram for TestStepclassDiagram
class TestStep {
+attachments: Array<Object>
+skip(): void
+timeout: number
+location: Object
}
note for TestStep "Added skip() method, timeout option, attachments property, location option"
Updated Class Diagram for LocatorAssertionsclassDiagram
class LocatorAssertions {
+toMatchAriaSnapshot(): void
+toHaveAccessibleErrorMessage(): void
+toBeEditable(): void
}
note for LocatorAssertions "Added toMatchAriaSnapshot() and toHaveAccessibleErrorMessage() methods. toBeEditable() now throws on non-editable elements."
Updated Class Diagram for PageclassDiagram
class Page {
+routeWebSocket(): void
+requestGC(): void
+removeAllListeners(): void
}
note for Page "Added routeWebSocket() and requestGC() methods, and behavior option to removeAllListeners()"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have skipped reviewing this pull request. Here's why:
- It seems to have been created by a bot ('[Snyk]' found in title). We assume it knows what it's doing!
- We don't review packaging changes - Let us know if you'd like us to change this.
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
Snyk has created this PR to upgrade @playwright/test from 1.42.1 to 1.50.1.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 545 versions ahead of your current version.
The recommended version was released a month ago.
Issues fixed by the recommended upgrade:
SNYK-JS-CROSSSPAWN-8303230
SNYK-JS-INTLIFYSHARED-8442251
SNYK-JS-VUEI18N-8442254
SNYK-JS-INTLIFYCOREBASE-8442262
SNYK-JS-NANOID-8492085
SNYK-JS-ROLLUP-8073097
SNYK-JS-VITE-8648411
SNYK-JS-VUEI18N-8442260
Release notes
Package name: @playwright/test
Highlights
#34483 - [Feature]: single aria snapshot for different engines/browsers
#34497 - [Bug]: Firefox not handling keepalive: true fetch requests
#34504 - [Bug]: update snapshots not creating good diffs
#34507 - [Bug]: snapshotPathTemplate doesnt work when multiple projects
#34462 - [Bug]: updateSnapshots "changed" throws an error
Browser Versions
This version was also tested against the following stable channels:
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.
await test.step('before running step', async () => {
// Normal step
});
await test.step.skip('not yet ready', async () => {
// This step is skipped
});
await test.step('after running step', async () => {
// This step still runs even though the previous one was skipped
});
});
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.npx playwright test --update-snapshots=changed --update-source-method=3way
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:
Highlights
#33802 - [Bug]: Codegen's Clear button doesn't work if not recording
#33806 - [Bug]: playwright hangs while waiting for pending navigations
#33787 - [Bug]: VSC extension isn't capturing all entered text
#33788 - [Regression]: Double clicking the steps in trace viewer doesn't filter actions
#33772 - [Bug]: aria_snapshot generates invalid yaml when combined with an aria-label attribut
#33791 - [Bug]: text input with number value raises "container is not iterable" with to_match_aria_snapshot
#33644 - [Bug]: getByRole can't find element with the accessible name from label element when aria-labelledby is not valid
#33660 - [Regression]: Unable to open Playwright UI in Dark Mode
Browser Versions
This version was also tested against the following stable channels:
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.
export default defineConfig({
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], channel: 'chromium' },
},
],
});
Miscellaneous
<canvas>
elements inside a snapshot now draw a preview.Browser Versions
This version was also tested against the following stable channels:
Highlights
#33141 - [Bug]: UI Mode crashed
#33219 - [BUG] Trace Viewer PWA crashes with "Aw, Snap!"
#33086 - [Bug]: UI Mode Memory problem
#33000 - [Regression]: Inspector and Browser doesn't close on CTRL+C
#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:
Highlights
#33023 - [Bug]: command line flag --headed has no effect in ui mode
#33107 - [REGRESSION]: page.waitForRequest does not get resolved since 1.48.0
#33085 - [Bug]: WebSocket route does not handle full URLs in Playwright
#33052 - [Regression]: Inspector not showing recorded steps
#33132 - [Bug]: Wrong Ubuntu release name in Dockerfile.noble
#32996 - [BUG] Trace attachments have small unusable height
Browser Versions
This version was also tested against the following stable channels:
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:
Highlights
#32699 [REGRESSION]: fix(codegen): use content_frame property in python/.NET
#32706 [REGRESSION]: page.pause() does not pause test timeout after 1.47
#32661 - fix(trace-viewer): time delta between local and remote actions
Browser Versions
This version was also tested against the following stable channels:
Highlights
#32480 - [REGRESSION]: tsconfig.json's compilerOptions.paths no longer working in 1.47
#32552 - [REGRESSION]: broken UI in Trace Viewer while showing network response body
Browser Versions
This version was also tested against the following stable channels:
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:
Upgrade @playwright/test from 1.42.1 to 1.50.1. This update includes bug fixes, new features such as test step timeouts and skipping, aria snapshot enhancements, improved UI elements, and WebSocket routing capabilities. It also incorporates enhancements to the HTML reporter, trace viewer, and network tab, along with miscellaneous improvements and dependency updates.
New Features:
Bug Fixes:
Enhancements: