Skip to content

[Snyk] Upgrade @playwright/test from 1.42.1 to 1.44.1#3

Open
YoutacRandS-VA wants to merge 1 commit into
masterfrom
snyk-upgrade-9db4ac83bb4601ab9b0fddd2992806f5
Open

[Snyk] Upgrade @playwright/test from 1.42.1 to 1.44.1#3
YoutacRandS-VA wants to merge 1 commit into
masterfrom
snyk-upgrade-9db4ac83bb4601ab9b0fddd2992806f5

Conversation

@YoutacRandS-VA

Copy link
Copy Markdown
Owner

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.42.1 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 99 versions ahead of your current version.

  • The recommended version was released on a month ago.

Issues fixed by the recommended upgrade:

Issue Score Exploit Maturity
high severity Uncontrolled resource consumption
SNYK-JS-BRACES-6838727
482 Proof of Concept
high severity Server-side Request Forgery (SSRF)
SNYK-JS-IP-6240864
482 Proof of Concept
high severity Inefficient Regular Expression Complexity
SNYK-JS-MICROMATCH-6838728
482 No Known Exploit
high severity Regular Expression Denial of Service (ReDoS)
SNYK-JS-SEMVER-3247795
482 Proof of Concept
medium severity Server-Side Request Forgery (SSRF)
SNYK-JS-IP-7148531
482 Proof of Concept
medium severity Uncontrolled Resource Consumption ('Resource Exhaustion')
SNYK-JS-TAR-6476909
482 Proof of Concept
Release notes
Package name: @playwright/test
  • 1.44.1 - 2024-05-23

    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

    • Chromium 125.0.6422.14
    • Mozilla Firefox 125.0.1
    • WebKit 17.4

    This version was also tested against the following stable channels:

    • Google Chrome 124
    • Microsoft Edge 124
  • 1.44.1-beta-1716453231000 - 2024-05-23
  • 1.44.1-beta-1716449392000 - 2024-05-23
  • 1.44.0 - 2024-05-06

    New APIs

    Accessibility assertions

    • expect(locator).toHaveAccessibleName() checks if the element has the specified accessible name:

      const locator = page.getByRole('button');
      await expect(locator).toHaveAccessibleName('Submit');
    • expect(locator).toHaveAccessibleDescription() checks if the element has the specified accessible description:

      const locator = page.getByRole('button');
      await expect(locator).toHaveAccessibleDescription('Upload a photo');
    • expect(locator).toHaveRole() checks if the element has the specified ARIA role:

      const locator = page.getByTestId('save-button');
      await expect(locator).toHaveRole('button');

    Locator handler

    • After executing the handler added with page.addLocatorHandler(), Playwright will now wait until the overlay that triggered the handler is not visible anymore. You can opt-out of this behavior with the new noWaitAfter option.
    • You can use new times option in page.addLocatorHandler() to specify maximum number of times the handler should be run.
    • The handler in page.addLocatorHandler() now accepts the locator as argument.
    • New page.removeLocatorHandler() method for removing previously added locator handlers.
    const locator = page.getByText('This interstitial covers the button');
    await page.addLocatorHandler(locator, async overlay => {
      await overlay.locator('#close').click();
    }, { times: 3, noWaitAfter: true });
    // Run your tests that can be interrupted by the overlay.
    // ...
    await page.removeLocatorHandler(locator);

    Miscellaneous options

    • multipart option in apiRequestContext.fetch() now accepts FormData and supports repeating fields with the same name.

      const formData = new FormData();
      formData.append('file', new File(['let x = 2024;'], 'f1.js', { type: 'text/javascript' }));
      formData.append('file', new File(['hello'], 'f2.txt', { type: 'text/plain' }));
      context.request.post('https://example.com/uploadFiles', {
        multipart: formData
      });
    • expect(callback).toPass({ intervals }) can now be configured by expect.toPass.inervals option globally in testConfig.expect or per project in testProject.expect.

    • expect(page).toHaveURL(url) now supports ignoreCase option.

    • testProject.ignoreSnapshots allows to configure per project whether to skip screenshot expectations.

    Reporter API

    • New method suite.entries() returns child test suites and test cases in their declaration order. suite.type and testCase.type can be used to tell apart test cases and suites in the list.
    • Blob reporter now allows overriding report file path with a single option outputFile. The same option can also be specified as PLAYWRIGHT_BLOB_OUTPUT_FILE environment variable that might be more convenient on CI/CD.
    • JUnit reporter now supports includeProjectInTestName option.

    Command line

    • --last-failed CLI option for running only tests that failed in the previous run.

      First run all tests:

      test

      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:

      test --last-failed

      Running 2 tests using 2 workers
      2 passed (1.2s)

    Browser Versions

    • Chromium 125.0.6422.14
    • Mozilla Firefox 125.0.1
    • WebKit 17.4

    This version was also tested against the following stable channels:

    • Google Chrome 124
    • Microsoft Edge 124
  • 1.44.0-beta-1716306049000 - 2024-05-21
  • 1.44.0-beta-1716285871000 - 2024-05-21
  • 1.44.0-beta-1715802478000 - 2024-05-15
  • 1.44.0-beta-1715791608000 - 2024-05-15
  • 1.44.0-beta-1715706051000 - 2024-05-14
  • 1.44.0-beta-1715189091000 - 2024-05-08
  • 1.44.0-beta-1715020014000 - 2024-05-06
  • 1.44.0-beta-1715018865000 - 2024-05-06
  • 1.44.0-beta-1714753004000 - 2024-05-06
  • 1.44.0-beta-1714435420000 - 2024-04-30
  • 1.44.0-beta-1714434520000 - 2024-04-29
  • 1.44.0-alpha-2024-04-29 - 2024-04-29
  • 1.44.0-alpha-2024-04-28 - 2024-04-28
  • 1.44.0-alpha-2024-04-27 - 2024-04-27
  • 1.44.0-alpha-2024-04-26 - 2024-04-26
  • 1.44.0-alpha-2024-04-25 - 2024-04-25
  • 1.44.0-alpha-2024-04-24 - 2024-04-24
  • 1.44.0-alpha-2024-04-23 - 2024-04-23
  • 1.44.0-alpha-2024-04-22 - 2024-04-22
  • 1.44.0-alpha-2024-04-19 - 2024-04-19
  • 1.44.0-alpha-2024-04-18 - 2024-04-18
  • 1.44.0-alpha-2024-04-17 - 2024-04-17
  • 1.44.0-alpha-2024-04-16 - 2024-04-16
  • 1.44.0-alpha-2024-04-15 - 2024-04-15
  • 1.44.0-alpha-2024-04-14 - 2024-04-14
  • 1.44.0-alpha-2024-04-13 - 2024-04-13
  • 1.44.0-alpha-2024-04-12 - 2024-04-12
  • 1.44.0-alpha-2024-04-11 - 2024-04-11
  • 1.44.0-alpha-2024-04-10 - 2024-04-10
  • 1.44.0-alpha-2024-04-09 - 2024-04-09
  • 1.44.0-alpha-2024-04-08 - 2024-04-08
  • 1.44.0-alpha-2024-04-07 - 2024-04-07
  • 1.44.0-alpha-2024-04-06 - 2024-04-06
  • 1.44.0-alpha-2024-04-05 - 2024-04-05
  • 1.44.0-alpha-2024-04-04 - 2024-04-04
  • 1.44.0-alpha-2024-04-03 - 2024-04-03
  • 1.44.0-alpha-2024-04-02 - 2024-04-02
  • 1.44.0-alpha-2024-04-01 - 2024-04-01
  • 1.44.0-alpha-2024-03-31 - 2024-03-31
  • 1.44.0-alpha-2024-03-30 - 2024-03-30
  • 1.44.0-alpha-2024-03-29 - 2024-03-29
  • 1.44.0-alpha-2024-03-28 - 2024-03-28
  • 1.44.0-alpha-2024-03-27 - 2024-03-27
  • 1.44.0-alpha-1714168971000 - 2024-04-26
  • 1.44.0-alpha-1711994091000 - 2024-04-01
  • 1.43.1 - 2024-04-12

    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

    • Chromium 124.0.6367.29
    • Mozilla Firefox 124.0
    • WebKit 17.4

    This version was also tested against the following stable channels:

    • Google Chrome 123
    • Microsoft Edge 123
  • 1.43.1-beta-1712942342000 - 2024-04-12
  • 1.43.0 - 2024-04-04

    New APIs

    • Method browserContext.clearCookies() now supports filters to remove only some cookies.

      // Clear all cookies.
      await context.clearCookies();
      // New: clear cookies with a particular name.
      await context.clearCookies({ name: 'session-id' });
      // New: clear cookies for a particular domain.
      await context.clearCookies({ domain: 'my-origin.com' });
    • 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.

      import { defineConfig } from '@ playwright/test';

      export default defineConfig({
      use: {
      trace: 'retain-on-first-failure',
      },
      });

    • New property testInfo.tags exposes test tags during test execution.

      test('example', async ({ page }) => {
        console.log(test.info().tags);
      });
    • New method locator.contentFrame() converts a Locator object to a FrameLocator. This can be useful when you have a Locator object obtained somewhere, and later on would like to interact with the content inside the frame.

      const locator = page.locator('iframe[name="embedded"]');
      // ...
      const frameLocator = locator.contentFrame();
      await frameLocator.getByRole('button').click();
    • New method frameLocator.owner() converts a FrameLocator object to a Locator. This can be useful when you have a FrameLocator object obtained somewhere, and later on would like to interact with the iframe element.

      const frameLocator = page.frameLocator('iframe[name="embedded"]');
      // ...
      const locator = frameLocator.owner();
      await expect(locator).toBeVisible();

    UI Mode Updates

    Playwright UI Mode

    • See tags in the test list.
    • Filter by tags by typing @ fast or clicking on the tag itself.
    • New shortcuts:
      • F5 to run tests.
      • Shift F5 to stop running tests.
      • Ctrl ` to toggle test output.

    Browser Versions

    • Chromium 124.0.6367.29
    • Mozilla Firefox 124.0
    • WebKit 17.4

    This version was also tested against the following stable channels:

    • Google Chrome 123
    • Microsoft Edge 123
  • 1.43.0-beta-1712871607000 - 2024-04-11
  • 1.43.0-beta-1712860105000 - 2024-04-11
  • 1.43.0-beta-1712646596000 - 2024-04-09
  • 1.43.0-beta-1712258732000 - 2024-04-04
  • 1.43.0-beta-1712217576000 - 2024-04-04
  • 1.43.0-beta-1712173949000 - 2024-04-03
  • 1.43.0-beta-1712010778000 - 2024-04-01
  • 1.43.0-beta-1711849714000 - 2024-03-31
  • 1.43.0-beta-1711742093000 - 2024-03-29
  • 1.43.0-beta-1711653598000 - 2024-03-28
  • 1.43.0-beta-1711554436000 - 2024-03-27
  • 1.43.0-beta-1711493485000 - 2024-03-26
  • 1.43.0-beta-1711484700000 - 2024-03-26
  • 1.43.0-beta-1709675102000 - 2024-03-05
  • 1.43.0-alpha-2024-03-26 - 2024-03-26
  • 1.43.0-alpha-2024-03-25 - 2024-03-25
  • 1.43.0-alpha-2024-03-24 - 2024-03-24
  • 1.43.0-alpha-2024-03-23 - 2024-03-23
  • 1.43.0-alpha-2024-03-22 - 2024-03-22
  • 1.43.0-alpha-2024-03-21 - 2024-03-21
  • 1.43.0-alpha-2024-03-20 - 2024-03-20
  • 1.43.0-alpha-2024-03-19 - 2024-03-19
  • 1.43.0-alpha-2024-03-18 - 2024-03-18
  • 1.43.0-alpha-2024-03-17 - 2024-03-17
  • 1.43.0-alpha-2024-03-16 - 2024-03-16
  • 1.43.0-alpha-2024-03-15 - 2024-03-15
  • 1.43.0-alpha-2024-03-14 - 2024-03-14
  • 1.43.0-alpha-2024-03-13 - 2024-03-13
  • 1.43.0-alpha-2024-03-12 - 2024-03-12
  • 1.43.0-alpha-2024-03-11 - 2024-03-11
  • 1.43.0-alpha-2024-03-10 - 2024-03-10
  • 1.43.0-alpha-2024-03-09 - 2024-03-09
  • 1.43.0-alpha-2024-03-08 - 2024-03-08
  • 1.43.0-alpha-2024-03-07 - 2024-03-07
  • 1.43.0-alpha-2024-03-06 - 2024-03-06
  • 1.43.0-alpha-2024-03-05 - 2024-03-05
  • 1.43.0-alpha-2024-03-04 - 2024-03-04
  • 1.43.0-alpha-2024-03-03 - 2024-03-03
  • 1.43.0-alpha-2024-03-02 - 2024-03-02
  • 1.43.0-alpha-2024-03-01 - 2024-03-01
  • 1.43.0-alpha-2024-02-29 - 2024-02-29
  • 1.43.0-alpha-2024-02-28 - 2024-02-28
  • 1.43.0-alpha-1711470013000 - 2024-03-26
  • 1.43.0-alpha-1711027602000 - 2024-03-21
  • 1.43.0-alpha-1710520846000 - 2024-03-15
  • 1.43.0-alpha-1709847741000 - 2024-03-07
  • 1.43.0-alpha-1709823751000 - 2024-03-07
  • 1.42.1 - 2024-03-02

    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

    • Chromium 123.0.6312.4
    • Mozilla Firefox 123.0
    • WebKit 17.4

    This version was also tested against the following stable channels:

    • Google Chrome 122
    • Microsoft Edge 123
from @playwright/test GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Snyk has created this PR to upgrade @playwright/test from 1.42.1 to 1.44.1.

See this package in npm:
@playwright/test

See this project in Snyk:
https://app.snyk.io/org/youtacrands-va/project/27cf5f34-73e8-4475-84ef-562095d3189e?utm_source=github&utm_medium=referral&page=upgrade-pr
@YoutacRandS-VA YoutacRandS-VA self-assigned this Nov 1, 2024
@YoutacRandS-VA YoutacRandS-VA added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Nov 1, 2024
@YoutacRandS-VA YoutacRandS-VA linked an issue Dec 29, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Datatracker

2 participants