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

📦 deps: update playwright to v1.27.1 #1814

Merged
merged 1 commit into from
Oct 25, 2022
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 25, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
playwright (source) 1.23.4 -> 1.27.1 age adoption passing confidence

Release Notes

Microsoft/playwright

v1.27.1

Compare Source

Highlights

This patch release includes the following bug fixes:

https://github.com/microsoft/playwright/pull/18010 - fix(generator): generate nice locators for arbitrary selectors
https://github.com/microsoft/playwright/pull/17999 - chore: don't fail on undefined video/trace
https://github.com/microsoft/playwright/issues/17955 - [Question] Github Actions test compatibility check failed mitigation?https://github.com/microsoft/playwright/issues/179600 - [BUG] Codegen 1.27 creates NUnit code that does not compilhttps://github.com/microsoft/playwright/pull/1795252 - fix: fix typo in treeitem role typing

Browser Versions

  • Chromium 107.0.5304.18
  • Mozilla Firefox 105.0.1
  • WebKit 16.0

This version was also tested against the following stable channels:

  • Google Chrome 106
  • Microsoft Edge 106

v1.27.0

Compare Source

Locators

With these new APIs, inspired by Testing Library, writing locators is a joy:

await page.getByLabel('User Name').fill('John');

await page.getByLabel('Password').fill('secret-password');

await page.getByRole('button', { name: 'Sign in' }).click();

await expect(page.getByText('Welcome, John!')).toBeVisible();

All the same methods are also available on Locator, FrameLocator and Frame classes.

Other highlights
  • workers option in the playwright.config.ts now accepts a percentage string to use some of the available CPUs. You can also pass it in the command line:

    npx playwright test --workers=20%
  • New options host and port for the html reporter.

    reporters: [['html', { host: 'localhost', port: '9223' }]]
  • New field FullConfig.configFile is available to test reporters, specifying the path to the config file if any.

  • As announced in v1.25, Ubuntu 18 will not be supported as of Dec 2022. In addition to that, there will be no WebKit updates on Ubuntu 18 starting from the next Playwright release.

Behavior Changes
  • expect(locator).toHaveAttribute(name, value, options) with an empty value does not match missing attribute anymore. For example, the following snippet will succeed when button does not have a disabled attribute.

    await expect(page.getByRole('button')).toHaveAttribute('disabled', '');
  • Command line options --grep and --grep-invert previously incorrectly ignored grep and grepInvert options specified in the config. Now all of them are applied together.

  • JSON reporter path resolution is performed relative to the config directory instead of the current working directory:

    ["json", { outputFile: "./test-results/results.json" }]]
Browser Versions
  • Chromium 107.0.5304.18
  • Mozilla Firefox 105.0.1
  • WebKit 16.0

This version was also tested against the following stable channels:

  • Google Chrome 106
  • Microsoft Edge 106

v1.26.1

Compare Source

Highlights

This patch includes the following bug fixes:

https://github.com/microsoft/playwright/issues/17500 - [BUG] No tests found using the test explorer - pw/test@1.26.0

Browser Versions

  • Chromium 106.0.5249.30
  • Mozilla Firefox 104.0
  • WebKit 16.0

This version was also tested against the following stable channels:

  • Google Chrome 105
  • Microsoft Edge 105

v1.26.0

Compare Source

Assertions

Other Highlights

  • New option maxRedirects for apiRequestContext.get(url[, options]) and others to limit redirect count.
  • New command-line flag --pass-with-no-tests that allows the test suite to pass when no files are found.
  • New command-line flag --ignore-snapshots to skip snapshot expectations, such as expect(value).toMatchSnapshot() and expect(page).toHaveScreenshot().

Behavior Change

A bunch of Playwright APIs already support the waitUntil: 'domcontentloaded' option. For example:

await page.goto('https://playwright.dev', {
  waitUntil: 'domcontentloaded',
});

Prior to 1.26, this would wait for all iframes to fire the DOMContentLoaded event.

