[Snyk] Upgrade playwright from 1.22.2 to 1.34.1 #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade playwright from 1.22.2 to 1.34.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.
Release notes
Package name: playwright
Highlights
#23186 - [BUG] Container image for v1.34.0 missing library for webkit
#23206 - [BUG] Unable to install supported browsers for v1.34.0 from playwright-core
#23207 - [BUG] importing ES Module JSX component is broken since 1.34
Browser Versions
This version was also tested against the following stable channels:
Highlights
UI Mode now shows steps, fixtures and attachments:

New property
testProject.teardownto specify a project that needs to run after thisand all dependent projects have finished. Teardown is useful to cleanup any resources acquired by this project.
A common pattern would be a
setupdependency with a correspondingteardown:import { defineConfig } from '@ playwright/test';
export default defineConfig({
projects: [
{
name: 'setup',
testMatch: /global.setup.ts/,
teardown: 'teardown',
},
{
name: 'teardown',
testMatch: /global.teardown.ts/,
},
{
name: 'chromium',
use: devices['Desktop Chrome'],
dependencies: ['setup'],
},
{
name: 'firefox',
use: devices['Desktop Firefox'],
dependencies: ['setup'],
},
{
name: 'webkit',
use: devices['Desktop Safari'],
dependencies: ['setup'],
},
],
});
New method
expect.configureto create pre-configured expect instance with its own defaults such astimeoutandsoft.await slowExpect(locator).toHaveText('Submit');
// Always do soft assertions.
const softExpect = expect.configure({ soft: true });
New options
stderrandstdoutintestConfig.webServerto configure output handling:reuseExistingServer: !process.env.CI,
stdout: 'pipe',
stderr: 'pipe',
},
});">
New
locator.and()to create a locator that matches both locators.New events
browserContext.on('console')andbrowserContext.on('dialog')to subscribe to any dialogsand console messages from any page from the given browser context. Use the new methods
consoleMessage.page()and
dialog.page()to pin-point event source.npx playwright testno longer works if you install bothplaywrightand@ playwright/test. There's no needto install both, since you can always import browser automation APIs from
@ playwright/testdirectly:Node.js 14 is no longer supported since it reached its end-of-life on April 30, 2023.
Browser Versions
This version was also tested against the following stable channels:
Locators Update
Use
locator.or()to create a locator that matches either of the two locators.Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog shows up instead.
In this case, you can wait for either a "New email" button, or a dialog and act accordingly:
Use new options
hasNotandhasNotTextinlocator.filter()to find elements that do not match certain conditions.
Use new web-first assertion
locatorAssertions.toBeAttached()to ensure that the elementis present in the page's DOM. Do not confuse with the
locatorAssertions.toBeVisible()that ensures thatelement is both attached & visible.
New APIs
locator.or()hasNotinlocator.filter()hasNotTextinlocator.filter()locatorAssertions.toBeAttached()timeoutinroute.fetch()reporter.onExit()mcr.microsoft.com/playwright:v1.33.0now serves a Playwright image based on Ubuntu Jammy.To use the focal-based image, please use
mcr.microsoft.com/playwright:v1.33.0-focalinstead.Browser Versions
This version was also tested against the following stable channels:
Highlights
#22144 - [BUG] WebServer only starting after timeout
#22191 - chore: allow reusing browser between the tests
#22215 - [BUG] Tests failing in toPass often marked as passed
Browser Versions
This version was also tested against the following stable channels:
Highlights
#21993 - [BUG] Browser crash when using Playwright VSC extension and trace-viewer enabled in config
#22003 - [Feature] Make Vue component mount props less restrictive
#22089 - [REGRESSION]: Tests failing with "Error: tracing.stopChunk"
Browser Versions
This version was also tested against the following stable channels:
Read more
Read more