Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Upgrade @playwright/test from 1.37.1 to 1.39.0 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gh0stdotexe
Copy link

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.37.1 to 1.39.0.

ℹ️ 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 103 versions ahead of your current version.
  • The recommended version was released 2 months ago, on 2023-10-11.
Release notes
Package name: @playwright/test
  • 1.39.0 - 2023-10-11

    Add custom matchers to your expect

    You can extend Playwright assertions by providing custom matchers. These matchers will be available on the expect object.

    import { expect as baseExpect } from '@ playwright/test';
    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 { mergeTests } from '@ playwright/test';
    import { test as dbTest } from 'database-test-utils';
    import { test as a11yTest } from 'a11y-test-utils';

    export const test = mergeTests(dbTest, a11yTest);

    import { test } from './fixtures';

    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 { mergeTests, mergeExpects } from '@ playwright/test';
    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);

    import { test, expect } from './fixtures';

    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.

    async function login(page) {
      await test.step('login', async () => {
        // ...
      }, { box: true });  // Note the "box" option here.
    }
    https://github.com/login');
    > 15 | await login(page);
    | ^
    16 | });">
    Error: Timed out 5000ms waiting for expect(locator).toBeVisible()
    ... error details omitted ...

    14 | await page.goto('https://github.com/login');
    > 15 | await login(page);
    | ^
    16 | });

    See test.step() documentation for a full example.

    New APIs

    Browser Versions

    • Chromium 119.0.6045.9
    • Mozilla Firefox 118.0.1
    • WebKit 17.4

    This version was also tested against the following stable channels:

    • Google Chrome 118
    • Microsoft Edge 118
  • 1.39.0-beta-1697610523000 - 2023-10-18
  • 1.39.0-beta-1697575425000 - 2023-10-17
  • 1.39.0-beta-1697093675000 - 2023-10-12
  • 1.39.0-beta-1697057899000 - 2023-10-11
  • 1.39.0-beta-1697048429000 - 2023-10-11
  • 1.39.0-beta-1697047150000 - 2023-10-11
  • 1.39.0-beta-1696976263000 - 2023-10-10
  • 1.39.0-alpha-sep-30-2023 - 2023-09-30
  • 1.39.0-alpha-sep-29-2023 - 2023-09-29
  • 1.39.0-alpha-sep-28-2023 - 2023-09-28
  • 1.39.0-alpha-sep-27-2023 - 2023-09-27
  • 1.39.0-alpha-sep-26-2023 - 2023-09-26
  • 1.39.0-alpha-sep-25-2023 - 2023-09-25
  • 1.39.0-alpha-sep-24-2023 - 2023-09-24
  • 1.39.0-alpha-sep-23-2023 - 2023-09-23
  • 1.39.0-alpha-sep-22-2023 - 2023-09-22
  • 1.39.0-alpha-sep-21-2023 - 2023-09-21
  • 1.39.0-alpha-sep-20-2023 - 2023-09-20
  • 1.39.0-alpha-sep-19-2023 - 2023-09-19
  • 1.39.0-alpha-sep-18-2023 - 2023-09-18
  • 1.39.0-alpha-sep-17-2023 - 2023-09-17
  • 1.39.0-alpha-sep-16-2023 - 2023-09-16
  • 1.39.0-alpha-sep-15-2023 - 2023-09-15
  • 1.39.0-alpha-sep-14-2023 - 2023-09-14
  • 1.39.0-alpha-sep-13-2023 - 2023-09-13
  • 1.39.0-alpha-oct-9-2023 - 2023-10-09
  • 1.39.0-alpha-oct-8-2023 - 2023-10-08
  • 1.39.0-alpha-oct-7-2023 - 2023-10-07
  • 1.39.0-alpha-oct-6-2023 - 2023-10-06
  • 1.39.0-alpha-oct-5-2023 - 2023-10-05
  • 1.39.0-alpha-oct-4-2023 - 2023-10-04
  • 1.39.0-alpha-oct-3-2023 - 2023-10-03
  • 1.39.0-alpha-oct-2-2023 - 2023-10-02
  • 1.39.0-alpha-oct-10-2023 - 2023-10-10
  • 1.39.0-alpha-oct-1-2023 - 2023-10-01
  • 1.39.0-alpha-1696547902000 - 2023-10-05
  • 1.39.0-alpha-1696536018000 - 2023-10-05
  • 1.39.0-alpha-1694746830000 - 2023-09-15
  • 1.38.1 - 2023-09-21

    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

    • Chromium 117.0.5938.62
    • Mozilla Firefox 117.0
    • WebKit 17.0

    This version was also tested against the following stable channels:

    • Google Chrome 116
    • Microsoft Edge 116
  • 1.38.1-beta-1695325114000 - 2023-09-21
  • 1.38.0 - 2023-09-13

    UI Mode Updates

    Playwright UI Mode

    1. Zoom into time range.
    2. Network panel redesign.

    New APIs

    Deprecations

    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 via npx 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 via npx playwright install command.

    v1.37 and earlier

    playwright package was downloading browsers during npm install, while @ playwright/test was not.

    v1.38 and later

    playwright and @ playwright/test packages do not download browsers during npm install.

    Recommended migration

    Run npx playwright install to download browsers after npm install. For example, in your CI configuration:

    - run: npm ci
    - run: npx playwright install --with-deps

    Alternative migration option - not recommended

    Add @ playwright/browser-chromium, @ playwright/browser-firefox and @ playwright/browser-webkit as a dependency. These packages download respective browsers during npm install. Make sure you keep the version of all playwright packages in sync:

    // package.json
    {
      "devDependencies": {
        "playwright": "1.38.0",
        "@ playwright/browser-chromium": "1.38.0",
        "@ playwright/browser-firefox": "1.38.0",
        "@ playwright/browser-webkit": "1.38.0"
      }
    }

    Browser Versions

    • Chromium 117.0.5938.62
    • Mozilla Firefox 117.0
    • WebKit 17.0

    This version was also tested against the following stable channels:

    • Google Chrome 116
    • Microsoft Edge 116
  • 1.38.0-beta-1695261931000 - 2023-09-21
  • 1.38.0-beta-1695182347000 - 2023-09-20
  • 1.38.0-beta-1695162431000 - 2023-09-19
  • 1.38.0-beta-1695084020000 - 2023-09-19
  • 1.38.0-beta-1694800048000 - 2023-09-15
  • 1.38.0-beta-1694799093000 - 2023-09-15
  • 1.38.0-beta-1694795199000 - 2023-09-15
  • 1.38.0-beta-1694752409000 - 2023-09-15
  • 1.38.0-beta-1694737022000 - 2023-09-15
  • 1.38.0-beta-1694724379000 - 2023-09-14
  • 1.38.0-beta-1694645757000 - 2023-09-13
  • 1.38.0-beta-1694630350000 - 2023-09-13
  • 1.38.0-beta-1694630302000 - 2023-09-13
  • 1.38.0-beta-1694622530000 - 2023-09-13
  • 1.38.0-beta-1694609184000 - 2023-09-13
  • 1.38.0-beta-1694484181000 - 2023-09-12
  • 1.38.0-beta-1694481542000 - 2023-09-12
  • 1.38.0-beta-1694481362000 - 2023-09-12
  • 1.38.0-beta-1691778350000 - 2023-08-11
  • 1.38.0-alpha-sep-9-2023 - 2023-09-09
  • 1.38.0-alpha-sep-8-2023 - 2023-09-08
  • 1.38.0-alpha-sep-7-2023 - 2023-09-07
  • 1.38.0-alpha-sep-6-2023 - 2023-09-06
  • 1.38.0-alpha-sep-5-2023 - 2023-09-05
  • 1.38.0-alpha-sep-4-2023 - 2023-09-04
  • 1.38.0-alpha-sep-3-2023 - 2023-09-03
  • 1.38.0-alpha-sep-2-2023 - 2023-09-02
  • 1.38.0-alpha-sep-12-2023 - 2023-09-12
  • 1.38.0-alpha-sep-11-2023 - 2023-09-11
  • 1.38.0-alpha-sep-10-2023 - 2023-09-10
  • 1.38.0-alpha-sep-1-2023 - 2023-09-01
  • 1.38.0-alpha-aug-31-2023 - 2023-08-31
  • 1.38.0-alpha-aug-30-2023 - 2023-08-30
  • 1.38.0-alpha-aug-29-2023 - 2023-08-29
  • 1.38.0-alpha-aug-28-2023 - 2023-08-28
  • 1.38.0-alpha-aug-27-2023 - 2023-08-27
  • 1.38.0-alpha-aug-26-2023 - 2023-08-26
  • 1.38.0-alpha-aug-25-2023 - 2023-08-25
  • 1.38.0-alpha-aug-24-2023 - 2023-08-24
  • 1.38.0-alpha-aug-23-2023 - 2023-08-23
  • 1.38.0-alpha-aug-22-2023 - 2023-08-22
  • 1.38.0-alpha-aug-21-2023 - 2023-08-21
  • 1.38.0-alpha-aug-20-2023 - 2023-08-20
  • 1.38.0-alpha-aug-19-2023 - 2023-08-19
  • 1.38.0-alpha-aug-18-2023 - 2023-08-18
  • 1.38.0-alpha-aug-17-2023 - 2023-08-17
  • 1.38.0-alpha-aug-16-2023 - 2023-08-16
  • 1.38.0-alpha-aug-15-2023 - 2023-08-15
  • 1.38.0-alpha-aug-14-2023 - 2023-08-14
  • 1.38.0-alpha-aug-13-2023 - 2023-08-13
  • 1.38.0-alpha-aug-12-2023 - 2023-08-12
  • 1.38.0-alpha-aug-11-2023 - 2023-08-11
  • 1.38.0-alpha-aug-10-2023 - 2023-08-10
  • 1.38.0-alpha-1693251770000 - 2023-08-28
  • 1.38.0-alpha-1692826278000 - 2023-08-23
  • 1.38.0-alpha-1692720102000 - 2023-08-22
  • 1.38.0-alpha-1692636622000 - 2023-08-21
  • 1.38.0-alpha-1692320133000 - 2023-08-18
  • 1.38.0-alpha-1692292098000 - 2023-08-17
  • 1.38.0-alpha-1692290219000 - 2023-08-17
  • 1.38.0-alpha-1692262648000 - 2023-08-17
  • 1.37.1 - 2023-08-17

    Highlights

    #26496 - [REGRESSION] webServer stdout is always getting printed
    #26492 - [REGRESSION] test.only with project dependency is not working

    Browser Versions

    • Chromium 116.0.5845.82
    • Mozilla Firefox 115.0
    • WebKit 17.0

    This version was also tested against the following stable channels:

    • Google Chrome 115
    • Microsoft Edge 115
