[Snyk] Upgrade @playwright/test from 1.30.0 to 1.41.1 #194
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.
This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade @playwright/test from 1.30.0 to 1.41.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/test
Highlights
#29067 - [REGRESSION] Codegen/Recorder: not all clicks are being actioned nor recorded
#29028 - [REGRESSION] React component tests throw type error when passing null/undefined to component
#29027 - [REGRESSION] React component tests not passing Date prop values
#29023 - [REGRESSION] React component tests not rendering children prop
#29019 - [REGRESSION] trace.playwright.dev does not currently support the loading from URL
Browser Versions
This version was also tested against the following stable channels:
New APIs
style
in page.screenshot([options]) and locator.screenshot([options]) to add custom CSS to the page before taking a screenshot.stylePath
for methods expect(page).toHaveScreenshot(name[, options]) and expect(locator).toHaveScreenshot(name[, options]) to apply a custom stylesheet while making the screenshot.fileName
option for Blob reporter, to specify the name of the report to be created.Browser Versions
This version was also tested against the following stable channels:
Highlights
#28319 - [REGRESSION]: Version 1.40.0 Produces corrupted traces
#28371 - [BUG] The color of the 'ok' text did not change to green in the vs code test results section
#28321 - [BUG] Ambiguous test outcome and status for serial mode
#28362 - [BUG] Merging blobs ends up in Error: Cannot create a string longer than 0x1fffffe8 characters
#28239 - fix: collect all errors in removeFolders
Browser Versions
This version was also tested against the following stable channels:
Test Generator Update
New tools to generate assertions:
Here is an example of a generated test with assertions:
await page.getByRole('link', { name: 'Get started' }).click();
await expect(page.getByLabel('Breadcrumbs').getByRole('list')).toContainText('Installation');
await expect(page.getByLabel('Search')).toBeVisible();
await page.getByLabel('Search').click();
await page.getByPlaceholder('Search docs').fill('locator');
await expect(page.getByPlaceholder('Search docs')).toHaveValue('locator');
});">
New APIs
reason
in page.close(), browserContext.close() and browser.close(). Close reason is reported for all operations interrupted by the closure.firefoxUserPrefs
in browserType.launchPersistentContext(userDataDir).Other Changes
Browser Versions
This version was also tested against the following stable channels:
Read more
Highlights
#27071 - expect(value).toMatchSnapshot() deprecation announcement on V1.38
#27072 - [BUG] PWT trace viewer fails to load trace and throws TypeError
#27073 - [BUG] RangeError: Invalid time value
#27087 - [REGRESSION]: npx playwright test --list prints all tests twice
#27113 - [REGRESSION]: No longer able to extend PlaywrightTest.Matchers type for locators and pages
#27144 - [BUG]can not display trace
#27163 - [REGRESSION] Single Quote Wrongly Escaped by Locator When Using Unicode Flag
#27181 - [BUG] evaluate serializing fails at 1.38
Browser Versions
This version was also tested against the following stable channels:
UI Mode Updates
New APIs
browserContext.on('weberror')
locator.pressSequentially()
reporter.onEnd()
now reportsstartTime
and total runduration
.Deprecations
page.type()
,frame.type()
,locator.type()
andelementHandle.type()
.Please use
locator.fill()
instead which is much faster. Uselocator.pressSequentially()
only if there is aspecial keyboard handling on the page, and you need to press keys one-by-one.
Breaking Changes: Playwright no longer downloads browsers automatically
Note
If you are using
@ playwright/test
package, this change does not affect you.Playwright recommends to use
@ playwright/test
package and download browsers vianpx playwright install
command. If you are following this recommendation, nothing has changed for you.However, up to v1.38, installing the
playwright
package instead of@ playwright/test
did automatically download browsers. This is no longer the case, and we recommend to explicitly download browsers vianpx playwright install
command.v1.37 and earlier
playwright
package was downloading browsers duringnpm install
, while@ playwright/test
was not.v1.38 and later
playwright
and@ playwright/test
packages do not download browsers duringnpm install
.Recommended migration
Run
npx playwright install
to download browsers afternpm install
. For example, in your CI configuration:Alternative migration option - not recommended
Add
@ playwright/browser-chromium
,@ playwright/browser-firefox
and@ playwright/browser-webkit
as a dependency. These packages download respective browsers duringnpm install
. Make sure you keep the version of all playwright packages in sync:Browser Versions
This version was also tested against the following stable channels:
Read more
Read more