[Snyk] Upgrade playwright from 1.10.0 to 1.28.1 #7
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.28.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 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
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:
Locators
With these new APIs, inspired by Testing Library, writing locators is a joy:
page.getByText(text, options)
to locate by text content.page.getByRole(role, options)
to locate by ARIA role, ARIA attributes and accessible name.page.getByLabel(label, options)
to locate a form control by associated label's text.page.getByPlaceholder(placeholder, options)
to locate an input by placeholder.page.getByAltText(altText, options)
to locate an element, usually image, by its text alternative.page.getByTitle(title, options)
to locate an element by its title.await page.getByLabel('Password').fill('secret-password');
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page.getByText('Welcome, John!')).toBeVisible();
All the same methods are also available on Locator, FrameLocator and Frame classes.
Other highlights
workers
option in theplaywright.config.ts
now accepts a percentage string to use some of the available CPUs. You can also pass it in the command line:npx playwright test --workers=20%
New options
host
andport
for the html reporter.New field
FullConfig.configFile
is available to test reporters, specifying the path to the config file if any.As announced in v1.25, Ubuntu 18 will not be supported as of Dec 2022. In addition to that, there will be no WebKit updates on Ubuntu 18 starting from the next Playwright release.
Behavior Changes
expect(locator).toHaveAttribute(name, value, options)
with an empty value does not match missing attribute anymore. For example, the following snippet will succeed whenbutton
does not have adisabled
attribute.Command line options
--grep
and--grep-invert
previously incorrectly ignoredgrep
andgrepInvert
options specified in the config. Now all of them are applied together.JSON reporter path resolution is performed relative to the config directory instead of the current working directory:
Browser Versions
This version was also tested against the following stable channels:
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:
Highlights
This patch includes the following bug fixes:
#16937 - [REGRESSION]: session storage failing >= 1.25.0 in firefox
#16955 - Not using channel on config file when Show and Reuse browser is checked
Browser Versions
This version was also tested against the following stable channels:
Read more
Read more