To align with web specification, the 'domcontentloaded' value only waits for the target frame to fire the 'DOMContentLoaded' event. Use waitUntil: 'load' to wait for all iframes.

Browser Versions

  • Chromium 106.0.5249.30
  • Mozilla Firefox 104.0
  • WebKit 16.0

This version was also tested against the following stable channels:

  • Google Chrome 105
  • Microsoft Edge 105

v1.25.2

Compare Source

Highlights

This patch includes the following bug fixes:

https://github.com/microsoft/playwright/issues/16937 - [REGRESSION]: session storage failing >= 1.25.0 in firefoxhttps://github.com/microsoft/playwright/issues/169555 - Not using channel on config file when Show and Reuse browser is checked

Browser Versions

  • Chromium 105.0.5195.19
  • Mozilla Firefox 103.0
  • WebKit 16.0

This version was also tested against the following stable channels:

  • Google Chrome 104
  • Microsoft Edge 104

v1.25.1

Compare Source

Highlights

This patch includes the following bug fixes:

https://github.com/microsoft/playwright/issues/16319 - [BUG] webServer.command esbuild fails with ESM and Yarnhttps://github.com/microsoft/playwright/issues/164600 - [BUG] Component test fails on 2nd run when SSL is usehttps://github.com/microsoft/playwright/issues/1666565 - [BUG] custom selector engines don't work when running in debug mode

Browser Versions

  • Chromium 105.0.5195.19
  • Mozilla Firefox 103.0
  • WebKit 16.0

This version was also tested against the following stable channels:

  • Google Chrome 104
  • Microsoft Edge 104

v1.25.0

Compare Source

VSCode Extension
  • New Playwright actions view

    Playwright actions
  • Pick selector
    You can pick selector right from a live page, before or after running a test

    Pick selector
  • Record new test
    Start recording where you left off with the new 'Record new test' feature.

  • Show & reuse browser
    Watch your tests running live & keep devtools open. Develop while continuously running tests.

extension screenshot
Test Runner
  • test.step(title, body) now returns the value of the step function:

    test('should work', async ({ page }) => {
        const pageTitle = await test.step('get title', async () => {
            await page.goto('https://playwright.dev');
            return await page.title();
        });
        console.log(pageTitle);
    });
  • Added test.describe.fixme(title, callback).

  • New 'interrupted' test status.

  • Enable tracing via CLI flag: npx playwright test --trace=on.

  • New property testCase.id that can be use in reporters as a history ID.

Announcements
  • 🎁 We now ship Ubuntu 22.04 Jammy Jellyfish docker image: mcr.microsoft.com/playwright:v1.25.0-jammy.
  • 🪦 This is the last release with macOS 10.15 support (deprecated as of 1.21).
  • 🪦 This is the last release with Node.js 12 support, we recommend upgrading to Node.js LTS (16).
  • ⚠️ Ubuntu 18 is now deprecated and will not be supported as of Dec 2022.
Browser Versions
  • Chromium 105.0.5195.19
  • Mozilla Firefox 103.0
  • WebKit 16.0

This version was also tested against the following stable channels:

  • Google Chrome 104
  • Microsoft Edge 104

v1.24.2

Compare Source

Highlights

This patch includes the following bug fixes:

https://github.com/microsoft/playwright/issues/15977 - [BUG] test.use of storage state regression in 1.24

Browser Versions

  • Chromium 104.0.5112.48
  • Mozilla Firefox 102.0
  • WebKit 16.0

This version was also tested against the following stable channels:

  • Google Chrome 103
  • Microsoft Edge 103

v1.24.1

Compare Source

Highlights

This patch includes the following bug fixes:

https://github.com/microsoft/playwright/issues/15898 - [BUG] Typescript error: The type for webServer config property (TestConfigWebServer) is not typed correctlyhttps://github.com/microsoft/playwright/issues/159133 - [BUG] hooksConfig is required for mount fixturhttps://github.com/microsoft/playwright/issues/1593232 - [BUG] - Install MS Edge on CI Fails