from @playwright/test GitHub release notes
Commit messages
Package name: @playwright/test
  • 3049d99 cherry-pick(#27555): chore: composed->merge
  • ae31f58 chore: mark 1.39.0 (#27550)
  • 5313514 cherry-pick(#27549): docs: update release notes for 1.39
  • 0d168dc chore: release notes for 1.39 (#27537)
  • 4f9b285 chore: update WebKit version to 17.4 (#27536)
  • d11380e docs: improve test.step documentation (#27535)
  • 9edb811 feat(chromium-tip-of-tree): roll to r1158 (#27533)
  • d05c865 test: unflake a few tests (#27519)
  • 2776d84 docs: how to update playwright in python (#27527)
  • 2407041 fix(chromium): avoid premature continue of redirects (#27520)
  • fd6bf8a chrome: improve error messages on vscode side (#27521)
  • 97c0894 docs: better expect.extend docs (#27515)
  • 11a4b3f chore: remove parsed stack trace (#27496)
  • 40ba5eb test: unflake a launcher test in driver mode (#27518)
  • e8523ab test: mark some `--headless=new` tests as fixme (#27516)
  • 39f92e8 test: limit workers to one for Firefox on Windows (#27514)
  • 036a018 feat(webkit): roll to r1921 (#27512)
  • 1cb406f docs: note that pytest CLI args only apply to default fixtures (#27511)
  • e70b10a docs(test-reporters): Added Testomat.io reporter to list of reporters (#27449)
  • 9062dd0 feat(chromium): roll to r1084 (#27497)
  • b807c97 chore: allow passing path to property in toHaveJSProperty (#27495)
  • 7381099 feat(webkit): roll to r1920 (#27493)
  • 7447761 fix(build): ignore empty bundle directories (#27491)
  • ae5610f chore: include full messages into `pw:channel` logs (#27488)

Compare


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:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants