[Snyk] Upgrade @playwright/test from 1.19.0-alpha-1643749494000 to 1.44.1 #1267
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-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)
Snyk has created this PR to upgrade @playwright/test from 1.19.0-alpha-1643749494000 to 1.44.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 1489 versions ahead of your current version.
The recommended version was released on a month ago.
Issues fixed by the recommended upgrade:
SNYK-JS-SEMVER-3247795
SNYK-JS-WS-7266574
SNYK-JS-BRACES-6838727
SNYK-JS-IP-6240864
SNYK-JS-JPEGJS-2859218
SNYK-JS-MICROMATCH-6838728
SNYK-JS-JSON5-3182856
SNYK-JS-MINIMIST-2429795
SNYK-JS-BABELTRAVERSE-5962462
SNYK-JS-INFLIGHT-6095116
SNYK-JS-IP-7148531
SNYK-JS-JSON5-3182856
SNYK-JS-MINIMATCH-3050818
Release notes
Package name: @playwright/test
Highlights
#30779 - [REGRESSION]: When using
video: 'on'
with VSCode extension the browser got closed#30755 - [REGRESSION]: Electron launch with spaces inside executablePath didn't work
#30770 - [REGRESSION]: Mask elements outside of viewport when creating fullscreen screenshots didn't work
#30858 - [REGRESSION]: ipv6 got shown instead of localhost in show-trace/show-report
Browser Versions
This version was also tested against the following stable channels:
New APIs
Accessibility assertions
expect(locator).toHaveAccessibleName() checks if the element has the specified accessible name:
expect(locator).toHaveAccessibleDescription() checks if the element has the specified accessible description:
expect(locator).toHaveRole() checks if the element has the specified ARIA role:
Locator handler
noWaitAfter
option.times
option in page.addLocatorHandler() to specify maximum number of times the handler should be run.Miscellaneous options
multipart
option inapiRequestContext.fetch()
now acceptsFormData
and supports repeating fields with the same name.expect(callback).toPass({ intervals })
can now be configured byexpect.toPass.inervals
option globally in testConfig.expect or per project in testProject.expect.expect(page).toHaveURL(url)
now supportsignoreCase
option.testProject.ignoreSnapshots allows to configure per project whether to skip screenshot expectations.
Reporter API
outputFile
. The same option can also be specified asPLAYWRIGHT_BLOB_OUTPUT_FILE
environment variable that might be more convenient on CI/CD.includeProjectInTestName
option.Command line
--last-failed
CLI option for running only tests that failed in the previous run.First run all tests:
Running 103 tests using 5 workers
...
2 failed
[chromium] › my-test.spec.ts:8:5 › two ─────────────────────────────────────────────────────────
[chromium] › my-test.spec.ts:13:5 › three ──────────────────────────────────────────────────────
101 passed (30.0s)
Now fix the failing tests and run Playwright again with
--last-failed
option:Running 2 tests using 2 workers
2 passed (1.2s)
Browser Versions
This version was also tested against the following stable channels:
Highlights
#30300 - [REGRESSION]: UI mode restarts if keep storage state
#30339 - [REGRESSION]: Brand new install of playwright, unable to run chromium with show browser using vscode
Browser Versions
This version was also tested against the following stable channels:
New APIs
Method browserContext.clearCookies() now supports filters to remove only some cookies.
New mode
retain-on-first-failure
for testOptions.trace. In this mode, trace is recorded for the first run of each test, but not for retires. When test run fails, the trace file is retained, otherwise it is removed.export default defineConfig({
use: {
trace: 'retain-on-first-failure',
},
});
New property testInfo.tags exposes test tags during test execution.
New method locator.contentFrame() converts a
Locator
object to aFrameLocator
. This can be useful when you have aLocator
object obtained somewhere, and later on would like to interact with the content inside the frame.New method frameLocator.owner() converts a
FrameLocator
object to aLocator
. This can be useful when you have aFrameLocator
object obtained somewhere, and later on would like to interact with theiframe
element.UI Mode Updates
@ fast
or clicking on the tag itself.Browser Versions
This version was also tested against the following stable channels:
Highlights
#29732 - [Regression]: HEAD requests to webServer.url since v1.42.0
#29746 - [Regression]: Playwright CT CLI scripts fail due to broken initializePlugin import
#29739 - [Bug]: Component tests fails when imported a module with a dot in a name
#29731 - [Regression]: 1.42.0 breaks some import statements
#29760 - [Bug]: Possible regression with chained locators in v1.42
Browser Versions
This version was also tested against the following stable channels:
New APIs
Test tags
New tag syntax for adding tags to the tests (@-tokens in the test title are still supported).
Use
--grep
command line option to run only tests with certain tags.npx playwright test --grep @ fast
Annotating skipped tests
New annotation syntax for test annotations allows annotating the tests that do not run.
page.addLocatorHandler()
Warning
This feature is experimental, we are actively looking for the feedback based on your scenarios.
New method page.addLocatorHandler() registers a callback that will be invoked when specified element becomes visible and may block Playwright actions. The callback can get rid of the overlay. Here is an example that closes a cookie dialog when it appears.
Project wildcard filter
Playwright command line flag now supports '*' wildcard when filtering by project.
Other APIs
expect(callback).toPass({ timeout })
The timeout can now be configured by
expect.toPass.timeout
option globally or in project configelectronApplication.on('console')
electronApplication.on('console') event is emitted when Electron main process calls console API methods.
page.pdf() accepts two new options
tagged
andoutline
.Breaking changes
Mixing the test instances in the same suite is no longer supported. Allowing it was an oversight as it makes reasoning about the semantics unnecessarily hard.
Announcements
Browser Versions
This version was also tested against the following stable channels:
Highlights
#29123 - [REGRESSION] route.continue: Protocol error (Fetch.continueRequest): Invalid InterceptionId.
Browser Versions
This version was also tested against the following stable channels:
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: