Skip to content

Releases: happo/happo-playwright

v2.2.0

18 Dec 12:05
Compare
Choose a tag to compare

The most important change in this release is that you no longer have to pass a context to happoPlaywright.init. Your beforeAll hook can now look like this:

test.beforeAll(async () => {
  happoPlaywright.init();
});

All changes

  • Update @playwright/test from 1.16.3 to 1.46.0, use node 20 instead of 18 in dev, add prettier config, and add yarn test command by @lencioni in #6
  • Throw when promises are passed to screenshot by @lencioni in #7
  • Simplify setup in happoPlaywright.init by @trotzig in #9

New Contributors

Full Changelog: v2.1.0...v2.2.0

v2.1.0

23 Aug 07:58
Compare
Choose a tag to compare

This version adds support for using dynamic targets. Pass a targets option to the screenshot() call and you can either limit the targets from .happo.js by name, or create a completely new target.

In this example we're using the chrome-xl target from our .happo.js config file, and a dynamic Firefox target:

await happoPlaywright.screenshot(page, title, {
  component: 'Title',
  variant: 'default',
  targets: [
    'chrome-xl',
    { name: 'firefox-small', browser: 'firefox', viewport: '400x800' },
  ],
});

v2.0.1

19 Nov 15:21
Compare
Choose a tag to compare

Loosen peer dependency on happo-e2e to allow happo-e2e@2

v2.0.0

19 Oct 15:50
Compare
Choose a tag to compare

This release moves happo-e2e from dependencies to peerDependencies. This means you'll have to install happo-e2e separately from happo-playwright. Most people already have already done this because the docs mention installing both packages separately, so even though this is a breaking change it will have little impact for most people.

v1.1.0

26 Jan 14:24
Compare
Choose a tag to compare

This release will hopefully fix an issue where happoTakeDOMSnapshot is missing. We've seen these errors:

TypeError: window.happoTakeDOMSnapshot is not a function

If you want to make use of the fix, you have to update your happoPlaywright.init calls. Instead of passing a page, pass a context:

test.beforeEach(async ({ context }) => {
  await happoPlaywright.init(context);
});

This version is backwards-compatible with the old way of initializing the lib: happoPlaywright.init(page). The recommended way is to use context however.