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

Update @playwright/test: 1.23.1 → 1.25.0 (minor) #397

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Aug 12, 2022

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ @​playwright/test (1.23.1 → 1.25.0) · Repo

Release Notes

1.25.0

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).
  • ⚠️ 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

1.24.2

Highlights

This patch includes the following bug fixes:

#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

1.24.1

Highlights

This patch includes the following bug fixes:

#15898 - [BUG] Typescript error: The type for webServer config property (TestConfigWebServer) is not typed correctly
#15913 - [BUG] hooksConfig is required for mount fixture
#15932 - [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

1.24.0

🌍 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 '@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

1.23.4

Highlights

This patch includes the following bug fix:

#15717 - [REGRESSION]: Suddenly stopped working despite nothing having changed (experimentalLoader.js:load did not call the next hook in its chain and did not explicitly signal a short circuit)

Browser Versions

  • Chromium 104.0.5112.20
  • Mozilla Firefox 100.0.2
  • WebKit 15.4

This version was also tested against the following stable channels:

  • Google Chrome 103
  • Microsoft Edge 103

1.23.3

Highlights

This patch includes the following bug fixes:

#15557 - [REGRESSION]: Event Listeners not being removed if same handler is used for different events

Browser Versions

  • Chromium 104.0.5112.20
  • Mozilla Firefox 100.0.2
  • WebKit 15.4

This version was also tested against the following stable channels:

  • Google Chrome 103
  • Microsoft Edge 103

1.23.2

Highlights

This patch includes the following bug fixes:

#15273 - [BUG] LaunchOptions config has no effect after update to v1.23.0
#15351 - [REGRESSION]: Component testing project does not compile anymore
#15431 - [BUG] Regression: page.on('console') is ignored in 1.23

Browser Versions

  • Chromium 104.0.5112.20
  • Mozilla Firefox 100.0.2
  • WebKit 15.4

This version was also tested against the following stable channels:

  • Google Chrome 103
  • Microsoft Edge 103

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label Aug 12, 2022
@airhorns airhorns merged commit 7654695 into main Aug 24, 2022
@airhorns airhorns deleted the depfu/update/yarn/@playwright/test-1.25.0 branch August 24, 2022 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant