Skip to content

Releases: happo/happo-playwright

v4.0.3

13 Mar 16:34

Choose a tag to compare

What's Changed

  • Fix repository field in package.json by @lencioni in #31
  • Update .npmignore to exclude more tests and eslint config by @lencioni in #30

Full Changelog: v4.0.2...v4.0.3

v4.0.2

13 Mar 16:24

Choose a tag to compare

What's Changed

This release only updates the readme and some devDependencies.

New Contributors

Full Changelog: v4.0.1...v4.0.2

v4.0.1

12 Mar 09:05

Choose a tag to compare

Breaking change

This release changes the setup process of the happo-playwright library. Instead of requiring users to configure test.beforeAll and test.afterAll for us, we do this automatically through a fixture. Before, a test file with Happo would look something like this:

import happoPlaywright from 'happo-playwright';

test.beforeAll(() => happoPlaywright.init());
test.afterAll(() => happoPlaywright.finish());

test('start page', async ({ page }) => {
  // ...
  await happoPlaywright.screenshot(page, heroImage, {
    component: 'Hero Image',
    variant: 'default',
  });
  // ...
});

With fixtures, it will look like this instead:

import { test } from 'happo-playwright';

test('start page', async ({ page, happoScreenshot }) => {
  // ...
  await happoScreenshot(heroImage, {
    component: 'Hero Image',
    variant: 'default',
  });
  // ...
});

When using the fixture, you automatically have access to a happoScreenshot function that gets passed in to your test handler function.

Changes

Full Changelog: v4.0.0...v4.0.1

v4.0.0-beta.0

11 Mar 17:09

Choose a tag to compare

v4.0.0-beta.0 Pre-release
Pre-release

What's Changed

Full Changelog: v3.0.0...v4.0.0-beta.0

v4.0.0

12 Mar 09:07

Choose a tag to compare

See https://github.com/happo/happo-playwright/releases/tag/v4.0.1

Version 4.0.0 was quickly reverted as it used an approach that didn't work with fixtures. See https://github.com/happo/happo-playwright/releases/tag/v4.0.1 instead.

v3.0.0

03 Feb 19:51

Choose a tag to compare

What's Changed

  • Convert to TypeScript and update ESLint to latest version by @lencioni in #14

Full Changelog: v2.3.0...v3.0.0

v2.3.0

28 Jan 14:31

Choose a tag to compare

What's Changed

  • Allow snapshot strategy to be configured by @lencioni in #11
  • Add test-results and .github to .npmignore by @lencioni in #12

Full Changelog: v2.2.0...v2.3.0

v2.2.0

18 Dec 12:05

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

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

Choose a tag to compare

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