[Snyk] Upgrade @playwright/test from 1.19.0-alpha-1643749494000 to 1.40.1 #1003
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.19.0-alpha-1643749494000 to 1.40.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-BABELTRAVERSE-5962462
Why? Proof of Concept exploit, Has a fix available, CVSS 9.3
SNYK-JS-JPEGJS-2859218
Why? Proof of Concept exploit, Has a fix available, CVSS 9.3
SNYK-JS-SEMVER-3247795
Why? Proof of Concept exploit, Has a fix available, CVSS 9.3
SNYK-JS-INFLIGHT-6095116
Why? Proof of Concept exploit, Has a fix available, CVSS 9.3
SNYK-JS-JSON5-3182856
Why? Proof of Concept exploit, Has a fix available, CVSS 9.3
SNYK-JS-JSON5-3182856
Why? Proof of Concept exploit, Has a fix available, CVSS 9.3
SNYK-JS-MINIMATCH-3050818
Why? Proof of Concept exploit, Has a fix available, CVSS 9.3
SNYK-JS-MINIMIST-2429795
Why? Proof of Concept exploit, Has a fix available, CVSS 9.3
(*) Note that the real score may have changed since the PR was raised.
Release notes
Package name: @playwright/test
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:
Add custom matchers to your expect
You can extend Playwright assertions by providing custom matchers. These matchers will be available on the expect object.
export const expect = baseExpect.extend({
async toHaveAmount(locator: Locator, expected: number, options?: { timeout?: number }) {
// ... see documentation for how to write matchers.
},
});
test('pass', async ({ page }) => {
await expect(page.getByTestId('cart')).toHaveAmount(5);
});
See the documentation for a full example.
Merge test fixtures
You can now merge test fixtures from multiple files or modules:
import { test as dbTest } from 'database-test-utils';
import { test as a11yTest } from 'a11y-test-utils';
export const test = mergeTests(dbTest, a11yTest);
test('passes', async ({ database, page, a11y }) => {
// use database and a11y fixtures.
});
Merge custom expect matchers
You can now merge custom expect matchers from multiple files or modules:
import { test as dbTest, expect as dbExpect } from 'database-test-utils';
import { test as a11yTest, expect as a11yExpect } from 'a11y-test-utils';
export const test = mergeTests(dbTest, a11yTest);
export const expect = mergeExpects(dbExpect, a11yExpect);
test('passes', async ({ page, database }) => {
await expect(database).toHaveDatabaseUser('admin');
await expect(page).toPassA11yAudit();
});
Hide implementation details: box test steps
You can mark a
test.step()
as "boxed" so that errors inside it point to the step call site.> 15 | await login(page);
| ^
16 | });">
See
test.step()
documentation for a full example.New APIs
expect(locator).toHaveAttribute(name)
Browser Versions
This version was also tested against the following stable channels:
Read more
Read more
Highlights
#26496 - [REGRESSION] webServer stdout is always getting printed
#26492 - [REGRESSION] test.only with project dependency is not working
Browser Versions
This version was also tested against the following stable channels:
Read more