Releases: happo/happo-playwright
v4.0.3
v4.0.2
What's Changed
This release only updates the readme and some devDependencies.
- Update readme for v4 by @lencioni in #18
- Add dependabot config by @lencioni in #19
- Update eslint deps to latest versions and add globals to group by @lencioni in #21
- Switch from prepare to prepublishOnly by @lencioni in #27
- Bump @playwright/test from 1.46.0 to 1.51.0 by @dependabot in #24
- Bump typescript from 5.7.3 to 5.8.2 by @dependabot in #26
- Bump happo.io from 6.8.0 to 12.1.0 by @dependabot in #25
- Bump @types/node from 22.12.0 to 22.13.10 by @dependabot in #23
- Update happo-e2e to v4 by @lencioni in #28
- Remove has from yarn.lock by @lencioni in #29
New Contributors
- @dependabot made their first contribution in #24
Full Changelog: v4.0.1...v4.0.2
v4.0.1
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
What's Changed
Full Changelog: v3.0.0...v4.0.0-beta.0
v4.0.0
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
v2.3.0
v2.2.0
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
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' },
],
});