Browser Versions

  • Chromium 104.0.5112.48
  • Mozilla Firefox 102.0
  • WebKit 16.0

This version was also tested against the following stable channels:

  • Google Chrome 103
  • Microsoft Edge 103

v1.24.0

Compare Source

🌍 Multiple Web Servers in playwright.config.ts

Launch multiple web servers, databases, or other processes by passing an array of configurations:

// playwright.config.ts
import type { PlaywrightTestConfig } from '@​playwright/test';
const config: PlaywrightTestConfig = {
  webServer: [
    {
      command: 'npm run start',
      port: 3000,
      timeout: 120 * 1000,
      reuseExistingServer: !process.env.CI,
    },
    {
      command: 'npm run backend',
      port: 3333,
      timeout: 120 * 1000,
      reuseExistingServer: !process.env.CI,
    }
  ],
  use: {
    baseURL: 'http://localhost:3000/',
  },
};
export default config;
🐂 Debian 11 Bullseye Support

Playwright now supports Debian 11 Bullseye on x86_64 for Chromium, Firefox and WebKit. Let us know
if you encounter any issues!

Linux support looks like this:

Ubuntu 18.04 Ubuntu 20.04 Ubuntu 22.04 Debian 11
Chromium
WebKit
Firefox
🕵️ Anonymous Describe

It is now possible to call test.describe(callback) to create suites without a title. This is useful for giving a group of tests a common option with test.use(options).

test.describe(() => {
  test.use({ colorScheme: 'dark' });

  test('one', async ({ page }) => {
    // ...
  });

  test('two', async ({ page }) => {
    // ...
  });
});
🧩 Component Tests Update

Playwright 1.24 Component Tests introduce beforeMount and afterMount hooks.
Use these to configure your app for tests.

Vue + Vue Router

For example, this could be used to setup App router in Vue.js:

// src/component.spec.ts
import { test } from '@​playwright/experimental-ct-vue';
import { Component } from './mycomponent';

test('should work', async ({ mount }) => {
  const component = await mount(Component, {
    hooksConfig: {
      /* anything to configure your app */
    }
  });
});
// playwright/index.ts
import { router } from '../router';
import { beforeMount } from '@​playwright/experimental-ct-vue/hooks';

beforeMount(async ({ app, hooksConfig }) => {
  app.use(router);
});
React + Next.js

A similar configuration in Next.js would look like this:

// src/component.spec.jsx
import { test } from '@​playwright/experimental-ct-react';
import { Component } from './mycomponent';

test('should work', async ({ mount }) => {
  const component = await mount(<Component></Component>, {
    // Pass mock value from test into `beforeMount`.
    hooksConfig: {
      router: {
        query: { page: 1, per_page: 10 },
        asPath: '/posts'
      }
    }
  });
});
// playwright/index.js
import router from 'next/router';
import { beforeMount } from '@&#8203;playwright/experimental-ct-react/hooks';

beforeMount(async ({ hooksConfig }) => {
  // Before mount, redefine useRouter to return mock value from test.
  router.useRouter = () => hooksConfig.router;
});
Browser Versions
  • Chromium 104.0.5112.48
  • Mozilla Firefox 102.0
  • WebKit 16.0

This version was also tested against the following stable channels:

  • Google Chrome 103
  • Microsoft Edge 103

Configuration

📅 Schedule: Branch creation - "before 2am" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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

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


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Oct 25, 2022
@renovate renovate bot force-pushed the renovate/playwright-monorepo branch 5 times, most recently from 542feb0 to c114985 Compare October 25, 2022 14:34
@renovate renovate bot force-pushed the renovate/playwright-monorepo branch from c114985 to ee39ef2 Compare October 25, 2022 14:52
@kellymears kellymears added the 🚀! automerge label Oct 25, 2022
@kodiakhq kodiakhq bot merged commit 5fb6996 into main Oct 25, 2022
@kodiakhq kodiakhq bot deleted the renovate/playwright-monorepo branch October 25, 2022 17:23
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 🚀! automerge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant