Skip to content

chore(deps): update dependency @playwright/test to v1.42.1

Renovate Bot requested to merge renovate/playwright-monorepo into master

This MR contains the following updates:

Package Type Update Change
@playwright/test (source) devDependencies minor 1.40.1 -> 1.42.1

Release Notes

microsoft/playwright (@​playwright/test)

v1.42.1

Compare Source

Highlights

https://github.com/microsoft/playwright/issues/29732 - [Regression]: HEAD requests to webServer.url since v1.42.0 https://github.com/microsoft/playwright/issues/29746 - [Regression]: Playwright CT CLI scripts fail due to broken initializePlugin import https://github.com/microsoft/playwright/issues/29739 - [Bug]: Component tests fails when imported a module with a dot in a name https://github.com/microsoft/playwright/issues/29731 - [Regression]: 1.42.0 breaks some import statements https://github.com/microsoft/playwright/issues/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

v1.42.0

Compare Source

New APIs

  • Test tags

    New tag syntax for adding tags to the tests (@​-tokens in the test title are still supported).

    test('test customer login', { tag: ['@​fast', '@​login'] }, async ({ page }) => {
      // ...
    });

    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.

    test('test full report', {
      annotation: [
        { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/23180' },
        { type: 'docs', description: 'https://playwright.dev/docs/test-annotations#tag-tests' },
      ],
    }, async ({ page }) => {
      // ...
    });
  • page.addLocatorHandler()

    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.

    // Setup the handler.
    await page.addLocatorHandler(
        page.getByRole('heading', { name: 'Hej! You are in control of your cookies.' }),
        async () => {
          await page.getByRole('button', { name: 'Accept all' }).click();
        });
    // Write the test as usual.
    await page.goto('https://www.ikea.com/');
    await page.getByRole('link', { name: 'Collection of blue and white' }).click();
    await expect(page.getByRole('heading', { name: 'Light and easy' })).toBeVisible();
  • Project wildcard filter Playwright command line flag now supports '*' wildcard when filtering by project.

    npx playwright test --project='*mobile*'
  • Other APIs

    • expect(callback).toPass({ timeout }) The timeout can now be configured by expect.toPass.timeout option globally or in project config

    • electronApplication.on('console') electronApplication.on('console') event is emitted when Electron main process calls console API methods.

      electronApp.on('console', async msg => {
        const values = [];
        for (const arg of msg.args())
          values.push(await arg.jsonValue());
        console.log(...values);
      });
      await electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
    • page.pdf() accepts two new options tagged and outline.

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.

const test = baseTest.extend({ item: async ({}, use) => {} });
baseTest.describe('Admin user', () => {
  test('1', async ({ page, item }) => {});
  test('2', async ({ page, item }) => {});
});

Announcements

  • ️ Ubuntu 18 is not supported anymore.

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

v1.41.2

Compare Source

Highlights

https://github.com/microsoft/playwright/issues/29123 - [REGRESSION] route.continue: Protocol error (Fetch.continueRequest): Invalid InterceptionId.

Browser Versions

  • Chromium 121.0.6167.57
  • Mozilla Firefox 121.0
  • WebKit 17.4

This version was also tested against the following stable channels:

  • Google Chrome 120
  • Microsoft Edge 120

v1.41.1

Compare Source

Highlights

https://github.com/microsoft/playwright/issues/29067 - [REGRESSION] Codegen/Recorder: not all clicks are being actioned nor recorded https://github.com/microsoft/playwright/issues/29028 - [REGRESSION] React component tests throw type error when passing null/undefined to component https://github.com/microsoft/playwright/issues/29027 - [REGRESSION] React component tests not passing Date prop values https://github.com/microsoft/playwright/issues/29023 - [REGRESSION] React component tests not rendering children prop https://github.com/microsoft/playwright/issues/29019 - [REGRESSION] trace.playwright.dev does not currently support the loading from URL

Browser Versions

  • Chromium 121.0.6167.57
  • Mozilla Firefox 121.0
  • WebKit 17.4

This version was also tested against the following stable channels:

  • Google Chrome 120
  • Microsoft Edge 120

v1.41.0

Compare Source

New APIs

Browser Versions

  • Chromium 121.0.6167.57
  • Mozilla Firefox 121.0
  • WebKit 17.4

This version was also tested against the following stable channels:

  • Google Chrome 120
  • Microsoft Edge 120

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Edited by Renovate Bot

Merge request reports