[Snyk] Upgrade playwright from 1.10.0 to 1.29.0 #11
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.10.0 to 1.29.0.
ℹ️ 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 fixes:
SNYK-JS-JPEGJS-2859218
Why? Proof of Concept exploit, CVSS 7.5
SNYK-JS-WS-1296835
Why? Proof of Concept exploit, CVSS 7.5
(*) Note that the real score may have changed since the PR was raised.
Release notes
Package name: playwright
New APIs
New method
route.fetch()
and new optionjson
forroute.fulfill()
:// Fetch original settings.
const response = await route.fetch();
// Force settings theme to a predefined value.
const json = await response.json();
json.theme = 'Solorized';
// Fulfill with modified data.
await route.fulfill({ json });
});
New method
locator.all()
to iterate over all matching elements:Locator.selectOption
matches now by value or label:Retry blocks of code until all assertions pass:
Read more in our documentation.
Automatically capture full page screenshot on test failure:
import type { PlaywrightTestConfig } from '@ playwright/test';
const config: PlaywrightTestConfig = {
use: {
screenshot: {
mode: 'only-on-failure',
fullPage: true,
}
}
};
export default config;
Miscellaneous
jsconfig.json
.args
andproxy
forandroidDevice.launchBrowser()
.postData
in methodroute.continue()
now supports serializable values.Browser Versions
This version was also tested against the following stable channels:
Highlights
This patch release includes the following bug fixes:
#18928 - [BUG] Electron firstWindow times out after upgrading to 1.28.0
#18920 - [BUG] [expanded=false] in role selector returns elements without aria-expanded attribute
#18865 - [BUG] regression in killing web server process in 1.28.0
Browser Versions
This version was also tested against the following stable channels:
Playwright Tools
Test Runner
Configure retries and test timeout for a file or a test with
test.describe.configure([options])
.Use
testProject.snapshotPathTemplate
andtestConfig.snapshotPathTemplate
to configure a template controlling location of snapshots generated byexpect(page).toHaveScreenshot(name[, options])
andexpect(screenshot).toMatchSnapshot(name[, options])
.import type { PlaywrightTestConfig } from '@ playwright/test';
const config: PlaywrightTestConfig = {
testDir: './tests',
snapshotPathTemplate: '{testDir}/screenshots/{testFilePath}/{arg}{ext}',
};
export default config;
New APIs
locator.blur([options])
locator.clear([options])
android.launchServer([options])
andandroid.connect(wsEndpoint[, options])
androidDevice.on('close')
Browser Versions
This version was also tested against the following stable channels:
Highlights
This patch release includes the following bug fixes:
#18010 - fix(generator): generate nice locators for arbitrary selectors
#17999 - chore: don't fail on undefined video/trace
#17955 - [Question] Github Actions test compatibility check failed mitigation?
#17960 - [BUG] Codegen 1.27 creates NUnit code that does not compile
#17952 - fix: fix typo in treeitem role typing
Browser Versions
This version was also tested against the following stable channels:
Read more
Highlights
This patch includes the following bug fixes:
#17500 - [BUG] No tests found using the test explorer - pw/[email protected]
Browser Versions
This version was also tested against the following stable channels:
Assertions
expect(locator).toBeEnabled([options])
.expect(locator).toHaveText(expected[, options])
now pierces open shadow roots.expect(locator).toBeEditable([options])
.expect(locator).toBeVisible([options])
.Other Highlights
maxRedirects
forapiRequestContext.get(url[, options])
and others to limit redirect count.--pass-with-no-tests
that allows the test suite to pass when no files are found.--ignore-snapshots
to skip snapshot expectations, such asexpect(value).toMatchSnapshot()
andexpect(page).toHaveScreenshot()
.Behavior Change
A bunch of Playwright APIs already support the waitUntil: 'domcontentloaded' option. For example:
Prior to 1.26, this would wait for all iframes to fire the
DOMContentLoaded
event.To align with web specification, the
'domcontentloaded'
value only waits for the target frame to fire the'DOMContentLoaded'
event. UsewaitUntil: 'load'
to wait for all iframes.Browser Versions
This version was also tested against the following stable channels:
Read more